Need help with the dmd package on NixOS

Thomas Mader thomas.mader at gmail.com
Sat May 5 11:22:06 UTC 2018


On Saturday, 5 May 2018 at 00:07:01 UTC, Johannes Loher wrote:
> Am 04.05.2018 um 22:27 schrieb Thomas Mader:
>> [...]
> Here is a demangled version of what you posted:

Here comes the entire demangled output of the Hello World build.
Maybe it has something to do with ModuleInfo?
I also need to skip through changes which might have introduced 
this problem.

hello.o: In function `@safe void 
std.stdio.writeln!(immutable(char)[]).writeln(immutable(char)[])':
hello.d:(.text. at safe void 
std.stdio.writeln!(immutable(char)[]).writeln(immutable(char)[])[@safe void std.stdio.writeln!(immutable(char)[]).writeln(immutable(char)[])]+0x46): undefined reference to `@safe std.stdio.File.LockingTextWriter std.stdio.File.lockingTextWriter()'
hello.d:(.text. at safe void 
std.stdio.writeln!(immutable(char)[]).writeln(immutable(char)[])[@safe void std.stdio.writeln!(immutable(char)[]).writeln(immutable(char)[])]+0x57): undefined reference to `@safe void std.stdio.File.__dtor()'
hello.d:(.text. at safe void 
std.stdio.writeln!(immutable(char)[]).writeln(immutable(char)[])[@safe void std.stdio.writeln!(immutable(char)[]).writeln(immutable(char)[])]+0xa4): undefined reference to `@trusted void std.stdio.File.LockingTextWriter.__aggrDtor()'
hello.o:(.data.DW.ref.__dmd_personality_v0+0x0): undefined 
reference to `__dmd_personality_v0'
hello.o: In function `@safe int std.exception.errnoEnforce!(int, 
"/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/include/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])':
hello.d:(.text. at safe int std.exception.errnoEnforce!(int, 
"/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/include/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])[@safe int std.exception.errnoEnforce!(int, "/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/include/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])]+0x20): undefined reference to `std.exception.ErrnoException.__Class'
hello.d:(.text. at safe int std.exception.errnoEnforce!(int, 
"/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/include/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])[@safe int std.exception.errnoEnforce!(int, "/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/include/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])]+0x5b): undefined reference to `@trusted std.exception.ErrnoException std.exception.ErrnoException.__ctor(immutable(char)[], immutable(char)[], ulong)'
hello.d:(.text. at safe int std.exception.errnoEnforce!(int, 
"/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/include/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])[@safe int std.exception.errnoEnforce!(int, "/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/include/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])]+0x63): undefined reference to `_d_throwdwarf'
hello.o: In function `@safe void 
std.stdio.File.LockingTextWriter.put!(immutable(char)).put(immutable(char))':
hello.d:(.text. at safe void 
std.stdio.File.LockingTextWriter.put!(immutable(char)).put(immutable(char))[@safe void std.stdio.File.LockingTextWriter.put!(immutable(char)).put(immutable(char))]+0x1b): undefined reference to `@property @trusted core.stdc.stdio._IO_FILE* std.stdio.File.LockingTextWriter.handle_()'
hello.d:(.text. at safe void 
std.stdio.File.LockingTextWriter.put!(immutable(char)).put(immutable(char))[@safe void std.stdio.File.LockingTextWriter.put!(immutable(char)).put(immutable(char))]+0x37): undefined reference to `@property @trusted core.stdc.stdio._IO_FILE* std.stdio.File.LockingTextWriter.handle_()'
hello.o: In function `@safe void 
std.stdio.File.LockingTextWriter.put!(char).put(char)':
hello.d:(.text. at safe void 
std.stdio.File.LockingTextWriter.put!(char).put(char)[@safe void 
std.stdio.File.LockingTextWriter.put!(char).put(char)]+0x1b): 
undefined reference to `@property @trusted 
core.stdc.stdio._IO_FILE* 
std.stdio.File.LockingTextWriter.handle_()'
hello.d:(.text. at safe void 
std.stdio.File.LockingTextWriter.put!(char).put(char)[@safe void 
std.stdio.File.LockingTextWriter.put!(char).put(char)]+0x37): 
undefined reference to `@property @trusted 
core.stdc.stdio._IO_FILE* 
std.stdio.File.LockingTextWriter.handle_()'
hello.o: In function `main':
hello.d:(.text.main[main]+0xc): undefined reference to 
`_d_run_main'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(lifetime_68e_482.o):(.data+0x0): undefined reference to `rt.lifetime.__ModuleInfo'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(lifetime_68e_482.o): In function `_d_newclass':
(.text._d_newclass[_d_newclass]+0x35): undefined reference to 
`pure nothrow @nogc core.exception.OutOfMemoryError 
core.exception.staticError!(core.exception.OutOfMemoryError).staticError()'
(.text._d_newclass[_d_newclass]+0x3d): undefined reference to 
`_d_throwdwarf'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(sections_elf_shared_729_640.o): In function `_d_dso_registry':
(.text._d_dso_registry[_d_dso_registry]+0xd1): undefined 
reference to `nothrow @nogc bool 
rt.sections_elf_shared.findDSOInfoForAddr(const(void*), 
core.sys.linux.link.dl_phdr_info*)'
(.text._d_dso_registry[_d_dso_registry]+0x404): undefined 
reference to `void 
rt.minfo.ModuleGroup.sortCtors(immutable(char)[])'
(.text._d_dso_registry[_d_dso_registry]+0x40c): undefined 
reference to `void rt.minfo.ModuleGroup.runCtors()'
(.text._d_dso_registry[_d_dso_registry]+0x414): undefined 
reference to `void rt.minfo.ModuleGroup.runTlsCtors()'
(.text._d_dso_registry[_d_dso_registry]+0x43b): undefined 
reference to `void rt.minfo.ModuleGroup.runTlsDtors()'
(.text._d_dso_registry[_d_dso_registry]+0x443): undefined 
reference to `void rt.minfo.ModuleGroup.runDtors()'
(.text._d_dso_registry[_d_dso_registry]+0x590): undefined 
reference to `pure nothrow @nogc core.exception.OutOfMemoryError 
core.exception.staticError!(core.exception.OutOfMemoryError, 
bool).staticError(bool)'
(.text._d_dso_registry[_d_dso_registry]+0x598): undefined 
reference to `_d_throwdwarf'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(sections_elf_shared_731_4eb.o): In function `nothrow @nogc void rt.sections_elf_shared.scanSegments(ref const(core.sys.linux.link.dl_phdr_info), rt.sections_elf_shared.DSO*)':
(.text.nothrow @nogc void rt.sections_elf_shared.scanSegments(ref 
const(core.sys.linux.link.dl_phdr_info), 
rt.sections_elf_shared.DSO*)[nothrow @nogc void 
rt.sections_elf_shared.scanSegments(ref 
const(core.sys.linux.link.dl_phdr_info), 
rt.sections_elf_shared.DSO*)]+0x1a8): undefined reference to 
`pure nothrow @nogc core.exception.OutOfMemoryError 
core.exception.staticError!(core.exception.OutOfMemoryError, 
bool).staticError(bool)'
(.text.nothrow @nogc void rt.sections_elf_shared.scanSegments(ref 
const(core.sys.linux.link.dl_phdr_info), 
rt.sections_elf_shared.DSO*)[nothrow @nogc void 
rt.sections_elf_shared.scanSegments(ref 
const(core.sys.linux.link.dl_phdr_info), 
rt.sections_elf_shared.DSO*)]+0x1b0): undefined reference to 
`_d_throwdwarf'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(common_7ee_35a.o): In function `nothrow @nogc void* rt.util.container.common.xrealloc(void*, ulong)':
(.text.nothrow @nogc void* 
rt.util.container.common.xrealloc(void*, ulong)[nothrow @nogc 
void* rt.util.container.common.xrealloc(void*, ulong)]+0x51): 
undefined reference to `pure nothrow @nogc 
core.exception.OutOfMemoryError 
core.exception.staticError!(core.exception.OutOfMemoryError, 
bool).staticError(bool)'
(.text.nothrow @nogc void* 
rt.util.container.common.xrealloc(void*, ulong)[nothrow @nogc 
void* rt.util.container.common.xrealloc(void*, ulong)]+0x59): 
undefined reference to `_d_throwdwarf'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(stdio_19cc_58e.o): In function `@property @trusted std.stdio.File std.stdio.trustedStdout()':
(.text. at property @trusted std.stdio.File 
std.stdio.trustedStdout()[@property @trusted std.stdio.File 
std.stdio.trustedStdout()]+0x23): undefined reference to `nothrow 
@safe void std.stdio.File.__postblit()'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(config_61a_69a.o): In function `nothrow @nogc immutable(char)[] rt.config.rt_cmdlineOption(immutable(char)[], scope immutable(char)[] delegate(immutable(char)[]) nothrow @nogc)':
(.text.nothrow @nogc immutable(char)[] 
rt.config.rt_cmdlineOption(immutable(char)[], scope 
immutable(char)[] delegate(immutable(char)[]) nothrow 
@nogc)[nothrow @nogc immutable(char)[] 
rt.config.rt_cmdlineOption(immutable(char)[], scope 
immutable(char)[] delegate(immutable(char)[]) nothrow 
@nogc)]+0x9b): undefined reference to `pure nothrow @nogc @safe 
bool object.__equals!(immutable(char), 
immutable(char)).__equals(immutable(char)[], immutable(char)[])'
(.text.nothrow @nogc immutable(char)[] 
rt.config.rt_cmdlineOption(immutable(char)[], scope 
immutable(char)[] delegate(immutable(char)[]) nothrow 
@nogc)[nothrow @nogc immutable(char)[] 
rt.config.rt_cmdlineOption(immutable(char)[], scope 
immutable(char)[] delegate(immutable(char)[]) nothrow 
@nogc)]+0xc3): undefined reference to `pure nothrow @nogc @safe 
bool object.__equals!(immutable(char), 
immutable(char)).__equals(immutable(char)[], immutable(char)[])'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(config_61c_56c.o): In function `nothrow @nogc immutable(char)[] rt.config.rt_linkOption(immutable(char)[], scope immutable(char)[] delegate(immutable(char)[]) nothrow @nogc)':
(.text.nothrow @nogc immutable(char)[] 
rt.config.rt_linkOption(immutable(char)[], scope 
immutable(char)[] delegate(immutable(char)[]) nothrow 
@nogc)[nothrow @nogc immutable(char)[] 
rt.config.rt_linkOption(immutable(char)[], scope 
immutable(char)[] delegate(immutable(char)[]) nothrow 
@nogc)]+0x80): undefined reference to `pure nothrow @nogc @safe 
bool object.__equals!(immutable(char), 
immutable(char)).__equals(immutable(char)[], immutable(char)[])'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(proxy.o):(.data+0x0): undefined reference to `gc.impl.proto.gc.ProtoGC.__vtbl'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(proxy.o):(.data+0x10): undefined reference to `gc.impl.proto.gc.ProtoGC.__Class'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(gc.o):(.data.rel.ro+0x18): undefined reference to `core.thread.__ModuleInfo'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(gc.o):(.data.rel.ro+0x20): undefined reference to `core.time.__ModuleInfo'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(gc.o):(.data.rel.ro+0x40): undefined reference to `gc.impl.conservative.gc.ConservativeGC.__Class'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(bitop.o):(.data.rel.ro+0x10): undefined reference to `core.cpuid.__ModuleInfo'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(bitop.o):(.data.rel.ro+0x18): undefined reference to `core.cpuid.__ModuleInfo'
/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(spinlock.o):(.data.rel.ro+0x10): undefined reference to `core.thread.__ModuleInfo'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1



More information about the Digitalmars-d mailing list