Thread overview
vibe-d linker error: undefined reference to deimos openssl
September 10

I'm attempting to upgrade the vibe-d dependencies of a project. The project compiles fine using dub, but the linker fails with:

/usr/bin/ld: ../../.dub/packages/vibe-d-0.9.8/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_v2.101.2-BCC9E2A9CB402B67930FAFFBF7360088035232BADBED8A5363A1A4DE1DBD7D7C/libvibe-d_tls.a(openssl.o):(.data.rel.ro+0x70): undefined reference to `_D6deimos7openssl3bio12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-d-0.9.8/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_v2.101.2-BCC9E2A9CB402B67930FAFFBF7360088035232BADBED8A5363A1A4DE1DBD7D7C/libvibe-d_tls.a(openssl.o):(.data.rel.ro+0x78): undefined reference to `_D6deimos7openssl3err12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-d-0.9.8/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_v2.101.2-BCC9E2A9CB402B67930FAFFBF7360088035232BADBED8A5363A1A4DE1DBD7D7C/libvibe-d_tls.a(openssl.o):(.data.rel.ro+0x80): undefined reference to `_D6deimos7openssl8opensslv12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-d-0.9.8/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_v2.101.2-BCC9E2A9CB402B67930FAFFBF7360088035232BADBED8A5363A1A4DE1DBD7D7C/libvibe-d_tls.a(openssl.o):(.data.rel.ro+0x88): undefined reference to `_D6deimos7openssl4rand12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-d-0.9.8/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_v2.101.2-BCC9E2A9CB402B67930FAFFBF7360088035232BADBED8A5363A1A4DE1DBD7D7C/libvibe-d_tls.a(openssl.o):(.data.rel.ro+0x90): undefined reference to `_D6deimos7openssl3ssl12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-d-0.9.8/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_v2.101.2-BCC9E2A9CB402B67930FAFFBF7360088035232BADBED8A5363A1A4DE1DBD7D7C/libvibe-d_tls.a(openssl.o):(.data.rel.ro+0x98): undefined reference to `_D6deimos7openssl5stack12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-d-0.9.8/vibe-d/tls/.dub/build/openssl-debug-linux.posix-x86_64-dmd_v2.101.2-BCC9E2A9CB402B67930FAFFBF7360088035232BADBED8A5363A1A4DE1DBD7D7C/libvibe-d_tls.a(openssl.o):(.data.rel.ro+0xa0): undefined reference to `_D6deimos7openssl6x509v312__ModuleInfoZ'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

Here's version info:

$ dub --version
DUB version 1.30.0, built on Jan  1 2023
$ dmd --version
DMD64 D Compiler v2.101.2
Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved written by Walter Bright
$ openssl version
OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)

And my dub dependencies are:

dependency "vibe-core" version="~>2.9.0"
dependency "vibe-d:http" version="~>0.9.8"
dependency "vibe-d:data" version="~>0.9.8"
dependency "openssl" version="~>3.3.3"

I'm running Ubuntu 24.04 and have libssl-dev installed.

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
$ apt list --installed | grep libssl

libssl-dev/noble-updates,noble-security,now 3.0.13-0ubuntu3.4 amd64 [installed]
libssl3t64/noble-updates,noble-security,now 3.0.13-0ubuntu3.4 amd64 [installed,automatic]

I'm at a loss for how to fix this linker error. Any help would be appreciated.

September 14

On Tuesday, 10 September 2024 at 20:41:12 UTC, Curtis Spencer wrote:

>

I'm attempting to upgrade the vibe-d dependencies of a project. The project compiles fine using dub, but the linker fails with:

>

I'm at a loss for how to fix this linker error. Any help would be appreciated.

You may have to specify the OpenSSL version with vibe-stream:tls

https://vibed.org/docs#http-https

-Steve

September 16

On Saturday, 14 September 2024 at 12:31:01 UTC, Steven Schveighoffer wrote:

>

On Tuesday, 10 September 2024 at 20:41:12 UTC, Curtis Spencer wrote:

>

I'm attempting to upgrade the vibe-d dependencies of a project. The project compiles fine using dub, but the linker fails with:

>

I'm at a loss for how to fix this linker error. Any help would be appreciated.

You may have to specify the OpenSSL version with vibe-stream:tls

https://vibed.org/docs#http-https

-Steve

Thanks. I added the following to my dub.sdl file:

dependency "vibe-stream:tls" version="~>1.0"
subConfiguration "vibe-stream:tls" "openssl-3.0"

but I am still getting essentially the same error:

/usr/bin/ld: ../../.dub/packages/vibe-stream-1.1.0/vibe-stream/tls/.dub/build/openssl-3.0-debug-linux.posix-x86_64-dmd_v2.101.2-FEA5B9042BC39B78C28FD73CFFA319B61AF4FDBEB7F2781D40C450C1C5A40CC0/libvibe-stream_tls.a(openssl.o):(.data.rel.ro+0x70): undefined reference to `_D6deimos7openssl3bio12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-stream-1.1.0/vibe-stream/tls/.dub/build/openssl-3.0-debug-linux.posix-x86_64-dmd_v2.101.2-FEA5B9042BC39B78C28FD73CFFA319B61AF4FDBEB7F2781D40C450C1C5A40CC0/libvibe-stream_tls.a(openssl.o):(.data.rel.ro+0x78): undefined reference to `_D6deimos7openssl3err12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-stream-1.1.0/vibe-stream/tls/.dub/build/openssl-3.0-debug-linux.posix-x86_64-dmd_v2.101.2-FEA5B9042BC39B78C28FD73CFFA319B61AF4FDBEB7F2781D40C450C1C5A40CC0/libvibe-stream_tls.a(openssl.o):(.data.rel.ro+0x80): undefined reference to `_D6deimos7openssl8opensslv12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-stream-1.1.0/vibe-stream/tls/.dub/build/openssl-3.0-debug-linux.posix-x86_64-dmd_v2.101.2-FEA5B9042BC39B78C28FD73CFFA319B61AF4FDBEB7F2781D40C450C1C5A40CC0/libvibe-stream_tls.a(openssl.o):(.data.rel.ro+0x88): undefined reference to `_D6deimos7openssl4rand12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-stream-1.1.0/vibe-stream/tls/.dub/build/openssl-3.0-debug-linux.posix-x86_64-dmd_v2.101.2-FEA5B9042BC39B78C28FD73CFFA319B61AF4FDBEB7F2781D40C450C1C5A40CC0/libvibe-stream_tls.a(openssl.o):(.data.rel.ro+0x90): undefined reference to `_D6deimos7openssl3ssl12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-stream-1.1.0/vibe-stream/tls/.dub/build/openssl-3.0-debug-linux.posix-x86_64-dmd_v2.101.2-FEA5B9042BC39B78C28FD73CFFA319B61AF4FDBEB7F2781D40C450C1C5A40CC0/libvibe-stream_tls.a(openssl.o):(.data.rel.ro+0x98): undefined reference to `_D6deimos7openssl5stack12__ModuleInfoZ'
/usr/bin/ld: ../../.dub/packages/vibe-stream-1.1.0/vibe-stream/tls/.dub/build/openssl-3.0-debug-linux.posix-x86_64-dmd_v2.101.2-FEA5B9042BC39B78C28FD73CFFA319B61AF4FDBEB7F2781D40C450C1C5A40CC0/libvibe-stream_tls.a(openssl.o):(.data.rel.ro+0xa0): undefined reference to `_D6deimos7openssl6x509v312__ModuleInfoZ'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

Also, should I be using vibe-d:stream or vibe-d:tls in my dub.sdl file? I'm a little confused because both sub-projects are listed here, but vibe-tls isn't in the project structure a little further down like vibe-stream is.