Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
July 08, 2007 Installing DMD on linux | ||||
---|---|---|---|---|
| ||||
I've put libphobos.a in /usr/lib/. I've installed everything else in ~/dmd, and added it to PATH. when trying to compile something, I get this: user@ubuntu:~$ dmd test.d gcc test.o -o test -m32 -Xlinker -L/home/user/dmd/bin/../lib -lphobos -lpthread -lm /usr/bin/ld: crt1.o: No such file: No such file or directory collect2: ld returned 1 exit status --- errorlevel 1 |
July 08, 2007 Re: Installing DMD on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to torhu | torhu wrote:
> I've put libphobos.a in /usr/lib/.
>
> I've installed everything else in ~/dmd, and added it to PATH.
>
> when trying to compile something, I get this:
>
> user@ubuntu:~$ dmd test.d
> gcc test.o -o test -m32 -Xlinker -L/home/user/dmd/bin/../lib -lphobos -lpthread -lm
> /usr/bin/ld: crt1.o: No such file: No such file or directory
> collect2: ld returned 1 exit status
> --- errorlevel 1
That file is part of the C runtime library, IIRC. Can you successfully compile & link C programs with gcc?
|
July 08, 2007 Re: Installing DMD on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to torhu | On 7/8/07, torhu <fake@address.dude> wrote: > user@ubuntu:~$ dmd test.d Try apt-get install build-essential, which will install everything that's needed to build C applications. -- Anders |
July 08, 2007 Re: Installing DMD on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders Bergh | Anders Bergh wrote:
> On 7/8/07, torhu <fake@address.dude> wrote:
>> user@ubuntu:~$ dmd test.d
>
> Try apt-get install build-essential, which will install everything
> that's needed to build C applications.
>
I have a hard time believing that a default Ubuntu install is unable to build C applications. So the problem has to be something else.
|
July 08, 2007 Re: Installing DMD on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to torhu | torhu wrote:
> Anders Bergh wrote:
>> On 7/8/07, torhu <fake@address.dude> wrote:
>>> user@ubuntu:~$ dmd test.d
>>
>> Try apt-get install build-essential, which will install everything
>> that's needed to build C applications.
>>
>
> I have a hard time believing that a default Ubuntu install is unable to build C applications. So the problem has to be something else.
Actually, I'm quite sure it is unable to do so (at least every version I've tried, which doesn't include 7.04). IIRC the reasoning is that "normal users" don't need to compile stuff, so they're one of the few Linux distributions (AFAIK) that don't install a full build environment by default.
If you haven't installed build-essential (or at least the relevant packages on which it depends) I suggest you try that.
|
July 08, 2007 Re: Installing DMD on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frits van Bommel | Frits van Bommel wrote:
> Actually, I'm quite sure it is unable to do so (at least every version I've tried, which doesn't include 7.04).
Though I'm surprised it didn't complain about not having a program named 'gcc' if this was your problem. Did you install that manually?
(I have a hard time believing they'd add gcc to the default install but forgot the C library)
If you've installed gcc manually (apt-get install gcc) you may have forgotten to also install libc6-dev (which is recommended when installing gcc, but not a requirement -- though you'll need it in pretty much any normal program).
Installing build-essential should make sure you didn't miss anything else...
|
July 08, 2007 Re: Installing DMD on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to torhu | On 7/8/07, torhu <fake@address.dude> wrote: > I have a hard time believing that a default Ubuntu install is unable to > build C applications. So the problem has to be something else. Just try it. Every time I installed Ubuntu I had to install build-essential for compiling to work. -- Anders |
July 08, 2007 Re: Installing DMD on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders Bergh | Anders Bergh wrote:
> On 7/8/07, torhu <fake@address.dude> wrote:
>> I have a hard time believing that a default Ubuntu install is unable to
>> build C applications. So the problem has to be something else.
> Just try it. Every time I installed Ubuntu I had to install
> build-essential for compiling to work.
>
I'll try it the next time I boot into ubuntu.
I'm actually using wubi-installer.org, which I'm quite happy with. Almost hassle-free linux/windows multiboot, it doesn't touch the MBR or partition tables at all.
I spent four hours trying to get vmware player and vmware server to work properly. Not a pleasant experience, and it installs some stuff that slows down windows startup a lot. I just need linux for testing cross-platform code and build systems.
Someone should file a bug telling Walter to fix the linux DMD install instructions. Just putting softlinks in /urs/local/bin does not work, because dmd won't find the phobos source that way. Either dmd.conf has to be fixed, or you have to put dmd/bin in your path instead of softlinking. I'm just mentioning it, in case someone feels like taking on that crusade. ;)
|
July 08, 2007 Re: Installing DMD on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frits van Bommel | Frits van Bommel wrote:
> Frits van Bommel wrote:
>> Actually, I'm quite sure it is unable to do so (at least every version I've tried, which doesn't include 7.04).
>
> Though I'm surprised it didn't complain about not having a program named 'gcc' if this was your problem. Did you install that manually?
> (I have a hard time believing they'd add gcc to the default install but forgot the C library)
> If you've installed gcc manually (apt-get install gcc) you may have forgotten to also install libc6-dev (which is recommended when installing gcc, but not a requirement -- though you'll need it in pretty much any normal program).
> Installing build-essential should make sure you didn't miss anything else...
Installing build-essentials did the trick. gcc was already installed, and libc6-dev was not.
|
Copyright © 1999-2021 by the D Language Foundation