-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
mold: error: undefined symbol: OPENSSL_ia32cap_P #1315
Comments
We need more information about your issue to see what went wrong. Is your program open-source? I need to reproduce the issue locally to debug it. |
Unfortunately it is not open-source. I'll try to create a small test case and share with you. |
I'm also having this problem. The project is doing something questionable IMO, but gold is able to link it no problem. The project depends on a closed-source commercially licensed library which bundles a number of its own dependencies as shared libraries, openssl among them. The project also uses vcpkg to depend on openssl directly from source. My guess is that the project's code which uses openssl directly is statically linking to the openssl from vcpkg, and the closed source libs are dynamically linking to the bundled openssl, so it "works" ok, but mold doesn't like it for some reason. A little googling led me to this stackoverflow question which contains a possible clue: "What is your link command? OPENSSL_ia32cap_P has public visibility in libcrypto.a. However, it is private in libcrypto.so" |
@BenWhetton Can you upload your libcrypt.so and libcrypto.a? |
Also please try to run the final link command with |
Thanks for getting back to me so quickly! I think the relevant lines in the linker output are:
And the libcrypto files: |
I think I need a copy of that closed-source .so file. If you can, can you upload it to some secret URL and share it with me via email? My email is rui314@gmail.com. I'll delete the file from my machine after debugging. |
Setup
Machine - SUSE Linux Enterprise Server version 12.
GCC - 12.3.0
cmake - 3.25.1
As I do not have root permissions, I installed mold in a local directory and added it to the path.
I ran the build with
mold -run make install
It ran fine for the most part, but received the following error:
mold: error: undefined symbol: OPENSSL_ia32cap_P
This is because I am using OpenSSL in one of the source files:
openssl - 1.1.1g
The error mentions that the above symbol is referenced in the following file:
openssl/openssl-1.1.1g/openssl-64bit-release-static-gcc-8.2.0/lib/libcrypto.a(cryptlib.o):(OPENSSL_cpuid_setup)
I did not receive this error when I used the default linker, so I know that it works.
Seems to be an issue with mold. Is there a bypass or a workaround for this?
The text was updated successfully, but these errors were encountered: