www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Cannot make sense of link error

reply =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
When I clone master of

https://github.com/nordlow/phobos-next.git

and test it with DMD 2.076 as

/usr/bin/dub test --compiler=dmd

linking fails as

Generating test runner configuration 'phobos-next-test-library' 
for 'library' (library).
Performing "unittest" build using dmd for x86_64.
phobos-next 0.2.0+commit.78.gb394bc11: building configuration 
"phobos-next-test-library"...
Linking...
.dub/build/phobos-next-test-library-unittest-linux.posix-x86_64-dmd_2076-8E3DE82DCD52EBF401F6B193205A6068/phobos-next-test-library.
:src/zio.d:function pure  safe immutable(char)[]
std.conv.textImpl!(immutable(char)[], immutable(char)[],
char).textImpl(immutable(char)[], char): error: undefined reference to 'pure
nothrow  nogc  safe immutable(char)[]
std.conv.to!(immutable(char)[]).to!(immutable(char)[]).to(return
immutable(char)[])'
.dub/build/phobos-next-test-library-unittest-linux.posix-x86_64-dmd_2076-8E3DE82DCD52EBF401F6B193205A6068/phobos-next-test-library.
:src/zio.d:function pure nothrow  safe immutable(char)[]
std.conv.textImpl!(immutable(char)[], immutable(char)[], immutable(char)[],
immutable(char)[]).textImpl(immutable(char)[], immutable(char)[],
immutable(char)[]): error: undefined reference to 'pure nothrow  nogc  safe
immutable(char)[] std.conv.to!(immutable(char)[]).to!(immutabl
(char)[]).to(return immutable(char)[])'
.dub/build/phobos-next-test-library-unittest-linux.posix-x86_64-dmd_2076-8E3DE82DCD52EBF401F6B193205A6068/phobos-next-test-library.
:src/zio.d:function pure nothrow  safe immutable(char)[]
std.conv.textImpl!(immutable(char)[], immutable(char)[], immutable(char)[],
immutable(char)[]).textImpl(immutable(char)[], immutable(char)[],
immutable(char)[]): error: undefined reference to 'pure nothrow  nogc  safe
immutable(char)[] std.conv.to!(immutable(char)[]).to!(immutabl
(char)[]).to(return immutable(char)[])'
.dub/build/phobos-next-test-library-unittest-linux.posix-x86_64-dmd_2076-8E3DE82DCD52EBF401F6B193205A6068/phobos-next-test-library.
:src/zio.d:function pure nothrow  safe immutable(char)[]
std.conv.textImpl!(immutable(char)[], immutable(char)[], immutable(char)[],
immutable(char)[]).textImpl(immutable(char)[], immutable(char)[],
immutable(char)[]): error: undefined reference to 'pure nothrow  nogc  safe
immutable(char)[] std.conv.to!(immutable(char)[]).to!(immutabl
(char)[]).to(return immutable(char)[])'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
dmd failed with exit code 1.

I don't understand what's wrong with the module

https://github.com/nordlow/phobos-next/blob/master/src/zio.d

When I compile it separately I don't get the linker error.

/usr/bin/dmd --version: DMD64 D Compiler v2.076.0-dirty
/usr/bin/dub --version: DUB version 1.5.0, built on Sep  1 2017
Sep 09
parent =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Saturday, 9 September 2017 at 15:41:48 UTC, Nordlöw wrote:
 When I compile it separately I don't get the linker error.

 /usr/bin/dmd --version: DMD64 D Compiler v2.076.0-dirty
 /usr/bin/dub --version: DUB version 1.5.0, built on Sep  1 2017
Making the contents of the module zio.d empty has no effect...
Sep 09