[dub] Release build fails with 2.067.0

Chris via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Apr 15 03:31:00 PDT 2015


On Wednesday, 15 April 2015 at 10:26:55 UTC, John Colvin wrote:
> On Wednesday, 15 April 2015 at 10:11:17 UTC, Chris wrote:
>> On Tuesday, 14 April 2015 at 15:58:18 UTC, Chris wrote:
>>> Sorry, I forgot the title the first time around!
>>>
>>> I get the following message from dub when using 
>>> "--build=release":
>>>
>>> Linking...
>>> .dub/build/myprogram-release-linux.posix-x86_64-dmd_2067-C1A5273464ACE9961E3F3BA6AC04084B/abairtts.o:(.data._D65TypeInfo_xC3std5range10interfaces18__T10InputRangeTiZ10InputRange6__initZ+0x10):
>>> undefined reference to
>>> `_D64TypeInfo_C3std5range10interfaces18__T10InputRangeTiZ10InputRange6__initZ'
>>> collect2: error: ld returned 1 exit status
>>> --- errorlevel 1
>>>
>>> DUB version 0.9.23, built on Apr  3 2015
>>> dmd 2.067.0
>>>
>>> Also, if I set the flags manually (dlfags[1]), they are 
>>> ignored
>>> and dub build in debug mode.
>>>
>>> [1] now -boundscheck=off, instead of -noboundscheck
>>
>> Update:
>>
>> I tried to compile the code with a script and I still have the 
>> same problem:
>>
>> dmd -release -boundscheck=off -O -inline
>> (or any combination of these)
>>
>> When I use
>>
>> dmd file1.d, file2.d ...
>>
>> it also fails. Only when I use
>>
>> dmd -debug file1.d file2.d ...
>>
>> does it work. Isn't that weird.
>>
>> I've made sure that the latest version of dmd is now installed 
>> system wide (Ubuntu) and not just locally with dvm (which is a 
>> cool tool). I have no clue what causes this problem.
>
> How about with -allinst?

This did the trick, thanks a million! But why would I have to do 
this now (it wasn't necessary with 2.066)?

Also, if you run

dub --build=profile

you'll get

src/phobos/std/getopt.d(438): Warning: statement is not reachable
src/phobos/std/getopt.d(577): Warning: statement is not reachable

The plot thickens ... :-)


More information about the Digitalmars-d-learn mailing list