[CDRIVER-3813] CMake project with static OpenSSL does not link Created: 21/Sep/20 Updated: 28/Oct/23 Resolved: 30/Nov/20 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Build |
| Affects Version/s: | 1.17.2 |
| Fix Version/s: | 1.18.0, 1.18.0-alpha |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Thomas Jego | Assignee: | Roberto Sanchez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 20.04 |
||
| Attachments: |
|
| Description |
|
I created a very simple CMake project (see attached files) to test static linkage of OpenSSL but I go the following error message:
Steps to reproduce:
N.B.: If OPENSSL_USE_STATIC_LIBS is unset (or set to OFF), .so are used and compilation works.
|
| Comments |
| Comment by Githook User [ 30/Nov/20 ] |
|
Author: {'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}Message: |
| Comment by Roberto Sanchez [ 10/Nov/20 ] |
|
thomas.jego@dice-engineering.com, the bug is actually in the C driver, so I have moved the ticket to that project. I am working on implementing a fix. |
| Comment by Thomas Jego [ 22/Sep/20 ] |
|
Hi kevin.albertson, indeed I'm attempting to link everything statically (C driver and OpenSSL). C driver and C++ driver are built using the FetchContent feature of CMake. FetchContent feature downloads source code from MongoDB GitHub and builds it directly in my project (see 'add_mongo.cmake' file). |
| Comment by Kevin Albertson [ 21/Sep/20 ] |
|
Hi thomas.jego@dice-engineering.com, thanks for the report! I will try to reproduce with the files you included. As a note, the C++ driver does not link to OpenSSL directly, but uses OpenSSL through the C driver. Are you attempting to link both the C driver and OpenSSL statically? If so, it may help to know how you are building/installing the C driver and C++ driver. |