Bug 18971 – [Home]I have a project that can be compiled in the debug mode with the latest DMD 2.080-1, but I report errors in release mode.

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-06-11T16:07:50Z
Last change time
2020-03-21T03:56:39Z
Assigned to
No Owner
Creator
shove

Comments

Comment #0 by shove — 2018-06-11T16:07:50Z
Excuse me, what's the reason for this phenomenon? I have a project that can be compiled in the debug mode with the latest DMD 2.080-1, but I report errors in release mode. // release: $ dub -b release ... Linking... Undefined symbols for architecture x86_64: "__D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TmZQBrFNaNbNiNfmZSQCsQCr__TQCpVii10TaVQCki1TmZQDiFNaNbNiNfmZ6Result", referenced from: __D3std4conv__T6toImplTAyaTmZQoFNaNbNemkEQBm5ascii10LetterCaseZQBo in test.o __D3std4conv__T8textImplTAyaTQeThTaTaTQnTmZQBcFNaNfQBahaaQBgmZQBl in test.o __D3std4conv__T8textImplTAyaTQeTmTQjZQwFNaNbNfQvmQyZQBb in test.o __D3std4conv__T8textImplTAyaTQeTmTQjTmZQyFNaNbNfQxmQBamZQBf in test.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: linker exited with status 1 /Library/D/dmd/bin/dmd failed with exit code 1. // ------------------------------------ // debug: $ dub -b debug Performing "debug" build using /Library/D/dmd/bin/dmd for x86_64. async 0.1.11: target for configuration "library" is up to date. crypto 0.1.4: target for configuration "library" is up to date. buffer 0.2.4: target for configuration "library" is up to date. dbc 1.1.0: target for configuration "library" is up to date. szip 0.0.2: target for configuration "library" is up to date. libserver ~master: target for configuration "library" is up to date. test ~master: target for configuration "application" is up to date. To force a rebuild of up-to-date targets, run again with --force. Running ../release/test OK!
Comment #1 by b2.temp — 2018-06-11T16:15:49Z
try to add "dflags-dmd": ["-allinst"], to your DUB json or dflags "-allinst" platform="dmd" to you DUB sdl and tells if the error still happen. You seem to reach a problem at least 2 other people have encountered.
Comment #2 by shove — 2018-06-11T16:25:33Z
Thank you, add "dflags-dmd": "-allinst" after compile successfully. But the previous version of 2.080.1 did not have this problem.
Comment #3 by b2.temp — 2018-06-11T16:30:42Z
Thanks for testing this. Look at at this links for more infos: - https://forum.dlang.org/post/[email protected] - https://issues.dlang.org/show_bug.cgi?id=18234 The symbols for which there's a linkers errors looks similar. (for me too in 18234 but i didn't reported them). What would be great is a repro case, unfortuantely it seems to happen only in bigger stuff. *** This issue has been marked as a duplicate of issue 18234 ***