digitalmars.D - Need help with the dmd package on NixOS
- Thomas Mader (25/25) May 04 2018 The dmd package on NixOS doesn't work anymore in their master
- Johannes Loher (53/54) May 04 2018 Here is a demangled version of what you posted:
- Thomas Mader (148/151) May 05 2018 Here comes the entire demangled output of the Hello World build.
- Thomas Mader (4/6) May 08 2018 Has anyone tried to compile with glibc 2.27?
- Seb (5/11) May 08 2018 Yep, using 2.27-3 on ArchLinux here and everything builds fine.
- Thomas Mader (25/27) May 09 2018 Since dmd still works correctly on the stable branch I tried to
- Thomas Mader (5/6) May 10 2018 My suspicion about the switch to glibc 2.27 being the problem was
- Thomas Mader (5/9) May 18 2018 Can somebody help me to answer the question from
- Mike Franklin (8/17) May 18 2018 I'm not sure I understand. Does binutils need to be used to
- Johannes Pfau (7/22) May 18 2018 As far as I know, that's correct. GCC-based compilers emit ASM
- Thomas Mader (7/12) May 18 2018 That would be my understanding as well.
- Thomas Mader (6/10) May 19 2018 I found the problem.
The dmd package on NixOS doesn't work anymore in their master branch. They must have changed something in the C environment or something and I don't have a clue what's going on. Building the package succeeds but when I try to build with the newly build binary I get all sorts of linker errors. Maybe someone can give me some hints? Here you see a small piece of the output if I try to build a simple hello world with it. dmd hello.d hello.o: In function `_D3std5stdio__T7writelnTAyaZQnFNfQjZv': hello.d:(.text._D3std5stdio__T7writelnTAyaZQnFNfQjZv[_D3std5stdio__T7writelnTA aZQnFNfQjZv]+0x46): undefined reference to `_D3std5stdio4File17lockingTextWriterMFNfZSQBoQBnQBk17LockingTextWriter' hello.d:(.text._D3std5stdio__T7writelnTAyaZQnFNfQjZv[_D3std5stdio__T7writelnTA aZQnFNfQjZv]+0x57): undefined reference to `_D3std5stdio4File6__dtorMFNfZv' hello.d:(.text._D3std5stdio__T7writelnTAyaZQnFNfQjZv[_D3std5stdio__T7writelnTA aZQnFNfQjZv]+0xa4): undefined reference to `_D3std5stdio4File17LockingTextWriter10__aggrDtorMFNeZv' hello.o:(.data.DW.ref.__dmd_personality_v0+0x0): undefined reference to `__dmd_personality_v0' hello.o: In function `_D3std9exception__T12errnoEnforceTiVAyaa83_2f6e69782f73746f72652f783977667070677a30377a676b733979666e37633936393635776d726c3078642d646d644275696c642d322e3037392e312f696e636c7564652f64322f7374642f737464696f2e64Vmi2877ZQHqFNfiLQHhZi': hello.d:(.text._D3std9exception__T12errnoEnforceTiVAyaa83_2f6e69782f73746f72652f783977667070677a30377a676b733979666e37633936393635776d726c3078642d646d644275696c642d322e3037392e312f696e636c7564652f64322f7374642f737464696f2e64Vmi2877ZQHqFNfiLQHhZi[_D3std9exception__T12errnoEnforceTiVAyaa83_2f6e69782f73746f72652f783977667070677a30377a676b733979666e37633936393635776d726c3078642d646d644275696c642d322e3037392e312f696e636c7564652f64322f7374642f737464696f2e64Vmi2877ZQ qFNfiLQHhZi]+0x20): undefined reference to `_D3std9exception14ErrnoException7__ClassZ' hello.d:(.text._D3std9exception__T12errnoEnforceTiVAyaa83_2f6e69782f73746f72652f783977667070677a30377a676b733979666e37633936393635776d726c3078642d646d644275696c642d322e3037392e312f696e636c7564652f64322f7374642f737464696f2e64Vmi2877ZQHqFNfiLQHhZi[_D3std9exception__T12errnoEnforceTiVAyaa83_2f6e69782f73746f72652f783977667070677a30377a676b733979666e37633936393635776d726c3078642d646d644275696c642d322e3037392e312f696e636c7564652f64322f7374642f737464696f2e64Vmi2877ZQ qFNfiLQHhZi]+0x5b): undefined reference to `_D3std9exception14ErrnoException6__ctorMFNeAyaQdmZCQBxQBwQBp' hello.d:(.text._D3std9exception__T12errnoEnforceTiVAyaa83_2f6e69782f73746f72652f783977667070677a30377a676b733979666e37633936393635776d726c3078642d646d644275696c642d322e3037392e312f696e636c7564652f64322f7374642f737464696f2e64Vmi2877ZQHqFNfiLQHhZi[_D3std9exception__T12errnoEnforceTiVAyaa83_2f6e69782f73746f72652f783977667070677a30377a676b733979666e37633936393635776d726c3078642d646d644275696c642d322e3037392e312f696e636c7564652f64322f7374642f737464696f2e64Vmi2877ZQ qFNfiLQHhZi]+0x63): undefined reference to `_d_throwdwarf' hello.o: In function `_D3std5stdio4File17LockingTextWriter__T3putTyaZQiMFNfyaZv': Thanks in advance Thomas
May 04 2018
Am 04.05.2018 um 22:27 schrieb Thomas Mader:[...]Here is a demangled version of what you posted: dmd hello.d hello.o: In function ` safe void std.stdio.writeln!(immutable(char)[]).writeln(immutable(char)[])': hello.d:(.text. 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. 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. 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. 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. 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. 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))': Unfortunately, I don't have any clue what might be going on...
May 04 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 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. 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. 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. 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/incl de/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])': hello.d:(.text. safe int std.exception.errnoEnforce!(int, "/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/incl de/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])[ safe int std.exception.errnoEnforce!(int, "/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/incl de/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])]+0x20): undefined reference to `std.exception.ErrnoException.__Class' hello.d:(.text. safe int std.exception.errnoEnforce!(int, "/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/incl de/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])[ safe int std.exception.errnoEnforce!(int, "/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/incl de/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. safe int std.exception.errnoEnforce!(int, "/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/incl de/d2/std/stdio.d", 2877uL).errnoEnforce(int, lazy immutable(char)[])[ safe int std.exception.errnoEnforce!(int, "/nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/incl de/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. safe void std.stdio.File.LockingTextWriter.put!(immutable(char)).put(im utable(char))[ safe void std.stdio.File.LockingTextWriter.put!(immutable(char)).put(immu able(char))]+0x1b): undefined reference to ` property trusted core.stdc.stdio._IO_FILE* std.stdio.File.LockingTextWriter.handle_()' hello.d:(.text. safe void std.stdio.File.LockingTextWriter.put!(immutable(char)).put(im utable(char))[ safe void std.stdio.File.LockingTextWriter.put!(immutable(char)).put(immu able(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. 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. 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( ifetime_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_el _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_el _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. (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. (stdio_19cc_58e.o): In function ` property trusted std.stdio.File std.stdio.trustedStdout()': (.text. 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. (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. (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(p oxy.o):(.data+0x0): undefined reference to `gc.impl.proto.gc.ProtoGC.__vtbl' /nix/store/x9wfppgz07zgks9yfn7c96965wmrl0xd-dmdBuild-2.079.1/lib/libphobos2.a(pr xy.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[...]Here is a demangled version of what you posted:
May 05 2018
On Saturday, 5 May 2018 at 11:22:06 UTC, Thomas Mader wrote:I also need to skip through changes which might have introduced this problem.Has anyone tried to compile with glibc 2.27? They switched to 2.27 on Master branch and I suspect that the error has to do with that.
May 08 2018
On Tuesday, 8 May 2018 at 14:45:53 UTC, Thomas Mader wrote:On Saturday, 5 May 2018 at 11:22:06 UTC, Thomas Mader wrote:Yep, using 2.27-3 on ArchLinux here and everything builds fine. - Maybe somewhere there's still an old cache? - Maybe dmd, druntime or phobos aren't checked out at the same version?I also need to skip through changes which might have introduced this problem.Has anyone tried to compile with glibc 2.27? They switched to 2.27 on Master branch and I suspect that the error has to do with that.
May 08 2018
On Friday, 4 May 2018 at 20:27:33 UTC, Thomas Mader wrote:The dmd package on NixOS doesn't work anymore in their master branch.Since dmd still works correctly on the stable branch I tried to examine the differences of libphobos2.a. I switched back to version 2.079.0 on master to have the same version as on stable. First I diffed the outputs of 'ar -t libphobos2.a' but there weren't any differences. But executing 'nm libphobos2.a' results in many errors like: nm: /home/thomad/devel/nixpkgs/result/lib/libphobos2.a(object_1_257.o): no group info for section .text._D6object6Object5opCmpMFCQqZi nm: /home/thomad/devel/nixpkgs/result/lib/libphobos2.a(object_1_257.o): no group info for section .text._D6object6Object5opCmpMFCQqZi nm: object_1_257.o: Bad value nm: /home/thomad/devel/nixpkgs/result/lib/libphobos2.a(object_5_391.o): no group info for section .text._D6object9Interface9__xtoHashFNbNeKxSQBjQBfZm nm: /home/thomad/devel/nixpkgs/result/lib/libphobos2.a(object_5_391.o): no group info for section .text._D6object9Interface9__xtoHashFNbNeKxSQBjQBfZm nm: object_5_391.o: Bad value nm on the static lib of the stable branch has just one error: nm: threadasm.o: no symbols Looking into the output of both nm calls shows that a lot of sections are missing in the static phobos lib on the master branch. The first being object_1_257.o. Now I wonder how something like that is possible.
May 09 2018
On Wednesday, 9 May 2018 at 19:58:48 UTC, Thomas Mader wrote:Now I wonder how something like that is possible.My suspicion about the switch to glibc 2.27 being the problem was wrong. I did a very timeconsuming bisection and found the problem commit to be the one which bumped binutils to 2.30.
May 10 2018
On Friday, 11 May 2018 at 04:27:20 UTC, Thomas Mader wrote:My suspicion about the switch to glibc 2.27 being the problem was wrong. I did a very timeconsuming bisection and found the problem commit to be the one which bumped binutils to 2.30.Can somebody help me to answer the question from https://sourceware.org/bugzilla/show_bug.cgi?id=23199#c4 please. The object is created by the dmd backend but where in the code is binutils used?
May 18 2018
On Friday, 18 May 2018 at 10:28:37 UTC, Thomas Mader wrote:On Friday, 11 May 2018 at 04:27:20 UTC, Thomas Mader wrote:I'm not sure I understand. Does binutils need to be used to generated an object file? My understanding is the DMD creates the object file without the help of binutils. The only time binutils is really called is when it calls `gcc` to do the link at https://github.com/dlang/dmd/blob/b61d1c8989bed54489c9c7eb5acc2e1f4312b8c6/src/dmd/link.d#L157 MikeMy suspicion about the switch to glibc 2.27 being the problem was wrong. I did a very timeconsuming bisection and found the problem commit to be the one which bumped binutils to 2.30.Can somebody help me to answer the question from https://sourceware.org/bugzilla/show_bug.cgi?id=23199#c4 please. The object is created by the dmd backend but where in the code is binutils used?
May 18 2018
On Friday, 18 May 2018 at 11:28:30 UTC, Mike Franklin wrote:On Friday, 18 May 2018 at 10:28:37 UTC, Thomas Mader wrote:As far as I know, that's correct. GCC-based compilers emit ASM code only and leave assembling of the objects files to the 'binutils as' assembler. That's probably the reason they assumed it's a binutils bug. For DMD, binutils is not involved when creating object files. So this is likely a DMD bug. -- JohannesOn Friday, 11 May 2018 at 04:27:20 UTC, Thomas Mader wrote:I'm not sure I understand. Does binutils need to be used to generated an object file? My understanding is the DMD creates the object file without the help of binutils.My suspicion about the switch to glibc 2.27 being the problem was wrong. I did a very timeconsuming bisection and found the problem commit to be the one which bumped binutils to 2.30.Can somebody help me to answer the question from https://sourceware.org/bugzilla/show_bug.cgi?id=23199#c4 please. The object is created by the dmd backend but where in the code is binutils used?
May 18 2018
On Friday, 18 May 2018 at 13:15:35 UTC, Johannes Pfau wrote:As far as I know, that's correct. GCC-based compilers emit ASM code only and leave assembling of the objects files to the 'binutils as' assembler. That's probably the reason they assumed it's a binutils bug. For DMD, binutils is not involved when creating object files. So this is likely a DMD bug.That would be my understanding as well. Probably the problem exists with binutils 2.30 only because it changed the format somehow and the linking of the dmd created object files doesn't work anymore because of this. The object file format created from dmd is not compatible with binutils anymore.
May 18 2018
On Friday, 4 May 2018 at 20:27:33 UTC, Thomas Mader wrote:The dmd package on NixOS doesn't work anymore in their master branch. They must have changed something in the C environment or something and I don't have a clue what's going on.I found the problem. strip in binutils 2.30 is broken. Nix is stripping libs and binaries on installation. The problem will be further analyzed in https://sourceware.org/bugzilla/show_bug.cgi?id=23199
May 19 2018