May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | John Reimer wrote: > On Sat, 10 May 2003 11:48:10 -0700, Walter wrote: > >> This is the kind of thing I was afraid of. I built this thing under Red Hat Linux, and I hoped that all the various linkers would be compatible. I haven't got a clue why that linker complains about the section name. You're saying the result works anyway? >> >> "Manfred Hansen" <manfred@toppoint.de> wrote in message news:b9j706$3d6$1@digitaldaemon.com... >>> Hello, >>> >>> this is what i have done: >>> >>> >>> hansen@hansen-lx:~/d/dmd/src> ./dmd hello.d >>> Linker is not yet completed for this version of DMD Linux >>> >>> hansen@hansen-lx:~/d/dmd/src> gcc -o hello hello.o phobos.a -lpthread /usr/i486-suse-linux/bin/ld: phobos.a(moduleinit.o): bad relocation >> section >>> name `.rel.data' >>> /usr/i486-suse-linux/bin/ld: phobos.a(array.o): bad relocation section >> name >>> `.rel.data' >>> /usr/i486-suse-linux/bin/ld: phobos.a(gcx.o): bad relocation section >>> name `.rel.data' >>> /usr/i486-suse-linux/bin/ld: phobos.a(gcbits.o): bad relocation section >> name >>> `.rel.data' >>> >>> hello.d is from samples. >>> After this i have a working hello programm. >>> But a lot of messages from the linker. >>> >>> The phobos.a have i copied to /usr/lib >>> gcc version 2.95.3 >>> >>> Regards Manfred > > Ouch, this could be tough getting this to work on different linux distributions. But Redhat Linux was a wise choice to start with, I think. Unfortunately multiple Linux distributions are difficult to support with a single binary package without a fair amount of work. Redhat uses RPMs and Gentoo uses portage ebuilds to sort out dependency issues. > > I'll give it a try on Gentoo soon. > > Manfred appears to be using Suse Linux. Yes that's true Suse 8.0 > > Later, > > John |
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | "John Reimer" <jjreimer@telus.net> wrote in message news:pan.2003.05.10.19.09.23.63543@telus.net... > Ouch, this could be tough getting this to work on different linux distributions. But Redhat Linux was a wise choice to start with, I think. Unfortunately multiple Linux distributions are difficult to support with a single binary package without a fair amount of work. Redhat uses RPMs and Gentoo uses portage ebuilds to sort out dependency issues. At least the binaries themselves seem to execute fine. |
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | "John Reimer" <jjreimer@telus.net> wrote in message news:pan.2003.05.10.19.43.23.101335@telus.net... > There was one thing I was wondering. If you are using Redhat Linux, it's likely you are using a more recent version, correct? Maybe 8.0 or 9.0? If so, it's very unlikely that you compiled dmd or phobos using gcc 2.95.3. your probably using gcc 3.1 or 3.2. Manfred's gcc 2.95.3 probably didn't like linking to your gcc 3 compiled phobos (2.95.3 and 3 have a completely different and incompatible ABI). If this is the case, I'd stick to supporting the new gcc 3 compiler. I'm using redhat 7.2 and gcc 2.96. |
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | >
> I'm using redhat 7.2 and gcc 2.96.
Heh, well, I totally miss-guessed. I thought it would be a more recent version. Got to get up to date, Walter, if you're going to be a true Linux convert. ;-D
|
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | >
> At least the binaries themselves seem to execute fine.
Very true. It seems they are all runnable, which is truly excellent.
|
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | So, the question is, why is that a bad name? And why does the linker even care what the section name is? "John Reimer" <jjreimer@telus.net> wrote in message news:pan.2003.05.10.23.06.44.700990@telus.net... > OK, I got dmd working on gentoo linux. > > Basically, I get the same error messages as everyone else with a valid/runnable program "hello": > > the command: > > gcc -o hello hello.o /home/john/dmd/lib/phobos.a -lpthread -lm > > the output: > > /usr/bin/ld: /home/john/dmd/lib/phobos.a(moduleinit.o): bad relocation section name `.rel.data' > /usr/bin/ld: /home/john/dmd/lib/phobos.a(array.o): bad relocation section name `.rel.data' > /usr/bin/ld: /home/john/dmd/lib/phobos.a(gcx.o): bad relocation section name `.rel.data' > /usr/bin/ld: /home/john/dmd/lib/phobos.a(gcbits.o): bad relocation section name `.rel.data' > > Platform: > > Gentoo Linux 1.4rc4: Gaming-kernel-2.4.20-r2 > > ld -V: > > GNU ld version 2.14.90.0.1 20030508 > Supported emulations: > elf_i386 > i386linux > elf_i386_glibc21 > > gcc --version: > > gcc (GCC) 3.2.2 > > Later, > > John > > > |
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | "John Reimer" <jjreimer@telus.net> wrote in message news:pan.2003.05.11.12.18.45.149273@telus.net... > > > > I'm using redhat 7.2 and gcc 2.96. > > Heh, well, I totally miss-guessed. I thought it would be a more recent version. Got to get up to date, Walter, if you're going to be a true Linux > convert. ;-D The linux box I'm using is a cast-off from an old project. |
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | On Sun, 11 May 2003 01:36:25 -0700, Walter wrote:
> So, the question is, why is that a bad name? And why does the linker even care what the section name is?
>
I'll have to take this opportunity to study how the linker works. I know very little about this as of now. I couldn't find anything in the 'ld' documents about the proper format for the relocation section name. It did say that certain formats (a.out and elf) require specific names in order to be valid, though.
Later, John
|
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | On Sun, 11 May 2003 01:36:25 -0700, Walter wrote: > So, the question is, why is that a bad name? And why does the linker even care what the section name is? > I guess in the long run, since the program actually links, the linker doesn't really care what the section name is, but just complains about it for some weird reason, then links away. Strange that my ld complains and yours doesn't. I guess newer ld's have added some "features". I think this has something to do with the linker BFD (which stands for?). Maybe changes to the ld code in newer versions are causing this. http://sources.redhat.com/ml/binutils/2001-01/msg00301.html I guess the BFD libraries are the linkers method for accessing objects and archives in a standard manner across different object formats. http://www.gnu.org/manual/ld-2.9.1/html_chapter/ld_5.html Perhaps you found these links already. I wish I could simply try running your ld on my linux to see how that works. What version of ld are you using? (ld -V) Thanks, John |
Copyright © 1999-2021 by the D Language Foundation