Skip to content

mold error building vcpkg #1539

@ninetailedtori

Description

@ninetailedtori
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: 'src/Millennium/vendor/vcpkg/buildtrees/detect_compiler/x86-linux-rel/CMakeFiles/CMakeScratch/TryCompile-TF3n0o'
    
    Run Build Command(s): /bin/ninja -v cmTC_3b47a
    [1/2] /bin/clang   -march=znver3 -mtune=znver3 -O3 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt -fopenmp -fopenmp-extensions -pthread -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wformat -Werror=format-security -flto  -fPIC  -m32 -MD -MT CMakeFiles/cmTC_3b47a.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_3b47a.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_3b47a.dir/testCCompiler.c.o -c /tmp/makepkg/millennium-git/src/Millennium/vendor/vcpkg/buildtrees/detect_compiler/x86-linux-rel/CMakeFiles/CMakeScratch/TryCompile-TF3n0o/testCCompiler.c
    [2/2] : && /bin/clang -march=znver3 -mtune=znver3 -O3 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt -fopenmp -fopenmp-extensions -pthread -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wformat -Werror=format-security -flto  -fPIC  -m32 -m32 -fuse-ld=mold -Wl,-O4,--sort-common,--as-needed,-z,relro,-z,now,-z,pack-relative-relocs,-lgomp,-lpthread -flto CMakeFiles/cmTC_3b47a.dir/testCCompiler.c.o -o cmTC_3b47a   && :
    FAILED: [code=1] cmTC_3b47a 
    : && /bin/clang -march=znver3 -mtune=znver3 -O3 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt -fopenmp -fopenmp-extensions -pthread -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wformat -Werror=format-security -flto  -fPIC  -m32 -m32 -fuse-ld=mold -Wl,-O4,--sort-common,--as-needed,-z,relro,-z,now,-z,pack-relative-relocs,-lgomp,-lpthread -flto CMakeFiles/cmTC_3b47a.dir/testCCompiler.c.o -o cmTC_3b47a   && :
    mold: warning: /lib/libomp.so: skipping incompatible file: x86_64 (e_machine 3)
    mold: warning: /usr/lib/libomp.so: skipping incompatible file: x86_64 (e_machine 3)
    mold: warning: /usr/lib/libomp.so: skipping incompatible file: x86_64 (e_machine 3)
    mold: fatal: library not found: omp
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.
    
    



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

I've never had this warning on anything other than vcpkg, like, all other projects compile fine with openmp and extensions through clang and lgomp on mold's end enabled. Not sure if I'm doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions