D tools build problem
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Tue Feb 11 15:06:21 PST 2014
On 11/02/14 23:33, Joseph Rushton Wakeling wrote:
> On 11/02/14 23:18, Dicebot wrote:
>> On Tuesday, 11 February 2014 at 22:10:21 UTC, Joseph Rushton Wakeling wrote:
>>> Exactly what I thought, but they _have_ been built and they are located in the
>>> right places. That's why I was baffled by the error message.
>>
>> ../dmd/src/dmd -I../druntime/src -I../phobos rdmd.d
>
> Yeah, yeah. :-P I mean I was baffled that the error was occurring and at first
> glance assumed it must be something weirder. Didn't anybody test this?
>
> I'll see if I can knock up a patch ... :-)
I've attached my current patch. It should be possible to apply this to master,
if anyone wants to test it.
It works for everything except the CURL_TOOLS which invariably fail to link with
the error described at the bottom of this email. It looks like a main()
function is absent where one is expected, but my make-fu is not good enough to
understand what's wrong with the relevant lines in the makefile:
################################################################################
#dreadful custom step because of libcurl dmd linking problem (Bugzilla 7044)
$(CURL_TOOLS): $(ROOT)/%: %.d
$(DMD) $(MODEL_FLAG) $(DFLAGS) -c -of$(@).o $(<)
($(DMD) $(MODEL_FLAG) $(DFLAGS) -v -of$(@) $(@).o 2>/dev/null | grep
'\-Xlinker' | cut -f2- -d' ' ; echo -lcurl ) | xargs $(CC)
################################################################################
Note that the $(MODEL_FLAG) $(DFLAGS) entries here are my addition. Absent the
$(DFLAGS) entry the build will fail with the same issue of being unable to find
object.d.
With these flags in place, the following error message is produced:
(../dmd/src/dmd -m64 -I../druntime/import -I../phobos
-L-L../phobos/generated/linux/release/64 -w -v -ofgenerated/linux/64/dget
generated/linux/64/dget.o 2>/dev/null | grep '\-Xlinker' | cut -f2- -d' ' ; echo
-lcurl ) | xargs gcc
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 0 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 1 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 4 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 5 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 6 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 7 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 8 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 9 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 10 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 11 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 12 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 13 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 14 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 15 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 16 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 17 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 18 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info):
relocation 19 has invalid symbol index 21
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_line):
relocation 0 has invalid symbol index 2
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function
`_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [generated/linux/64/dget] Error 123
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Update-posix.mak-to-use-local-recently-built-druntim.patch
Type: text/x-patch
Size: 2210 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140212/fc5845ac/attachment-0001.bin>
More information about the Digitalmars-d-learn
mailing list