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](https://code.dlang.org/packages/vibe-d), but
`vibe-tls` isn't in the project structure a little further down
like `vibe-stream` is.