Closed MichalStrehovsky closed 1 year ago
I've statically compiled ICU into lbrycrd for several years. Maybe you can get a clue on that here: https://github.com/lbryio/lbrycrd/blob/master/depends/packages/icu.mk
Same story for openssl: https://github.com/lbryio/lbrycrd/blob/v19_master/depends/packages/openssl.mk
The boost file there shows the linking attributes. Namely:
$(package)_ldflags_mingw32=-lsicuio -lsicuuc -lsicudt
$(package)_ldflags_linux=-licuio -licuuc -licudata -licui18n
$(package)_ldflags_darwin=-licuio -licuuc -licudata -licui18n
I'll leave this as-is. Hardcoding libssl comes with drawbacks - each distro configures libssl differently and this would be a pain to e.g. have working certificate paths for https.
Libssl is loaded dynamically through dlopen https://github.com/dotnet/runtimelab/blob/06f08facc0e0efbaff755dd5957485edf2771ea7/src/libraries/Native/Unix/System.Security.Cryptography.Native/opensslshim.c#L53-L134.
The same problem for ICU.
This doesn't work because of #2. We either need to fix #2 or rewrite this to link statically.