digitalmars.D - Incompatible libphobos2.a?
- Andre Tampubolon (11/11) Jan 02 2012 I just built both 32 & 64 bit DMD.
- mta`chrono (3/9) Jan 03 2012 Did you compile druntime for 64 bit, too? As libphobos2.a is just an
- Andre Tampubolon (5/17) Jan 03 2012 Ah OK. After I built druntime (both for 32 & 64), dmd works fine.
- Trass3r (31/31) Jan 03 2012 There's another recent thread about this.
- mta`chrono (2/5) Jan 03 2012 Is this going to be official? I'd like to see that in druntime.
- Trass3r (4/10) Jan 03 2012 A pull request would need to be prepared.
I just built both 32 & 64 bit DMD. The 32 bit works fine, but the 64 bit not. I always get this: /usr/bin/ld: skipping incompatible /home/anta40/Digital-Mars/dmd-dev/lib64/libphobos2.a when searching for -lphobos2 Every time I build 64 bit phobos, I always make sure that it is the 64 bit dmd that is being invoked, and I use this command to build: make -f posix.mak MODEL=64 The strange thing is if I just grab 64 bit libphobos2.a from the official DMD distribution, then it'll go fine.
Jan 02 2012
I just built both 32& 64 bit DMD. The 32 bit works fine, but the 64 bit not. I always get this: /usr/bin/ld: skipping incompatible /home/anta40/Digital-Mars/dmd-dev/lib64/libphobos2.a when searching for -lphobos2Did you compile druntime for 64 bit, too? As libphobos2.a is just an archive file, you're able to extract it and check if all containing objs are 64 bit. have a look at the linux "file" command.
Jan 03 2012
Ah OK. After I built druntime (both for 32 & 64), dmd works fine. But previously I didn't build druntime, only dmd and phobos, yet it worked (32 only though). I am confused. On 01/03/2012 05:10 PM, mta`chrono wrote:I just built both 32& 64 bit DMD. The 32 bit works fine, but the 64 bit not. I always get this: /usr/bin/ld: skipping incompatible /home/anta40/Digital-Mars/dmd-dev/lib64/libphobos2.a when searching for -lphobos2Did you compile druntime for 64 bit, too? As libphobos2.a is just an archive file, you're able to extract it and check if all containing objs are 64 bit. have a look at the linux "file" command.
Jan 03 2012
There's another recent thread about this. The makefile is a mess. it doesn't build separate libs. Here's a Linux patch for druntime: diff --git a/posix.mak b/posix.mak index 5fd7fee..9ed2004 100644 --- a/posix.mak +++ b/posix.mak -32,9 +32,9 UDFLAGS=-m$(MODEL) -O -release -nofloat -w -d -Isrc -Iimport -property CFLAGS=-m$(MODEL) -O -OBJDIR=obj +OBJDIR=obj$(MODEL) DRUNTIME_BASE=druntime -DRUNTIME=lib/lib$(DRUNTIME_BASE).a +DRUNTIME=lib/$(MODEL)/lib$(DRUNTIME_BASE).a DOCFMT= and phobos: diff --git a/posix.mak b/posix.mak index e43df37..021fff3 100644 --- a/posix.mak +++ b/posix.mak -75,9 +75,9 MAKEFILE:=$(lastword $(MAKEFILE_LIST)) ifeq (,$(findstring win,$(OS))) - DRUNTIME = $(DRUNTIME_PATH)/lib/libdruntime.a + DRUNTIME = $(DRUNTIME_PATH)/lib/$(MODEL)/libdruntime.a else - DRUNTIME = $(DRUNTIME_PATH)/lib/druntime.lib + DRUNTIME = $(DRUNTIME_PATH)/lib/$(MODEL)/druntime.lib endif
Jan 03 2012
Am 03.01.2012 12:10, schrieb Trass3r:There's another recent thread about this. The makefile is a mess. it doesn't build separate libs. Here's a Linux patch for druntime:Is this going to be official? I'd like to see that in druntime.
Jan 03 2012
On Tuesday, 3 January 2012 at 12:17:06 UTC, mta`chrono wrote:Am 03.01.2012 12:10, schrieb Trass3r:A pull request would need to be prepared. However it's just a quick n dirty fix. And other platforms need to be fixed too.There's another recent thread about this. The makefile is a mess. it doesn't build separate libs. Here's a Linux patch for druntime:Is this going to be official? I'd like to see that in druntime.
Jan 03 2012