View mode: basic / threaded / horizontal-split · Log in · Help
February 01, 2010
Using DMD2 on Ubuntu 9.04 x64?
I installed the DMD2 compiler as per the instructions here: http://www.digitalmars.com/d/2.0/dmd-linux.html

After tweaking the conf file to get it actually working, I tried compiling a simple "hello, world" program. This was the result:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../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

Okay, so I'm guessing this has something to do with the fact that the DMD compiler is 32-bit only, right? I already had to install the 32-bit version of libstdc++ 6 to get it to run in the first place. Does this mean that I need a 32-bit version of the pthread dev libraries? If so, I can't find one in Synaptic. Is there some other place I can find such a thing?

Has anybody else managed to get DMD2 up and running on Ubuntu? It _is_ possible, right?

Any help would be appreciated.
February 01, 2010
Re: Using DMD2 on Ubuntu 9.04 x64?
"Trip Volpe" <mraccident@gmail.com> wrote in message 
news:hk5p4f$2t2$1@digitalmars.com...
>I installed the DMD2 compiler as per the instructions here: 
>http://www.digitalmars.com/d/2.0/dmd-linux.html
>
> After tweaking the conf file to get it actually working, I tried compiling 
> a simple "hello, world" program. This was the result:
>
> /usr/bin/ld: skipping incompatible 
> /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../libpthread.so when searching 
> for -lpthread
> /usr/bin/ld: skipping incompatible 
> /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../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
>
> Okay, so I'm guessing this has something to do with the fact that the DMD 
> compiler is 32-bit only, right? I already had to install the 32-bit 
> version of libstdc++ 6 to get it to run in the first place. Does this mean 
> that I need a 32-bit version of the pthread dev libraries? If so, I can't 
> find one in Synaptic. Is there some other place I can find such a thing?
>
> Has anybody else managed to get DMD2 up and running on Ubuntu? It _is_ 
> possible, right?
>
> Any help would be appreciated.

I haven't gotten into D2 yet, but D1 (DMD) works fine on Ubuntu 9.04 for me.
February 01, 2010
Re: Using DMD2 on Ubuntu 9.04 x64?
Nick Sabalausky Wrote:
> I haven't gotten into D2 yet, but D1 (DMD) works fine on Ubuntu 9.04 for me.
> 

Hm, just tried DMD 1.0, same exact result. Do you have a 32-bit installation of Ubuntu?
February 01, 2010
Re: Using DMD2 on Ubuntu 9.04 x64?
Trip Volpe wrote:
> Has anybody else managed to get DMD2 up and running on Ubuntu? It
> _is_ possible, right?

Here's what I use on Ubuntu 64:

 sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386
 sudo apt-get install gcc-multilib
 sudo apt-get install g++-multilib
February 01, 2010
Re: Using DMD2 on Ubuntu 9.04 x64?
Walter Bright wrote:
> Trip Volpe wrote:
>> Has anybody else managed to get DMD2 up and running on Ubuntu? It
>> _is_ possible, right?
> 
> Here's what I use on Ubuntu 64:
> 
>  sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386
>  sudo apt-get install gcc-multilib
>  sudo apt-get install g++-multilib

That definitely belongs on the installation notes webpage.

Andrei
February 01, 2010
Re: Using DMD2 on Ubuntu 9.04 x64?
Walter Bright wrote:
> Trip Volpe wrote:
>> Has anybody else managed to get DMD2 up and running on Ubuntu? It
>> _is_ possible, right?
> 
> Here's what I use on Ubuntu 64:
> 
>  sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386

That last one is missing a 'c': libc6-dev-i386

>  sudo apt-get install g++-multilib


The commands Walter mention will install the most basic libraries -- the 
ones you need if you're just going to use Phobos and other 'native D' 
libraries.

Another tip is that the 'ia32-libs' package contain 32-bit versions of a 
bunch of libraries (GTK, ALSA, X11, and a *lot* more). Also, try 
searching for packages with names starting with lib32, there are quite a 
few of those as well.

-Lars
February 01, 2010
Re: Using DMD2 on Ubuntu 9.04 x64?
Trip Volpe wrote:
> Nick Sabalausky Wrote:
>> I haven't gotten into D2 yet, but D1 (DMD) works fine on Ubuntu 9.04 for me.
>>
> 
> Hm, just tried DMD 1.0, same exact result. Do you have a 32-bit installation of Ubuntu?

Try the gdc-4.1 package. Its an old ass dmd-fe, but still works well and 
is no hassle to install.
February 01, 2010
Re: Using DMD2 on Ubuntu 9.04 x64?
Yes it is possible and you don't even have to mess about with chroot. I 
think the package you're looking for is ia32-libs. This is my dmd.conf file:

[Environment]

DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import 
-L-L%@P%/../lib -L-L/lib32 -L-L/usr/lib32

I think the important bits are -L-L/lib32 and -L-L/usr/lib32, the other 
three arguments are peculiarities of my set up.



Trip Volpe wrote:
> I installed the DMD2 compiler as per the instructions here: http://www.digitalmars.com/d/2.0/dmd-linux.html
> 
> After tweaking the conf file to get it actually working, I tried compiling a simple "hello, world" program. This was the result:
> 
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../libpthread.so when searching for -lpthread
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../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
> 
> Okay, so I'm guessing this has something to do with the fact that the DMD compiler is 32-bit only, right? I already had to install the 32-bit version of libstdc++ 6 to get it to run in the first place. Does this mean that I need a 32-bit version of the pthread dev libraries? If so, I can't find one in Synaptic. Is there some other place I can find such a thing?
> 
> Has anybody else managed to get DMD2 up and running on Ubuntu? It _is_ possible, right?
> 
> Any help would be appreciated.
February 01, 2010
Re: Using DMD2 on Ubuntu 9.04 x64?
Walter Bright Wrote:

> Trip Volpe wrote:
> > Has anybody else managed to get DMD2 up and running on Ubuntu? It
> > _is_ possible, right?
> 
> Here's what I use on Ubuntu 64:
> 
>   sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386
>   sudo apt-get install gcc-multilib
>   sudo apt-get install g++-multilib

Walter,

Are we still just talking just AMD 64 here? Last time I tried to install the .deb package, the system told m that my Intel core2 64 bit machine was the wrong architecture.

Thanks
Steve
February 01, 2010
Re: Using DMD2 on Ubuntu 9.04 x64?
== Quote from Walter Bright (newshound1@digitalmars.com)'s article
> Trip Volpe wrote:
> > Has anybody else managed to get DMD2 up and running on Ubuntu? It
> > _is_ possible, right?
> Here's what I use on Ubuntu 64:
>   sudo apt-get install gcc-multilib libc6-i386 lib6-dev-i386
>   sudo apt-get install gcc-multilib
>   sudo apt-get install g++-multilib

Is there any way to solve this if you don't have root access?
« First   ‹ Prev
1 2 3
Top | Discussion index | About this forum | D home