www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - compile error (linux) help

reply clayasaurus <clayasaurus gmail.com> writes:
hello, i recently switched myself to mepis linux (which is pretty much 
the same as debian) and when i try to compile a simple program i get

dmd hello.d
gcc hello.o -o hello -lphobos -lpthread -lm
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
--- errorlevel 1

does anyone know what causes this? thanks.
Sep 01 2004
parent reply Russ Lewis <spamhole-2001-07-16 deming-os.org> writes:
clayasaurus wrote:
 hello, i recently switched myself to mepis linux (which is pretty much 
 the same as debian) and when i try to compile a simple program i get
 
 dmd hello.d
 gcc hello.o -o hello -lphobos -lpthread -lm
 /usr/bin/ld: crt1.o: No such file: No such file or directory
 collect2: ld returned 1 exit status
 --- errorlevel 1
 
 does anyone know what causes this? thanks.
Looks like you're having trouble finding the libc libraries. 'crt1.o' is a basic part of the C Runtime Library. Do you have the file (or a symlink named this, which points to some other file): /usr/lib/libc.a If you don't have it, you need to get the glibc libraries. I don't know anything about mepis (and little about debian), but on RedHat/Fedora you would have to get a package called "glibc-devel". I've heard of a tool on debian called "apt-get" which helps you get packages. I don't know anything about it, though. If you can't solve this quickly, I would suggest that you confirm that you can compile a C program with gcc. Get that working. If you still can't get D to work, then we can look at that.
Sep 01 2004
next sibling parent clayasaurus <clayasaurus gmail.com> writes:
Russ Lewis wrote:
 clayasaurus wrote:
 
 hello, i recently switched myself to mepis linux (which is pretty much 
 the same as debian) and when i try to compile a simple program i get

 dmd hello.d
 gcc hello.o -o hello -lphobos -lpthread -lm
 /usr/bin/ld: crt1.o: No such file: No such file or directory
 collect2: ld returned 1 exit status
 --- errorlevel 1

 does anyone know what causes this? thanks.
Looks like you're having trouble finding the libc libraries. 'crt1.o' is a basic part of the C Runtime Library. Do you have the file (or a symlink named this, which points to some other file): /usr/lib/libc.a If you don't have it, you need to get the glibc libraries. I don't know anything about mepis (and little about debian), but on RedHat/Fedora you would have to get a package called "glibc-devel". I've heard of a tool on debian called "apt-get" which helps you get packages. I don't know anything about it, though. If you can't solve this quickly, I would suggest that you confirm that you can compile a C program with gcc. Get that working. If you still can't get D to work, then we can look at that.
ok thanks but when i try apt-get install libc6-dev i get error
 libc6-dev: Depends: libc6 (= 2.3.2.ds1-13) but 2.3.2.ds1-16 is to be installed
 E: Broken packages
hrm... well thanks. i'll try to find a way to install it
Sep 01 2004
prev sibling parent clayasaurus <clayasaurus gmail.com> writes:
i fixed my problem with 'apt-get -t unstable install libc6-Dev'
Sep 01 2004