View mode: basic / threaded / horizontal-split · Log in · Help
March 09, 2009
libpthread linker error
Can any Linux guru please help me decipher the following inscrutable error
message encountered when trying to build hello world on a Linux cluster that I
don't have admin privileges to:

dsimcha@canton:~$  dmd/linux/bin/dmd hello.d
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../libpthread.so when searching for
-lpthread
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../libpthread.a when searching for
-lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for
-lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for
-lpthread
/usr/bin/ld: cannot find -lpthread
collect2: ld returned 1 exit status
--- errorlevel 1

The DMD version is 2.026.  An identical error message occurs on D 1.041.  I
know the Linux distro on this cluster is fairly new since the kernel is
2.6.27, but that's about it.  For all I know, a trained monkey could have set
the stupid thing up.  Any suggestions on where to start troubleshooting
something like this?
March 09, 2009
Re: libpthread linker error
Looks like you're trying to link with the 64 bit library when you need 
the 32 bit one. x86_64 means 64 bits. The 32 bit versions may not be 
installed.
March 09, 2009
Re: libpthread linker error
== Quote from Walter Bright (newshound1@digitalmars.com)'s article
> Looks like you're trying to link with the 64 bit library when you need
> the 32 bit one. x86_64 means 64 bits. The 32 bit versions may not be
> installed.

Duh, didn't notice that x86_64 in there.  Good call.  I guess I should nag the
sysadmin to install the 32-bit versions.  Thanks.
March 09, 2009
Re: libpthread linker error
dsimcha wrote:

> == Quote from Walter Bright (newshound1@digitalmars.com)'s article
>> Looks like you're trying to link with the 64 bit library when you need
>> the 32 bit one. x86_64 means 64 bits. The 32 bit versions may not be
>> installed.
> 
> Duh, didn't notice that x86_64 in there.  Good call.  I guess I should nag 
the
> sysadmin to install the 32-bit versions.  Thanks.

For whatever reason, with some distro's they are installed but not on the 
linker path by default.
Top | Discussion index | About this forum | D home