digitalmars.D.learn - Installing DMD on linux
- torhu (9/9) Jul 08 2007 I've put libphobos.a in /usr/lib/.
- Frits van Bommel (3/15) Jul 08 2007 That file is part of the C runtime library, IIRC. Can you successfully
- Anders Bergh (5/6) Jul 08 2007 Try apt-get install build-essential, which will install everything
- torhu (3/9) Jul 08 2007 I have a hard time believing that a default Ubuntu install is unable to
- Frits van Bommel (8/18) Jul 08 2007 Actually, I'm quite sure it is unable to do so (at least every version
- Frits van Bommel (10/12) Jul 08 2007 Though I'm surprised it didn't complain about not having a program named...
- torhu (3/16) Jul 08 2007 Installing build-essentials did the trick. gcc was already installed,
- Anders Bergh (5/7) Jul 08 2007 Just try it. Every time I installed Ubuntu I had to install
- torhu (15/21) Jul 08 2007 I'll try it the next time I boot into ubuntu.
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
Jul 08 2007
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 1That file is part of the C runtime library, IIRC. Can you successfully compile & link C programs with gcc?
Jul 08 2007
On 7/8/07, torhu <fake address.dude> wrote:user ubuntu:~$ dmd test.dTry apt-get install build-essential, which will install everything that's needed to build C applications. -- Anders
Jul 08 2007
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.user ubuntu:~$ dmd test.dTry apt-get install build-essential, which will install everything that's needed to build C applications.
Jul 08 2007
torhu wrote:Anders Bergh 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). 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.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.user ubuntu:~$ dmd test.dTry apt-get install build-essential, which will install everything that's needed to build C applications.
Jul 08 2007
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...
Jul 08 2007
Frits van Bommel wrote:Frits van Bommel wrote:Installing build-essentials did the trick. gcc was already installed, and libc6-dev was not.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...
Jul 08 2007
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
Jul 08 2007
Anders Bergh wrote:On 7/8/07, torhu <fake address.dude> wrote: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. ;)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.
Jul 08 2007