D - BUG: undefined references, DMD
- Russ Lewis (23/23) May 12 2003 I ran across this on RH 7.2, gcc 2.96 (same as you Walter)
- Walter (1/1) May 12 2003 What is the undefined reference to?
- Russ Lewis (11/11) May 12 2003 _d_switch_string and _d_array_bounds.
- Walter (3/14) May 13 2003 I don't get it. They're in the library, and they're found on my system.
- Russ Lewis (23/42) May 13 2003 I'm confused, too. I can find the symbols with grep. I do get "bad
- Russ Lewis (15/58) May 14 2003 I've tried to build a new libphobos.a from the sources, t osee if that w...
- Walter (10/18) May 14 2003 would
- Russ Lewis (16/35) May 15 2003 Ok, I've been stepping through this thing, trying to link something toge...
- Walter (7/17) May 15 2003 Oops, I think that's the wrong file. I'll try & get the right one.
I ran across this on RH 7.2, gcc 2.96 (same as you Walter) I get "undefined reference" errors when I compile the following code: int main(char[][] argv) { switch(argv[0]) { case "asdf": case "jkl": return 1; case "qwerty": return 2; default: return 0; } } I compiled it with: dmd -c dmd_bug2 cc -lphobos -lpthread dmd_bug2.o -o dmd_bug2 -- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
May 12 2003
_d_switch_string and _d_array_bounds. I originally came across this error when I tried to link my large app (ported from DLI) and got to the linking phase. In that larger app, I have lots (100 or more) of such errors, many of which seem to be link problems to phobos. Some other ones seem to be internally implemented functions, like _aaIn _aaGet _init_TypeInfo_Aa and such. -- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
May 12 2003
I don't get it. They're in the library, and they're found on my system. "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3EC01FA9.59C444B6 deming-os.org..._d_switch_string and _d_array_bounds. I originally came across this error when I tried to link my large app (ported from DLI) and got to the linking phase. In that larger app, I have lots (100 or more) of such errors, many of which seem to be link problems to phobos. Some other ones seem to be internally implemented functions, like _aaIn _aaGet _init_TypeInfo_Aa and such. -- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
May 13 2003
I'm confused, too. I can find the symbols with grep. I do get "bad relocation symbol" warnings, as well. (sigh) I guess I'll copy it all (by hand, unfortunately). On RH7.2, gcc 2.96, I get these errors: dmd_bug2.o: In function '_Dmain': dmd_bug2.o(.gnu.linkonce.t_dmain+0x30): undefined reference to '_d_switch_string' dmd_bug2.o: In function '_array_dmd_bug2': dmd_bug2.o(.gnu.linkonce.t_array_dmd_bug2+0x14): undefined reference to '_d_array_bounds' collect2: ld returned 1 exit status On RH9, gcc 3.2.2, I also get this error (first, before the others): /usr/bin/ld: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libphobos.a(gc.o): bad relocation section name '.rel.gnu.linkonce.t_d_new? ' BTW, /etc/dmd.conf doesn't seem to work for me so far...so I'm having to add -I<phobosPath> to my dmd commands. Walter wrote:I don't get it. They're in the library, and they're found on my system. "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3EC01FA9.59C444B6 deming-os.org...-- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]_d_switch_string and _d_array_bounds. I originally came across this error when I tried to link my large app (ported from DLI) and got to the linking phase. In that larger app, I have lots (100 or more) of such errors, many of which seem to be link problems to phobos. Some other ones seem to be internally implemented functions, like _aaIn _aaGet _init_TypeInfo_Aa and such. -- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
May 13 2003
I've tried to build a new libphobos.a from the sources, t osee if that would clear up the problem. I ran into a couple of problems. * FIXED: the makefile mentions "deh2.d", which doesn't exist, so I deleted it * FIXED: the makefile has the wrong location for DMD, so I changed that to just "dmd" * COULDN'T FIX: outbuffer.d calls vsnprintf, which doesn't seem to be defined in any source file I can find I'm really appreciating your continued hard work, Walter. Russ Russ Lewis wrote:I'm confused, too. I can find the symbols with grep. I do get "bad relocation symbol" warnings, as well. (sigh) I guess I'll copy it all (by hand, unfortunately). On RH7.2, gcc 2.96, I get these errors: dmd_bug2.o: In function '_Dmain': dmd_bug2.o(.gnu.linkonce.t_dmain+0x30): undefined reference to '_d_switch_string' dmd_bug2.o: In function '_array_dmd_bug2': dmd_bug2.o(.gnu.linkonce.t_array_dmd_bug2+0x14): undefined reference to '_d_array_bounds' collect2: ld returned 1 exit status On RH9, gcc 3.2.2, I also get this error (first, before the others): /usr/bin/ld: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libphobos.a(gc.o): bad relocation section name '.rel.gnu.linkonce.t_d_new? ' BTW, /etc/dmd.conf doesn't seem to work for me so far...so I'm having to add -I<phobosPath> to my dmd commands. Walter wrote:-- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]I don't get it. They're in the library, and they're found on my system. "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3EC01FA9.59C444B6 deming-os.org...-- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]_d_switch_string and _d_array_bounds. I originally came across this error when I tried to link my large app (ported from DLI) and got to the linking phase. In that larger app, I have lots (100 or more) of such errors, many of which seem to be link problems to phobos. Some other ones seem to be internally implemented functions, like _aaIn _aaGet _init_TypeInfo_Aa and such. -- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
May 14 2003
"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3EC28DFD.81BF2EE9 deming-os.org...I've tried to build a new libphobos.a from the sources, t osee if thatwouldclear up the problem. I ran into a couple of problems. * FIXED: the makefile mentions "deh2.d", which doesn't exist, so I deletedit All right, but it never tries to add it to libphobos.a!* FIXED: the makefile has the wrong location for DMD, so I changed that tojust"dmd"Ok.* COULDN'T FIX: outbuffer.d calls vsnprintf, which doesn't seem to bedefined inany source file I can findvnsprintf is part of the C runtime library. It should be in c.stdio.dI'm really appreciating your continued hard work, Walter.Thanks!
May 14 2003
Ok, I've been stepping through this thing, trying to link something together. Walter, is this src/phobos the directory you built libphobos.a from? I'm having a heck of a time trying to get things to work. Right now, I'm stuck on deh.c, line 528. I'm getting a few errors. First of all, gcc seems to gripe about that __stdcall modifier; I tried commenting it out and got a little further, but I don't know if we need to leave it in. Then, on line 535, I get "'_EBP' undeclared" Any fixes for these? Thanks again, Russ Walter wrote:"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3EC28DFD.81BF2EE9 deming-os.org...-- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]I've tried to build a new libphobos.a from the sources, t osee if thatwouldclear up the problem. I ran into a couple of problems. * FIXED: the makefile mentions "deh2.d", which doesn't exist, so I deletedit All right, but it never tries to add it to libphobos.a!* FIXED: the makefile has the wrong location for DMD, so I changed that tojust"dmd"Ok.* COULDN'T FIX: outbuffer.d calls vsnprintf, which doesn't seem to bedefined inany source file I can findvnsprintf is part of the C runtime library. It should be in c.stdio.dI'm really appreciating your continued hard work, Walter.Thanks!
May 15 2003
Oops, I think that's the wrong file. I'll try & get the right one. "Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message news:3EC3B859.373C4273 deming-os.org...Ok, I've been stepping through this thing, trying to link somethingtogether.Walter, is this src/phobos the directory you built libphobos.a from? I'mhavinga heck of a time trying to get things to work. Right now, I'm stuck on deh.c, line 528. I'm getting a few errors. Firstofall, gcc seems to gripe about that __stdcall modifier; I tried commentingit outand got a little further, but I don't know if we need to leave it in. Then, on line 535, I get "'_EBP' undeclared" Any fixes for these? Thanks again, Russ
May 15 2003