Thread overview
compile error (linux) help
Sep 01, 2004
clayasaurus
Sep 01, 2004
Russ Lewis
Sep 01, 2004
clayasaurus
Sep 01, 2004
clayasaurus
September 01, 2004
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.
September 01, 2004
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.

September 01, 2004
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
September 01, 2004
i fixed my problem with 'apt-get -t unstable install libc6-Dev'