Cmake generates invalid linker tasks with clang on arm64

Hello,

I initially thought it was a bug but apparently not

https://gitlab.kitware.com/cmake/cmake/-/issues/22589

It works on other platform but somehow on arm64, cmake generates something different and the linker failed. Did anyone see that too?

Or does it have to be taken care manually? as in cmake std functions do not support this setup.

The workaround you proposed looks like it is bogus and just hides the problem because it tells it to look for libraries in a non-existent directory (as nothing is named /usr/lib/clang /usr/lib/libfoo.so …). Can you provide the CMake code that triggered this? If you can minimize it by removing extraneous details and still happening, that’d be even better.

Hi Ben,

Thank you for the reply. :slight_smile:

I will try to reproduce with the smallest possible Cmake script. In the meantime, if anything obvious can be found ;), here is the one the CMake script used:

https://github.com/libgd/libgd/blob/master/src/CMakeLists.txt (included from the main CMake in the src root dir).