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

main.cc:(.text+0x103): undefined reference to `launchd_main(int, char**)' while building on arch based system #20

Open
formula-spectre opened this issue Feb 14, 2023 · 1 comment

Comments

@formula-spectre
Copy link

`[100%] Linking CXX executable test_all
/usr/bin/ld: CMakeFiles/test_all.dir/__/src/main.cc.o: in function `main':
main.cc:(.text+0x103): undefined reference to `launchd_main(int, char**)'
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [test/CMakeFiles/test_all.dir/build.make:353: test/test_all] Error 1
make[1]: *** [CMakeFiles/Makefile2:898: test/CMakeFiles/test_all.dir/all] Error 2

compiler: clang version 15.0.7

how to reproduce:

sudo pacman -S clang cmake base-devel nlohmann-json
git clone https://github.com/mheily/relaunchd/ && cd relaunchd
mkdir build && cd build #force of habit lol
CC=clang CXX=clang++ cmake ..
make
``
@calmsacibis995
Copy link

It happens to me as well, both in Ubuntu 22.04 and macOS Ventura.
Output from Ventura:
Undefined symbols for architecture arm64: "launchd_main(int, char**)", referenced from: _main in main.cc.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [test/test_all] Error 1 make[1]: *** [test/CMakeFiles/test_all.dir/all] Error 2 make: *** [all] Error 2

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

2 participants