-
Notifications
You must be signed in to change notification settings - Fork 1.7k
libcpprestsdk: fix building as a static library #1344
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
Conversation
On Unix, try to use pkg-config to find OpenSSL. This will automatically find any dependent libraries and put them in the correct order for linking. If pkg-config is not available or system is not UNIX, fallback on current mechanism Signed-off-by: Adam Duskett <[email protected]> [Retrieved (and slightly updated) from: https://git.buildroot.net/buildroot/tree/package/libcpprestsdk/0001-libcpprestsdk-fix-building-as-a-static-library.patch] Signed-off-by: Fabrice Fontaine <[email protected]>
This is a new tentative following #1026, I'll try to fix all issues this time to get it merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
…)" This reverts commit cb7ca74. Issues concerning linking (microsoft#1388) and cross compiling (microsoft#1378) have been reported. - Fixes microsoft#1388
@ffontaine could you please describe in detail, under which conditions "building as a static library" fails, so that it can be reproduced? Including OS and versions of involved packages. Which error do you get? So far, I do not see any problems, when building cpprestsdk as a static library: cd Release
mkdir build
cd build
cmake -G Ninja .. -DBUILD_SHARED_LIBS=0 -DCMAKE_BUILD_TYPE=Release -DWERROR=OFF
ninja
cd Binaries
./test_runner
…
All test cases PASSED
Finished running all 783 tests. OK, no problems detected Tested under:
|
@aduskett could you please describe in detail, under which conditions "building as a static library" fails, so that it can be reproduced? Including OS and versions of involved packages. Which error do you get? |
Build failure was raised on buildroot with version 2.10.1 using BR2_STATIC_LIBS=y which means that all packages including openssl will be built statically by buildroot, full debug log can be found here: http://autobuild.buildroot.net/results/be9e8d1717968a0ff8f01f7fadfa79825ac88b94/build-end.log, especially:
I'm able to reproduce he build failure locally with version 2.10.5 (without this patch). I assume that if you're building on Fedora or any other "standard" OS, you'll not encounter this issue as the libssl-dev package will always install both libcrypto.so and libcrypto.a. |
…)" This reverts commit cb7ca74. Issues concerning OpenSSL dependency and linking (microsoft#1384, microsoft#1388) and cross compiling (microsoft#1378) have been reported. - Fixes microsoft#1384, microsoft#1388
…)" This reverts commit cb7ca74. Issues concerning OpenSSL linking dependency (microsoft#1384, microsoft#1388) and cross compiling (microsoft#1378) have been reported. - Fixes microsoft#1384, microsoft#1388
On Unix, try to use pkg-config to find OpenSSL. This will automatically
find any dependent libraries and put them in the correct order for
linking. If pkg-config is not available or system is not UNIX, fallback
on current mechanism
Signed-off-by: Adam Duskett [email protected]
[Retrieved (and slightly updated) from:
https://git.buildroot.net/buildroot/tree/package/libcpprestsdk/0001-libcpprestsdk-fix-building-as-a-static-library.patch]
Signed-off-by: Fabrice Fontaine [email protected]