www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - libpthread linker error

reply dsimcha <dsimcha yahoo.com> writes:
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?
Mar 08 2009
parent reply Walter Bright <newshound1 digitalmars.com> writes:
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.
Mar 08 2009
parent reply dsimcha <dsimcha yahoo.com> writes:
== 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.
Mar 08 2009
parent Lutger <lutger.blijdestijn gmail.com> writes:
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

 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.
Mar 08 2009