[MONGOCRYPT-17] Unable to statically link to libmongocrypt due to missing libbson symbols Created: 11/Jun/19 Updated: 28/Oct/23 Resolved: 27/Jun/19 |
|
| Status: | Closed |
| Project: | Libmongocrypt |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matt Broadstone | Assignee: | Roberto Sanchez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | Build libmongocrypt library |
| Description |
|
When statically linking to libmongocrypt for the node binding, we run into the following segfaults during test execution:
it seems like libbson's symbols are missing. |
| Comments |
| Comment by Githook User [ 27/Jun/19 ] |
|
Author: {'name': 'Roberto C. Sánchez', 'username': 'rcsanchez97', 'email': 'roberto@connexer.com'}Message: |
| Comment by Githook User [ 27/Jun/19 ] |
|
Author: {'name': 'Roberto C. Sánchez', 'username': 'rcsanchez97', 'email': 'roberto@connexer.com'}Message: |
| Comment by Matt Broadstone [ 25/Jun/19 ] |
|
Yes, I think that would resolve the issue. |
| Comment by Kevin Albertson [ 20/Jun/19 ] |
|
matt.broadstone just to confirm, it is sufficient to copy libbson-static-1.0.a alongside libmongocrypt-static.a, right? |
| Comment by Roberto Sanchez [ 17/Jun/19 ] |
|
matt.broadstone, I was able to reproduce the error when the libraries included only libmongocrypt-static.a. However, when I added libbson-static-1.0.a, everything worked. Is the inclusion of libbson-static-1.0.a problematic in some way? The only thing that springs to mind is that it would need to made available on the system. Since the Node build already needs to download the libmongocrypt artifacts, the libmongocrypt build could be modified to copy libbson-static-1.0.a in alongside libmongocrypt-static.a, which would guarantee the availability of libbson-static-1.0.a in a known good location for every build. Would that solve the problem in an acceptable way? |
| Comment by Kevin Albertson [ 14/Jun/19 ] |
|
matt.broadstone to clarify, do you want libmongocrypt-static.a to include the definitions of libbson symbols, or just to have libbson-static.a easily accessible, so both libmongocrypt-static.a and libbson-static.a can be specified in binding.gyp? |