Bug 19044 – Linking error: reloc 0: symbol index out of range

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2018-06-30T16:39:14Z
Last change time
2024-12-13T18:59:23Z
Assigned to
No Owner
Creator
Luís Marques
Moved to GitHub: dmd#17868 →

Attachments

IDFilenameSummaryContent-TypeSize
1707bug.zipcode that exhibits the bug; type make to buildapplication/zip3874

Comments

Comment #0 by luis — 2018-06-30T16:39:14Z
Created attachment 1707 code that exhibits the bug; type make to build On macOS (tested on 10.13.5), unzip the attached file and run: $ make dmd -lib -ofbug.a source/openmethods.d source/bug.d dmd -c source/test.d dmd bug.a test.o ld: in bug.a(bug_2f9_1af.o), in section __TEXT,__textcoal_nt reloc 0: symbol index out of range for architecture x86_64 Some other buggy behaviors were observed in the source code before it was reduced that might be related to the same underlying bug. For instance, there was one behavior where an append to an array would throw an out of memory error, suggesting that an absurd allocation amount was request, even though in the corresponding source code that should not have been possible.
Comment #1 by bitworld — 2020-04-20T09:25:18Z
We also have the same problem when building the demo for hunt-http. The error message: Linking... dmd -of.dub/build/server-debug-posix.osx-x86_64-dmd_2091-789ACCFB4E7175AA7E03295664C71631/http-server .dub/build/server-debug-posix.osx-x86_64-dmd_2091-789ACCFB4E7175AA7E03295664C71631/http-server.o ../../.dub/build/default-debug-posix.osx-x86_64-dmd_2091-5E13BCCCBAA4897920B997E7C0DE09B6/libhunt-http.a ../../../hunt-net/.dub/build/default-debug-posix.osx-x86_64-dmd_2091-8715AC4D8BCF54BB913AF1A6B5D68845/libhunt-net.a ../../../hunt/.dub/build/library-debug-posix.osx-x86_64-dmd_2091-D2D93C3E043B34896F959408A5A7FD54/libhunt.a -m64 -g ld: in ../../.dub/build/default-debug-posix.osx-x86_64-dmd_2091-5E13BCCCBAA4897920B997E7C0DE09B6/libhunt-http.a(concurrency_5c25_41b.o), in section __TEXT,__textcoal_nt reloc 2: symbol index out of range clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: linker exited with status 1 Here are the steps: 1. git clone https://github.com/huntlabs/hunt-http.git 2. $ cd examples/HttpDemo 3. $ ./build.sh
Comment #2 by aldacron — 2020-06-26T09:06:23Z
A bounty has been placed on this issue: https://www.flipcause.com/secure/cause_pdetails/ODgxMDc=
Comment #3 by robert.schadek — 2024-12-13T18:59:23Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17868 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB