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

Failed to compile shared library #263

Open
zhangzhimin opened this issue Oct 8, 2024 · 0 comments
Open

Failed to compile shared library #263

zhangzhimin opened this issue Oct 8, 2024 · 0 comments

Comments

@zhangzhimin
Copy link

base) ➜  build_debug git:(preview) ✗ make cpuinfo
Consolidate compiler generated dependencies of target cpuinfo
[  0%] Linking C shared library ../../lib/libcpuinfo.so
/usr/bin/ld: CMakeFiles/cpuinfo.dir/src/init.c.o: in function `cpuinfo_initialize':
/home/zhimin/Projects/Matazure/galois/third_party/cpuinfo/src/init.c:30: undefined reference to `cpuinfo_x86_linux_init'
/usr/bin/ld: CMakeFiles/cpuinfo.dir/src/init.c.o: relocation R_X86_64_PC32 against undefined hidden symbol `cpuinfo_x86_linux_init' can not be used when making a shared object
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [third_party/cpuinfo/CMakeFiles/cpuinfo.dir/build.make:145: lib/libcpuinfo.so] Error 1
make[2]: *** [CMakeFiles/Makefile2:55466: third_party/cpuinfo/CMakeFiles/cpuinfo.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:55473: third_party/cpuinfo/CMakeFiles/cpuinfo.dir/rule] Error 2
make: *** [Makefile:19806: cpuinfo] Error 2

third_party/cpuinfo/src/cpuinfo/internal-api.h: 51

CPUINFO_PRIVATE void cpuinfo_x86_linux_init(void);

CPUINFO_PRIVATE will make cpuinfo_x86_linux_init symbol to be hidden, so we can not use it in the shared library?

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