Skip to content

CMake build fails building tests for 1.3.2 when cross-compiling Linux Arm and Windows Arm #1195

@Mr-Clam

Description

@Mr-Clam

The CMakeLists.txt file for the tests assumes that coverage can be built if the compiler is clang (here). Actually, this isn't always true:

FAILED: test/infcover 
: && clang --target=aarch64-none-linux-gnu --gcc-toolchain=/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu --sysroot=/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc -fuse-ld=/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ld -ffp-contract=off   -g -fno-strict-aliasing -Wstrict-aliasing -pipe -Wformat -coverage test/CMakeFiles/infcover.dir/infcover.c.o -o test/infcover  libz.a && :
/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ld: cannot find /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.profile-aarch64.a: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The folder /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/ contains libclang_rt.profile-x86_64.a and libclang_rt.profile-i386.a; there is no libclang_rt.profile-aarch64.a.

This is a cross-compile build environment running on Ubuntu 22.04 x86_64 and targeting Linux Arm64.

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