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
> 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.
*sigh*, I really don't know what I was thinking -- gcc compiling phobos
(not!)
Obviously I don't have a clue of what I'm talking about.
Anyway, so far, I've had just a little success on Gentoo Linux. At first dmd wouldn't run with the error that it couldn't find "libstdc++-libc6.2-2.so.3" so I did a evil thing and sym-linked it to my libc2.3.2.so in /lib. This seemed to fix that problem. Now dmd runs and displays the startup message properly.
I then tried compiling hello.d. But now it complains that it can't open "object.d." This is in the dmd/src/phobos directory. Apparently it can't reach it. I'll fiddle with this a little more I guess. maybe the dmd.conf setting is taking hold?
Later,
John
|
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | "John Reimer" <jjreimer@telus.net> escribió en el mensaje news:pan.2003.05.10.21.00.55.185697@telus.net... | | I then tried compiling hello.d. But now it complains that it can't open | "object.d." This is in the dmd/src/phobos directory. Apparently it can't | reach it. I'll fiddle with this a little more I guess. maybe the dmd.conf | setting is taking hold? | | Later, | | John | I had the same problem. First, dmd.conf looks for dmd/src/phobos under ~, so I had to first change that. Then it didn't work anyway. So I copied dmd.conf to the directory where I was working and it compiled just fine. So I think dmd is looking for dmd.conf in the current directory instead of where it's located. I hated that (and the fact of having separate linking) so I added /dmd/bin to my path, and set DMD to be /dmd. Then I created a small program that, using DMD, called dmd and after that gcc. It's working fine now. ------------------------- Carlos Santander "John Reimer" <jjreimer@telus.net> escribió en el mensaje news:pan.2003.05.10.21.00.55.185697@telus.net... | | I then tried compiling hello.d. But now it complains that it can't open | "object.d." This is in the dmd/src/phobos directory. Apparently it can't | reach it. I'll fiddle with this a little more I guess. maybe the dmd.conf | setting is taking hold? | | Later, | | John | I had the same problem. First, dmd.conf looks for dmd/src/phobos under ~, so I had to first change that. Then it didn't work anyway. So I copied dmd.conf to the directory where I was working and it compiled just fine. So I think dmd is looking for dmd.conf in the current directory instead of where it's located. I hated that (and the fact of having separate linking) so I added /dmd/bin to my path, and set DMD to be /dmd. Then I created a small program that, using DMD, called dmd and after that gcc. It's working fine now. ------------------------- Carlos Santander |
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | In article <b9jhna$d5r$1@digitaldaemon.com>, Walter says... > >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. Could you $ ld -V $ gcc --version on your Redhat system and publish here What version of Redhat ? |
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. |
>
> I had the same problem. First, dmd.conf looks for dmd/src/phobos under ~, so
> I had to first change that. Then it didn't work anyway. So I copied dmd.conf
> to the directory where I was working and it compiled just fine. So I think
> dmd is looking for dmd.conf in the current directory instead of where it's
> located.
> I hated that (and the fact of having separate linking) so I added /dmd/bin
> to my path, and set DMD to be /dmd. Then I created a small program that,
> using DMD, called dmd and after that gcc. It's working fine now.
>
> -------------------------
Thanks Carlos,
I think that's the problem. I'll try moving the dmd.conf for now.
Later,
John
|
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | 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 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. |
>
> I had the same problem. First, dmd.conf looks for dmd/src/phobos under ~, so
> I had to first change that. Then it didn't work anyway. So I copied dmd.conf
> to the directory where I was working and it compiled just fine. So I think
> dmd is looking for dmd.conf in the current directory instead of where it's
> located.
> I hated that (and the fact of having separate linking) so I added /dmd/bin
> to my path, and set DMD to be /dmd. Then I created a small program that,
> using DMD, called dmd and after that gcc. It's working fine now.
>
> -------------------------
> Carlos Santander
Actually, moving the dmd.conf didn't work either. I had to give up on dmd.conf and directly reference the location of the phobos in the dmd command with -I. Apparently, the environment variable can't be set by dmd.conf or read by dmd (correct permissions are in place). Perhaps this is an indirect result of my sym-linking to the libc library?
A few bugs to work out, but it's a start :D.
Later,
John
|
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | "John Reimer" <jjreimer@telus.net> escribió en el mensaje news:pan.2003.05.10.23.21.04.95800@telus.net... | | | Actually, moving the dmd.conf didn't work either. I had to give up on | dmd.conf and directly reference the location of the phobos in the dmd | command with -I. Apparently, the environment variable can't be set by | dmd.conf or read by dmd (correct permissions are in place). Perhaps this | is an indirect result of my sym-linking to the libc library? | | A few bugs to work out, but it's a start :D. | | Later, | John | Like I said: dmd.conf has "-I~/dmd/src/phobos", so you have to change that to where you copied dmd. ------------------------- Carlos Santander "John Reimer" <jjreimer@telus.net> escribió en el mensaje news:pan.2003.05.10.23.21.04.95800@telus.net... | | | Actually, moving the dmd.conf didn't work either. I had to give up on | dmd.conf and directly reference the location of the phobos in the dmd | command with -I. Apparently, the environment variable can't be set by | dmd.conf or read by dmd (correct permissions are in place). Perhaps this | is an indirect result of my sym-linking to the libc library? | | A few bugs to work out, but it's a start :D. | | Later, | John | Like I said: dmd.conf has "-I~/dmd/src/phobos", so you have to change that to where you copied dmd. ------------------------- Carlos Santander |
May 10, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. |
> Like I said: dmd.conf has "-I~/dmd/src/phobos", so you have to change that to where you copied dmd.
Well, actually, no, I shouldn't have to because that's where I installed
DMD. You probably know this already, but the shell replaces the '~' with
the home directory; so, in my case, the tilde should have been
automatically replaced by /home/john for a complete /home/john/dmd/src/phobos.
And I did try replacing the tilde with the absolute directory, and that didn't work. So that's why I concluded there were problems with dmd reading the environment variable (moving dmd.conf around didn't work either).
Later,
John
|
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | "John Reimer" <jjreimer@telus.net> escribió en el mensaje news:pan.2003.05.10.23.57.43.27056@telus.net... | | > Like I said: dmd.conf has "-I~/dmd/src/phobos", so you have to change that | > to where you copied dmd. | | Well, actually, no, I shouldn't have to because that's where I installed | DMD. You probably know this already, but the shell replaces the '~' with | the home directory; so, in my case, the tilde should have been | automatically replaced by /home/john for a complete /home/john/dmd/src/phobos. | | And I did try replacing the tilde with the absolute directory, and that | didn't work. So that's why I concluded there were problems with dmd | reading the environment variable (moving dmd.conf around didn't work | either). | | Later, | | John | Then I'm clueless.... lol. ------------------------- Carlos Santander --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06 |
May 11, 2003 Re: How use dmd under linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Hansen | Here's just a simple summary if the minor problems I ran into. I'm using RedHat Linux 7.3, and gcc version 2.96. I put the dmd directory in my home directory (/home/bill/dmd). - The linux executables neede a chmod +x to execute. - I also got the "can't open object.d" error that results from not finding the dmd.conf file. This went away when I made a local copy. - I also got the bad relocation section name `.rel.data' problem, but also succeeded in linking hello. It took me about 1/2 hour to get through the problems, given the discussion already posted here. Not bad. Bill Manfred Hansen wrote: > 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 |
Copyright © 1999-2021 by the D Language Foundation