www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Using DMD2 on Ubuntu 9.04 x64?

reply Trip Volpe <mraccident gmail.com> writes:
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.
Jan 31 2010
next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"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.
Jan 31 2010
parent reply Trip Volpe <mraccident gmail.com> writes:
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?
Jan 31 2010
parent Travis Boucher <boucher.travis gmail.com> writes:
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.
Feb 01 2010
prev sibling next sibling parent reply Walter Bright <newshound1 digitalmars.com> writes:
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
Jan 31 2010
next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
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
Jan 31 2010
prev sibling next sibling parent "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
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
Feb 01 2010
prev sibling next sibling parent reply Steve Teale <steve.teale britseyeview.com> writes:
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
Feb 01 2010
next sibling parent reply Walter Bright <newshound1 digitalmars.com> writes:
Steve Teale wrote:
 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.
Yes, I have an AMD64. How that would differ as far as dev tool installation from Intel, I have no idea. I'm not even sure what the packages I listed actually install - I just tried them (based on web search inquiries) and they work.
Feb 01 2010
next sibling parent "Vladimir Panteleev" <thecybershadow gmail.com> writes:
On Mon, 01 Feb 2010 22:44:31 +0200, Walter Bright  
<newshound1 digitalmars.com> wrote:

 Steve Teale wrote:
 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.
Yes, I have an AMD64. How that would differ as far as dev tool installation from Intel, I have no idea. I'm not even sure what the packages I listed actually install - I just tried them (based on web search inquiries) and they work.
Possibly related, I filed this issue last year: http://d.puremagic.com/issues/show_bug.cgi?id=3028 (The D 1.0 Ubuntu .deb file is completely broken) -- Best regards, Vladimir mailto:thecybershadow gmail.com
Feb 01 2010
prev sibling parent reply Steve Teale <steve.teale britseyeview.com> writes:
Walter Bright Wrote:

 Steve Teale wrote:
 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.
Yes, I have an AMD64. How that would differ as far as dev tool installation from Intel, I have no idea. I'm not even sure what the packages I listed actually install - I just tried them (based on web search inquiries) and they work.
Sorry Walter, I got my question wrong - probably too late in the day. I guess what I'm asking really is will there be a 32 bit version of D for Ubuntu in the near future, and if so, will it be D2, or D1, or both? Thanks Steve
Feb 02 2010
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Steve Teale wrote:
 Walter Bright Wrote:
 
 Steve Teale wrote:
 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.
Yes, I have an AMD64. How that would differ as far as dev tool installation from Intel, I have no idea. I'm not even sure what the packages I listed actually install - I just tried them (based on web search inquiries) and they work.
Sorry Walter, I got my question wrong - probably too late in the day. I guess what I'm asking really is will there be a 32 bit version of D for Ubuntu in the near future, and if so, will it be D2, or D1, or both? Thanks Steve
32-bit D on 32-bit Ubuntu works. 32-bit D on 64-bit Ubuntu is more problematic (requires the extra packages just discussed). 64-bit D on 64-bit Ubuntu does not exist. 64-bit D on 32-bit Ubuntu may or may not exist, but anyway it doesn't work. :o) Andrei
Feb 02 2010
parent reply grauzone <none example.net> writes:
Andrei Alexandrescu wrote:
 Steve Teale wrote:
 Walter Bright Wrote:

 Steve Teale wrote:
 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.
Yes, I have an AMD64. How that would differ as far as dev tool installation from Intel, I have no idea. I'm not even sure what the packages I listed actually install - I just tried them (based on web search inquiries) and they work.
Sorry Walter, I got my question wrong - probably too late in the day. I guess what I'm asking really is will there be a 32 bit version of D for Ubuntu in the near future, and if so, will it be D2, or D1, or both? Thanks Steve
32-bit D on 32-bit Ubuntu works. 32-bit D on 64-bit Ubuntu is more problematic (requires the extra packages just discussed). 64-bit D on 64-bit Ubuntu does not exist. 64-bit D on 32-bit Ubuntu may or may not exist, but anyway it doesn't work. :o)
64 bit D on amd64 has been reported to work very well with LDC and GDC. I'm not sure what you mean by 64 bit on 32 bits.
 Andrei
Feb 02 2010
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
grauzone wrote:
 Andrei Alexandrescu wrote:
 Steve Teale wrote:
 Walter Bright Wrote:

 Steve Teale wrote:
 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.
