Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

Linking libdl to Crypto in CMakeLists.txt - #9

Open
pTpTk wants to merge 1 commit into
google:masterfrom
pTpTk:master
Open

Linking libdl to Crypto in CMakeLists.txt#9
pTpTk wants to merge 1 commit into
google:masterfrom
pTpTk:master

Conversation

@pTpTk

@pTpTk pTpTk commented Oct 21, 2022

Copy link
Copy Markdown

make was failing on my machine (RHEL 8) with the following error. Crypto uses libdl, which wasn't linked in the cmake list.

[ 92%] Linking CXX executable cpu_check
/usr/local/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x11): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x24): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x2f): undefined reference to `dlclose'
/usr/local/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x37c): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x47e): undefined reference to `dlerror'
/usr/local/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x4f1): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x578): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x5b1): undefined reference to `dlerror'
/usr/local/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x671): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x6d1): undefined reference to `dlerror'
/usr/local/lib64/libcrypto.a(libcrypto-lib-dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x732): undefined reference to `dlclose'
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/cpu_check.dir/build.make:138: cpu_check] Error 1
make[1]: *** [CMakeFiles/Makefile2:227: CMakeFiles/cpu_check.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

make was failing on my machine (RHEL 8) because crypto uses libdl, which isn't linked in the cmake list.
@google-cla

google-cla Bot commented Oct 21, 2022

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@pTpTk
pTpTk marked this pull request as draft October 21, 2022 20:50
@pTpTk
pTpTk marked this pull request as ready for review October 21, 2022 20:56
@pTpTk pTpTk changed the title Update CMakeLists.txt Linking libdl to crypto CMakeLists.txt Oct 21, 2022
@pTpTk pTpTk changed the title Linking libdl to crypto CMakeLists.txt Linking libdl to Crypto in CMakeLists.txt Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant