RejectedSoftware Forums

Sign up

Ubuntu 18.04 linking problem

Just made the hello project dub init hello --type:vibe.d.
I do have libssl-dev installed: 1.1.0g-2ubuntu4 the default for Ubuntu 18.04 which I had to install explicitly, else linking failed saying libssl and libcrypto could not be found.
Everything builds with dmd 2.080.0, but linking fails as below. Please help.

Linking...
../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_2080-3B2D6460E8C1CDAAD90DC538F2C96CA8/libvibe-d_tls.a(openssl_f0_569.o): In function `_D4vibe6stream7openssl14OpenSSLContext6__ctorMFNfEQBwQBu3tls14TLSContextKindEQCxQCvQBb10TLSVersionZ9__lambda3MFNbNeZv':
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:467: undefined reference to `SSLv23_client_method'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:468: undefined reference to `SSLv23_client_method'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:472: undefined reference to `SSLv23_client_method'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:473: undefined reference to `SSLv23_client_method'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:480: undefined reference to `SSLv23_server_method'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:481: undefined reference to `SSLv23_server_method'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:483: undefined reference to `SSLv23_server_method'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:484: undefined reference to `SSLv23_server_method'
../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_2080-3B2D6460E8C1CDAAD90DC538F2C96CA8/libvibe-d_tls.a(openssl_f0_569.o): In function `_D4vibe6stream7openssl14OpenSSLContext11setDHParamsMFNeAyaZv':
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:722: undefined reference to `get_rfc3526_prime_2048'
../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_2080-3B2D6460E8C1CDAAD90DC538F2C96CA8/libvibe-d_tls.a(safestack_5fd_449.o): In function `_D6deimos7openssl9safestack__T10SKM_sk_numTSQBqQBm6x509v315GENERAL_NAME_stZ__TQBwZQCaFNbPSQDkQDgQDb__T8STACK_OFTQCrZQoZi':
/home/carl/Documents/vibed/hello/../../../.dub/packages/openssl-1.1.6_1.0.1g/openssl/deimos/openssl/safestack.d:140: undefined reference to `sk_num'
../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_2080-3B2D6460E8C1CDAAD90DC538F2C96CA8/libvibe-d_tls.a(safestack_5ff_516.o): In function `_D6deimos7openssl9safestack__T12SKM_sk_valueTSQBsQBo6x509v315GENERAL_NAME_stZ__TQByZQCcFNbPSQDmQDiQDd__T8STACK_OFTQCrZQoiZPQDa':
/home/carl/Documents/vibed/hello/../../../.dub/packages/openssl-1.1.6_1.0.1g/openssl/deimos/openssl/safestack.d:142: undefined reference to `sk_value'
../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_2080-3B2D6460E8C1CDAAD90DC538F2C96CA8/libvibe-d_tls.a(openssl.o): In function `_D4vibe6stream7openssl18_sharedStaticCtor1FZv':
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:911: undefined reference to `SSL_load_error_strings'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:912: undefined reference to `SSL_library_init'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:914: undefined reference to `CRYPTO_num_locks'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:922: undefined reference to `CRYPTO_set_id_callback'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:923: undefined reference to `CRYPTO_set_locking_callback'
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:928: undefined reference to `SSL_get_ex_new_index'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/usr/bin/dmd failed with exit code 1.

Re: Ubuntu 18.04 linking problem

Am 25.05.2018 um 23:59 schrieb Carl Sturtivant:

Just made the hello project dub init hello --type:vibe.d.
I do have libssl-dev installed: 1.1.0g-2ubuntu4 the default for Ubuntu 18.04 which I had to install explicitly, else linking failed saying libssl and libcrypto could not be found.
Everything builds with dmd 2.080.0, but linking fails as below. Please help.

Linking...
../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_2080-3B2D6460E8C1CDAAD90DC538F2C96CA8/libvibe-d_tls.a(openssl_f0_569.o): In function `_D4vibe6stream7openssl14OpenSSLContext6__ctorMFNfEQBwQBu3tls14TLSContextKindEQCxQCvQBb10TLSVersionZ9__lambda3MFNbNeZv':
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:467: undefined reference to `SSLv23_client_method'
(...)

Ubuntu 18.04 has switched to OpenSSL 1.1.x, which means that the
corresponding "openssl-1.1" configuration of vibe-d:tls now needs to be
selected. There are two possible ways, using the command line or using
the package recipe.

The command line way is "dub --override-config=vibe-d:tls/openssl-1.1",
using the package recipe is described in the HTTPS section of the
docs
. For public packages I'd recommend to stick with the command
line switch, so that the end user keeps the full flexibility, whereas
for closed environments using the package recipe is absolutely fine.

My plan is to make 1.1 the default with the 0.8.5 release, so that there
is still some time for derived distros to catch up (and for more people
to upgrade).

Re: Ubuntu 18.04 linking problem

On Sat, 26 May 2018 09:39:13 +0200, Sönke Ludwig wrote:

Am 25.05.2018 um 23:59 schrieb Carl Sturtivant:

Just made the hello project dub init hello --type:vibe.d.
I do have libssl-dev installed: 1.1.0g-2ubuntu4 the default for Ubuntu 18.04 which I had to install explicitly, else linking failed saying libssl and libcrypto could not be found.
Everything builds with dmd 2.080.0, but linking fails as below. Please help.

Linking...
../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_2080-3B2D6460E8C1CDAAD90DC538F2C96CA8/libvibe-d_tls.a(openssl_f0_569.o): In function `_D4vibe6stream7openssl14OpenSSLContext6__ctorMFNfEQBwQBu3tls14TLSContextKindEQCxQCvQBb10TLSVersionZ9__lambda3MFNbNeZv':
/home/carl/Documents/vibed/hello/../../../.dub/packages/vibe-d-0.8.3/vibe-d/tls/vibe/stream/openssl.d:467: undefined reference to `SSLv23_client_method'
(...)

Ubuntu 18.04 has switched to OpenSSL 1.1.x, which means that the
corresponding "openssl-1.1" configuration of vibe-d:tls now needs to be
selected. There are two possible ways, using the command line or using
the package recipe.

The command line way is "dub --override-config=vibe-d:tls/openssl-1.1",
using the package recipe is described in the [HTTPS section of the
docs][1]. For public packages I'd recommend to stick with the command
line switch, so that the end user keeps the full flexibility, whereas
for closed environments using the package recipe is absolutely fine.

My plan is to make 1.1 the default with the 0.8.5 release, so that there
is still some time for derived distros to catch up (and for more people
to upgrade).

[1]: http://vibed.org/docs#http-https

Thanks, I'm really happy that OpenSSL 1.1.x is already currently supported.