Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building in release mode with dub fails to link #51

Open
schveiguy opened this issue Jun 18, 2021 · 2 comments
Open

Building in release mode with dub fails to link #51

schveiguy opened this issue Jun 18, 2021 · 2 comments

Comments

@schveiguy
Copy link

I'm not sure what the problem is, but whenever I build with -release mode, and use ae as a dependency, it's failing to link with a slew of symbols in phobos and elsewhere.

I have a suspicion there is a weird dub configuration thing going on.

This is on Ubuntu Linux 20.04, with dmd 2.096.0

steves@homebuild:~/git$ mkdir testae
steves@homebuild:~/git$ cd testae
steves@homebuild:~/git/testae$ dub init .
Package recipe format (sdl/json) [json]: 
Name [testae]: 
Description [A minimal D application.]: 
Author name [Steven Schveighoffer]: 
License [proprietary]: 
Copyright string [Copyright © 2021, Steven Schveighoffer]: 
Add dependency (leave empty to skip) []: ae
Adding dependency ae ~>0.0.3064
Add dependency (leave empty to skip) []: 
Successfully created an empty project in '/home/steves/git/testae'.
Package successfully created in .
steves@homebuild:~/git/testae$ dub
Performing "debug" build using /home/steves/.dvm/compilers/dmd-2.096.0/linux/bin/dmd for x86_64.
testae ~master: building configuration "application"...
Linking...
Running testae 
Edit source/app.d to start your project.
steves@homebuild:~/git/testae$ dub -b release
Performing "release" build using /home/steves/.dvm/compilers/dmd-2.096.0/linux/bin/dmd for x86_64.
testae ~master: building configuration "application"...
Linking...
/usr/bin/ld: .dub/build/application-release-linux.posix-x86_64-dmd_v2.096.0-1D4819BCAA283A58753C58D89DC45D58/testae.o: in function `_D2ae3sys3vfs4curl7CurlVFS4readMFAyaZAv':
../../.dub/packages/ae-0.0.3064/ae/utils/zlib.d:(.text._D2ae3sys3vfs4curl7CurlVFS4readMFAyaZAv[_D2ae3sys3vfs4curl7CurlVFS4readMFAyaZAv]+0x70): undefined reference to `_D3std9algorithm9searching__T10startsWithSQBoQBnQBg11__lambda168TAxaTAyaTQeTQhZQByFNaNfQwQuQwQyZk'
/usr/bin/ld: .dub/build/application-release-linux.posix-x86_64-dmd_v2.096.0-1D4819BCAA283A58753C58D89DC45D58/testae.o: in function `_D3std3net4curl__T3getTSQwQuQs12AutoProtocolThZQBdFAxaQBfZAh':
../../.dub/packages/ae-0.0.3064/ae/utils/zlib.d:(.text._D3std3net4curl__T3getTSQwQuQs12AutoProtocolThZQBdFAxaQBfZAh[_D3std3net4curl__T3getTSQwQuQs12AutoProtocolThZQBdFAxaQBfZAh]+0x6c): undefined reference to `_D3std9algorithm9searching__T10startsWithSQBoQBnQBg11__lambda168TAxaTAyaTQeTQhZQByFNaNfQwQuQwQyZk'
/usr/bin/ld: .dub/build/application-release-linux.posix-x86_64-dmd_v2.096.0-1D4819BCAA283A58753C58D89DC45D58/testae.o: in function `_D3std3net4curl__T9_basicFTPThZQnFAxaAxvSQBnQBmQBl3FTPZAh':
../../.dub/packages/ae-0.0.3064/ae/utils/zlib.d:(.text._D3std3net4curl__T9_basicFTPThZQnFAxaAxvSQBnQBmQBl3FTPZAh[_D3std3net4curl__T9_basicFTPThZQnFAxaAxvSQBnQBmQBl3FTPZAh]+0x162): undefined reference to `_D3std9algorithm9searching__T10startsWithSQBoQBnQBg11__lambda168TAxaTAyaTQeZQBvFNaNfQtQrQtZk'
/usr/bin/ld: .dub/build/application-release-linux.posix-x86_64-dmd_v2.096.0-1D4819BCAA283A58753C58D89DC45D58/testae.o: in function `_D3std3net4curl__T10_basicHTTPThZQpFAxaAxvSQBpQBoQBn4HTTPZAh':
../../.dub/packages/ae-0.0.3064/ae/utils/zlib.d:(.text._D3std3net4curl__T10_basicHTTPThZQpFAxaAxvSQBpQBoQBn4HTTPZAh[_D3std3net4curl__T10_basicHTTPThZQpFAxaAxvSQBpQBoQBn4HTTPZAh]+0x140): undefined reference to `_D3std9algorithm9searching__T10startsWithSQBoQBnQBg11__lambda168TAxaTAyaTQeZQBvFNaNfQtQrQtZk'
/usr/bin/ld: .dub/build/application-release-linux.posix-x86_64-dmd_v2.096.0-1D4819BCAA283A58753C58D89DC45D58/testae.o: in function `_D3std3net4curl__T3putTSQwQuQs12AutoProtocolThThZQBfFAxaAxhQBkZAh':
../../.dub/packages/ae-0.0.3064/ae/utils/zlib.d:(.text._D3std3net4curl__T3putTSQwQuQs12AutoProtocolThThZQBfFAxaAxhQBkZAh[_D3std3net4curl__T3putTSQwQuQs12AutoProtocolThThZQBfFAxaAxhQBkZAh]+0x80): undefined reference to `_D3std9algorithm9searching__T10startsWithSQBoQBnQBg11__lambda168TAxaTAyaTQeTQhZQByFNaNfQwQuQwQyZk'
/usr/bin/ld: .dub/build/application-release-linux.posix-x86_64-dmd_v2.096.0-1D4819BCAA283A58753C58D89DC45D58/testae.o: in function `_D3std3net4curl__T3delTSQwQuQs12AutoProtocolZQBbFAxaQBdZv':
../../.dub/packages/ae-0.0.3064/ae/utils/zlib.d:(.text._D3std3net4curl__T3delTSQwQuQs12AutoProtocolZQBbFAxaQBdZv[_D3std3net4curl__T3delTSQwQuQs12AutoProtocolZQBbFAxaQBdZv]+0x6c): undefined reference to `_D3std9algorithm9searching__T10startsWithSQBoQBnQBg11__lambda168TAxaTAyaTQeTQhZQByFNaNfQwQuQwQyZk'
/usr/bin/ld: .dub/build/application-release-linux.posix-x86_64-dmd_v2.096.0-1D4819BCAA283A58753C58D89DC45D58/testae.o: in function `_D3std3net4curl__T3delTSQwQuQs3FTPZQrFAxaQsZv':
../../.dub/packages/ae-0.0.3064/ae/utils/zlib.d:(.text._D3std3net4curl__T3delTSQwQuQs3FTPZQrFAxaQsZv[_D3std3net4curl__T3delTSQwQuQs3FTPZQrFAxaQsZv]+0xfc): undefined reference to `_D3std9algorithm9searching__T10startsWithSQBoQBnQBg11__lambda168TAxaTAyaTQeZQBvFNaNfQtQrQtZk'
/usr/bin/ld: .dub/build/application-release-linux.posix-x86_64-dmd_v2.096.0-1D4819BCAA283A58753C58D89DC45D58/testae.o: in function `_D3std3net4curl__T10_basicHTTPTaZQpFAxaAxvSQBpQBoQBn4HTTPZAa':
../../.dub/packages/ae-0.0.3064/ae/utils/zlib.d:(.text._D3std3net4curl__T10_basicHTTPTaZQpFAxaAxvSQBpQBoQBn4HTTPZAa[_D3std3net4curl__T10_basicHTTPTaZQpFAxaAxvSQBpQBoQBn4HTTPZAa]+0x140): undefined reference to `_D3std9algorithm9searching__T10startsWithSQBoQBnQBg11__lambda168TAxaTAyaTQeZQBvFNaNfQtQrQtZk'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/home/steves/.dvm/compilers/dmd-2.096.0/linux/bin/dmd failed with exit code 1.
@schveiguy
Copy link
Author

#38 might be related, not sure.

@CyberShadow
Copy link
Owner

Reduced it to https://issues.dlang.org/show_bug.cgi?id=22044

Fun!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants