FreeBSD 6 amd64 tweak: Compiling problem: CLASSINFO_SIZE assert

Sean Chittenden sean at arcscale.com
Sun Jan 7 17:48:00 PST 2007


== Quote from Thomas Kuehne (thomas-dloop at kuehne.cn)'s article
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Sean Chittenden schrieb am 2007-01-07:
> > Howdy.  I'm on an amd64 FreeBSD 6.2-rc machine and have been able to get it to compile on FreeBSD6 amd64 with the
following
> > patches.  I haven't conditionalized them inside of the build infrastructure, but am going to likely incorporate them
into
> > my port upgrade to 0.21.  The problem is described below:
> The mainline GDC can currently only produce object code for 32bit
> targets. Personally I'm using a 64bit GDC binary to compile for i686:
> http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D.gnu&artnum=1879

... but... I don't have any 32bit machines anymore, anywhere!  :~]

I'll see if I can dig up some extra boxes that I can reformat and mash on.  If you had to give a thumbnail guess as to what
needed to be done to get X86_64 finished or what the timeframe is on that, would/could you?  I was searching around and
didn't find anything that hinted at where it was on the road map.

If I comment out the assert() in format.d, it finishes compiling successfully, however it fails to link object code.

% gdc hello.d
/usr/local/lib/libgphobos.a(outofmemory.o)(.rodata+0x18):../.././../gcc-4.0-20061228/libphobos/std/outofmemory.d:26:
undefined reference to `_D6object6Object6toHashMFZk'
/usr/local/lib/libgphobos.a(moduleinit.o)(.rodata+0x38):../.././../gcc-4.0-20061228/libphobos/std/moduleinit.d:44:
undefined reference to `_D6object6Object6toHashMFZk'
/usr/local/lib/libgphobos.a(moduleinit.o)(.rodata+0x98):../.././../gcc-4.0-20061228/libphobos/std/moduleinit.d:44:
undefined reference to `_D6object6Object6toHashMFZk'
/usr/local/lib/libgphobos.a(string.o)(.rodata+0x18):../.././../gcc-4.0-20061228/libphobos/std/string.d:64: undefined
reference to `_D6object6Object6toHashMFZk'
/usr/local/lib/libgphobos.a(array.o)(.rodata+0x18):../.././../gcc-4.0-20061228/libphobos/std/array.d:14: undefined
reference to `_D6object6Object6toHashMFZk'
/usr/local/lib/libgphobos.a(utf.o)(.rodata+0x18):../.././../gcc-4.0-20061228/libphobos/std/utf.d:57: more undefined
references to `_D6object6Object6toHashMFZk' follow
Exit 1

Similarly, the make check craps out with something similar:

% make check
gmake[1]: Entering directory `/usr/ports/lang/gdc/work/build/x86_64-portbld-freebsd6.2/libphobos'
/usr/ports/lang/gdc/work/build/gcc/gdc -B/usr/ports/lang/gdc/work/build/gcc/ -B/usr/local/x86_64-portbld-freebsd6.2/bin/ -B/usr/local/x86_64-portbld-freebsd6.2/lib/ -isystem /usr/local/x86_64-portbld-freebsd6.2/include -isystem /usr/local/x86_64-portbld-freebsd6.2/sys-include -o
unittest -O2 -O2 -fno-strict-aliasing -pipe -march=k8 unittest.o -L./ -lgphobos_t -lm  -lc_r
unittest.o(.data+0xf8): In function `_Dmain':
../.././../gcc-4.0-20061228/libphobos/unittest.d:66: undefined reference to `_D3std5boxer12__ModuleInfoZ'
.//libgphobos_t.a(outofmemory.t.o)(.rodata+0x18):../.././../gcc-4.0-20061228/libphobos/std/outofmemory.d:26: undefined
reference to `_D6object6Object6toHashMFZk'
.//libgphobos_t.a(file.t.o)(.rodata+0x58):../.././../gcc-4.0-20061228/libphobos/std/file.d:874: undefined reference to
`_D6object6Object6toHashMFZk'
.//libgphobos_t.a(moduleinit.t.o)(.rodata+0x38):../.././../gcc-4.0-20061228/libphobos/std/moduleinit.d:44: undefined
reference to `_D6object6Object6toHashMFZk'
.//libgphobos_t.a(moduleinit.t.o)(.rodata+0x98):../.././../gcc-4.0-20061228/libphobos/std/moduleinit.d:44: undefined
reference to `_D6object6Object6toHashMFZk'
.//libgphobos_t.a(string.t.o)(.rodata+0x18):../.././../gcc-4.0-20061228/libphobos/std/string.d:64: undefined reference to
`_D6object6Object6toHashMFZk'
.//libgphobos_t.a(math.t.o)(.rodata+0x118):../.././../gcc-4.0-20061228/libphobos/std/math.d:151: more undefined references
to `_D6object6Object6toHashMFZk' follow
collect2: ld returned 1 exit status
gmake[1]: *** [unittest] Error 1
gmake[1]: Leaving directory `/usr/ports/lang/gdc/work/build/x86_64-portbld-freebsd6.2/libphobos'
gmake: *** [check-target-libphobos] Error 2
*** Error code 2


Which leaves inquiring minds curious as to if/when or to suck up a 32bit universe for a while.  Thanks, I know these are
obnoxious questions to have to answer.  *grin*  -sc



More information about the Digitalmars-d mailing list