Skip to content

Draft: community/libjxl: fix riscv64 build

omni requested to merge omni/aports:fix-rv64-libjxl into master

This first iteration of this doesn't do anything but limit this to arch="riscv64", where it is failing with:

-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/home/buildozer/aports/community/libjxl/src/libjxl-0.9.1/build/CMakeFiles/CMakeScratch/TryCompile-IjLImB'

    Run Build Command(s): /usr/bin/ninja -v cmTC_93c35
    [1/2] /usr/bin/clang   -Os -fstack-clash-protection -Wformat -Werror=format-security -MD -MT CMakeFiles/cmTC_93c35.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_93c35.dir/testCCompiler.c.o.d -o CMa
keFiles/cmTC_93c35.dir/testCCompiler.c.o -c /home/buildozer/aports/community/libjxl/src/libjxl-0.9.1/build/CMakeFiles/CMakeScratch/TryCompile-IjLImB/testCCompiler.c
    clang: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument]
    [2/2] : && /usr/bin/clang -Os -fstack-clash-protection -Wformat -Werror=format-security -Wl,--as-needed,-O1,--sort-common -fuse-ld=lld CMakeFiles/cmTC_93c35.dir/testCCompiler.c.o -o cmTC_93c35
  && :
    ninja: job failed: : && /usr/bin/clang -Os -fstack-clash-protection -Wformat -Werror=format-security -Wl,--as-needed,-O1,--sort-common -fuse-ld=lld CMakeFiles/cmTC_93c35.dir/testCCompiler.c.o -
o cmTC_93c35   && :
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_rnglists+0x15): unknown relocation (60) against symbol .LFE0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x16): unknown relocation (60) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x16): unknown relocation (61) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_rnglists+0x15): unknown relocation (61) against symbol .LFB0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x17): unknown relocation (60) against symbol .LVL2
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x17): unknown relocation (61) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x1b): unknown relocation (60) against symbol .LVL2
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x1b): unknown relocation (61) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x1c): unknown relocation (60) against symbol .LVL3
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x1c): unknown relocation (61) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x22): unknown relocation (60) against symbol .LVL3
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x22): unknown relocation (61) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x23): unknown relocation (60) against symbol .LFE0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x23): unknown relocation (61) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x34): unknown relocation (60) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x34): unknown relocation (61) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x35): unknown relocation (60) against symbol .LVL2
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x35): unknown relocation (61) against symbol .LVL0
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x3a): unknown relocation (60) against symbol .LVL2
    ld.lld: error: /usr/lib/Scrt1.o:(.debug_loclists+0x3a): unknown relocation (61) against symbol .LVL0
    ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: subcommand failed





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:10 (project)


-- Configuring incomplete, errors occurred!
>>> ERROR: libjxl: build failed

https://build.alpinelinux.org/buildlogs//build-edge-riscv64/community/libjxl/libjxl-0.9.1-r0.log

!60162 (merged)

Edited by omni

Merge request reports