Thread overview | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 10, 2003 How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
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 |
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Hansen | 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 |
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <walter@digitalmars.com> escribió en el mensaje news:b9jhna$d5r$1@digitaldaemon.com... | 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 | | I got exactly the same (gcc 3.. I don't remember, Mandrake 9) but it works fine. ————————————————————————— Carlos Santander "Walter" <walter@digitalmars.com> escribió en el mensaje news:b9jhna$d5r$1@digitaldaemon.com... | 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 | | I got exactly the same (gcc 3.. I don't remember, Mandrake 9) but it works fine. ————————————————————————— Carlos Santander |
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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.
Later,
John
|
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | I should mention, though, that the above problem doesn't look like a dependency issue, I guess. |
May 10, 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.13.15.368645@telus.net... > I should mention, though, that the above problem doesn't look like a dependency issue, I guess. I'm a newbee with linux, so any clues you guys can come up will help. I tried googling on the error message, but didn't come up with much. |
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | On Sat, 10 May 2003 12:23:43 -0700, Walter wrote:
>
> "John Reimer" <jjreimer@telus.net> wrote in message news:pan.2003.05.10.19.13.15.368645@telus.net...
>> I should mention, though, that the above problem doesn't look like a dependency issue, I guess.
>
> I'm a newbee with linux, so any clues you guys can come up will help. I tried googling on the error message, but didn't come up with much.
Well, you can count on that. I'm sure many people want to see it on linux enough to help wherever possible. I know I do. I'm no Linux expert, but I love messing with it.
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.
Although this is a little over my head, so I'm not quite sure. I may be just confusing the issue. I think there are some gcc experts on this list, so I had better lay low on this issue.
Later,
John
|
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | On Sat, 10 May 2003 12:43:23 -0700, John Reimer wrote:
> On Sat, 10 May 2003 12:23:43 -0700, Walter wrote:
>
>>
>> "John Reimer" <jjreimer@telus.net> wrote in message news:pan.2003.05.10.19.13.15.368645@telus.net...
>>> I should mention, though, that the above problem doesn't look like a dependency issue, I guess.
>>
>> I'm a newbee with linux, so any clues you guys can come up will help. I tried googling on the error message, but didn't come up with much.
>
> Well, you can count on that. I'm sure many people want to see it on linux enough to help wherever possible. I know I do. I'm no Linux expert, but I love messing with it.
>
> 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.
>
> Although this is a little over my head, so I'm not quite sure. I may be just confusing the issue. I think there are some gcc experts on this list, so I had better lay low on this issue.
>
> Later,
>
> John
Oops, perhaps that isn't it after all. Looks like Carlos is using gcc 3.x and he appears to have the same problem.
Later,
John
|
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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? > Works for me: $ gcc -o hello hello.o phobos.a -lpthread /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: phobos.a(moduleinit.o): bad relocation section name `.rel.data' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: phobos.a(array.o): bad relocation section name `.rel.data' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: phobos.a(gcx.o): bad relocation section name `.rel.data' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: phobos.a(gcbits.o): bad relocation section name `.rel.data' $ ./hello hello world args.length = 1 args[0] = './hello' Using: $ ld -V GNU ld version 2.13.90.0.20 20030409 Supported emulations: elf_i386 i386linux elf_i386_glibc21 |
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Garen Parham | Garen Parham wrote: > > 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? > > > > Works for me: > > $ gcc -o hello hello.o phobos.a -lpthread > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: phobos.a(moduleinit.o): bad relocation section name `.rel.data' > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: phobos.a(array.o): bad relocation section name `.rel.data' > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: phobos.a(gcx.o): bad relocation section name `.rel.data' > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: phobos.a(gcbits.o): bad relocation section name `.rel.data' > > $ ./hello > hello world > args.length = 1 > args[0] = './hello' > > Using: > > $ ld -V > GNU ld version 2.13.90.0.20 20030409 > Supported emulations: > elf_i386 > i386linux > elf_i386_glibc21 It's exactly the same with me. I'm using - Suse Linux 8.0 - gcc 2.95.3 - GNU ld version 2.11.92.0.10 20011021 (SuSE) Supported emulations: elf_i386 i386linux I googled this (don't no nothing about Unix linking) <http://www.cs.utah.edu/classes/cs4400/lectures/new-L15x2.pdf> <http://www.linuxjournal.com/article.php?sid=6463> -- Helmut Leitner leitner@hls.via.at Graz, Austria www.hls-software.com |
Copyright © 1999-2021 by the D Language Foundation