Yes, I have an AMD64. How that would differ as far as dev tool installation from Intel, I have no idea. I'm not even sure what the packages I listed actually install - I just tried them (based on web search inquiries) and they work.
Sorry Walter, I got my question wrong - probably too late in the day. I guess what I'm asking really is will there be a 32 bit version of D for Ubuntu in the near future, and if so, will it be D2, or D1, or both? Thanks Steve
32-bit D on 32-bit Ubuntu works. 32-bit D on 64-bit Ubuntu is more problematic (requires the extra packages just discussed). 64-bit D on 64-bit Ubuntu does not exist. 64-bit D on 32-bit Ubuntu may or may not exist, but anyway it doesn't work. :o)
64 bit D on amd64 has been reported to work very well with LDC and GDC.
Sorry! I meant dmd...
 I'm not sure what you mean by 64 bit on 32 bits.
It was a joke. Andrei
Feb 02 2010
prev sibling parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
Steve Teale wrote:

 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
Intel 64 is AMD64. Intel dropped their 64-bit implementation, EM64T, after AMD won. The required packages are the same for both systems. The deb package is stated to be i386, which is not AMD64. You can force the installation by using: dpkg --force-architecture -i dmd.1.043.deb
Feb 02 2010
parent reply retard <re tard.com.invalid> writes:
Tue, 02 Feb 2010 15:23:25 +0000, Jesse Phillips wrote:

 Steve Teale wrote:
 
 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
Intel 64 is AMD64. Intel dropped their 64-bit implementation, EM64T, after AMD won.
That's bullshit, but I guess it doesn't matter, because most software uses the compatible subset of both versions. See: http://en.wikipedia.org/wiki/X86-64#Differences_between_AMD64_and_Intel_64
Feb 02 2010
parent reply Jesse Phillips <jessekphillips+D gamil.com> writes:
retard Wrote:

 Intel 64 is AMD64. Intel dropped their 64-bit implementation, EM64T,
 after AMD won.
That's bullshit, but I guess it doesn't matter, because most software uses the compatible subset of both versions. See: http://en.wikipedia.org/wiki/X86-64#Differences_between_AMD64_and_Intel_64
Yes, there are differences, but the fact remains that Intel had to develop its implementation to mimic AMD64[1]. 1. http://en.wikipedia.org/wiki/X86-64#History_of_Intel_64 "Intel found itself in the position of adopting the architecture which AMD had created as an extension to Intel's own x86 processor line."
Feb 02 2010
parent reply Don <nospam nospam.com> writes:
Jesse Phillips wrote:
 retard Wrote:
 
 Intel 64 is AMD64. Intel dropped their 64-bit implementation, EM64T,
 after AMD won.
That's bullshit, but I guess it doesn't matter, because most software uses the compatible subset of both versions. See: http://en.wikipedia.org/wiki/X86-64#Differences_between_AMD64_and_Intel_64
Yes, there are differences, but the fact remains that Intel had to develop its implementation to mimic AMD64[1]. 1. http://en.wikipedia.org/wiki/X86-64#History_of_Intel_64 "Intel found itself in the position of adopting the architecture which AMD had created as an extension to Intel's own x86 processor line."
Yes, but EM64T _was_ AMD64. That part of your post was wrong. It was Itanium they dropped. I don't think the differences between AMD's AMD64 and Intel's clone of AMD64 are any more significant than the differences between AMD and Intel for 32 bit. Obviously Intel marketing refuses to call it AMD64, but that's what it is. You could call it x86-64 to avoid that issue, but I don't think anyone should ever use the term "Intel64" unless they work for Intel.
Feb 03 2010
parent Jesse Phillips <jessekphillips+D gmail.com> writes:
Don wrote:

 Jesse Phillips wrote:
 retard Wrote:
 
 Intel 64 is AMD64. Intel dropped their 64-bit implementation, EM64T,
 after AMD won.
That's bullshit, but I guess it doesn't matter, because most software uses the compatible subset of both versions. See: http://en.wikipedia.org/wiki/X86-64#Differences_between_AMD64_and_Intel_64
Yes, there are differences, but the fact remains that Intel had to develop its implementation to mimic AMD64[1]. 1. http://en.wikipedia.org/wiki/X86-64#History_of_Intel_64 "Intel found itself in the position of adopting the architecture which AMD had created as an extension to Intel's own x86 processor line."
Yes, but EM64T _was_ AMD64. That part of your post was wrong. It was Itanium they dropped.
Ok, I'll admit that I thought it was called ia-64 but couldn't find a reference to it so grabbed EM64T because it looked close. I guess what I was thinking of was ia-32e though.
Feb 03 2010
prev sibling next sibling parent reply dsimcha <dsimcha yahoo.com> writes:
== 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?
Feb 01 2010
parent Walter Bright <newshound1 digitalmars.com> writes:
dsimcha wrote:
 == 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?
Beats me. Perhaps ask your sys admin?
Feb 01 2010
prev sibling parent Trip Volpe <mraccident gmail.com> writes:
Walter Bright Wrote:
 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 did the trick. Thanks much! :-)
Feb 01 2010
prev sibling parent Gareth Charnock <gareth oerc.ox.ac.uk> writes:
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.
Feb 01 2010