-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[LIBTOMMATH] The static build library can not be included in a shared library in LINUX #22549
Comments
This is not a community-triplet issue (it may be for Android for which I added a sepparate issue). The main problem described here is that Building in Linux x64 which is an official supported configuration (not community) require changes in the PORT file ( adding -fPIC parameter). The sister library libtomcrypt has this parameter in port, libtommath it does not. |
I will repro this issue locally and confirm it soon. |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
See the comment libtom/libtommath#523 (comment), this issue still exists when recompile with |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
https://github.com/libtom/libtommath
The library build with VCPKG in Linux x64 can be included and works in another static library (as static library).
However if we try to create a shared library (which includes libtommath) we get this message:
libtommath.a(bn_mp_mul.o): relocation R_X86_64_PC32 against symbol `KARATSUBA_MUL_CUTOFF' can not be used when making a shared object; recompile with -fPIC
I suppose somwhere in the port the option must be included.
Triplet used:
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
During the build using this triplet both static and dynamic libraries are created for libtommath but the program links with the static one.
The text was updated successfully, but these errors were encountered: