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