Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building with clang does not work anymore #54

Open
SebaLukas opened this issue Dec 9, 2024 · 0 comments
Open

Building with clang does not work anymore #54

SebaLukas opened this issue Dec 9, 2024 · 0 comments

Comments

@SebaLukas
Copy link
Collaborator

ISO Version

DIN70121, ISO15118-2, ISO15118-20

Describe the bug

Building with clang (on my system 18.1.8) does not work anymore when -DUNIT_TESTING is active.
The linker has some problem with the unit tests apparently:

/usr/bin/ld: src/iso15118/libiso15118.a(logging.cpp.o): in function `__llvm_gcov_writeout':
logging.cpp:(.text+0xf9a): undefined reference to `llvm_gcda_start_file'
/usr/bin/ld: logging.cpp:(.text+0xfe2): undefined reference to `llvm_gcda_emit_function'
/usr/bin/ld: logging.cpp:(.text+0xffe): undefined reference to `llvm_gcda_emit_arcs'
/usr/bin/ld: logging.cpp:(.text+0x1017): undefined reference to `llvm_gcda_summary_info'
/usr/bin/ld: logging.cpp:(.text+0x101c): undefined reference to `llvm_gcda_end_file'
/usr/bin/ld: src/iso15118/libiso15118.a(logging.cpp.o): in function `__llvm_gcov_init':
logging.cpp:(.text+0x1569): undefined reference to `llvm_gcov_init'
[...]

Building worked until and including git hash: 063944bfa141a86eddb298da2a6c9767ad6e5f57. The next commit df95c232fdd47881d218f82cf1750aba5d9f9336 added something that clang or the linker does not like.

To Reproduce

  1. Checkout the actual main (hash: a50c9af1296f04881a3be5d00fe4e02b1559521b)
  2. Run: cmake -S . -B build -G Ninja -DBUILD_TESTING=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
  3. Run: ninja -C build

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant