www.digitalmars.com         C & C++   DMDScript  

D.gnu - Unresolved symbols when program imports std.regex

reply GrahamC <grahamc001uk yahoo.co.uk> writes:
If I import std.regex in a program, compiling with gdc gives many unresolve=
d symbols, e.g for:=0A=A0 immutable(std.internal.uni.CodepointSet) std.inte=
rnal.uni_tab.unicodeLu=0A=A0 ref  safe std.internal.uni.CodepointSet std.in=
ternal.uni.CodepointSet.add(const(std.internal.uni.CodepointSet))=0Aplus ma=
ny others.=0A=0AIf I include additional modules on the compilation command =
line like this:=0A=0Agdc test.d /opt/gdc/include/d2/4.6.2/std/internal/uni.=
d /opt/gdc/include/d2/4.6.2/std/internal/uni_tab.d=0A=0Awhere test.d is my =
program, all symbols resolve OK.=0A=0ADoes this indicate a problem in the b=
uilding of libgphobos2.a or have I made a mistake in configuring gdc=0Aprio=
r to compiling it ? I don't see any open issues listed for regex on https:/=
/bitbucket.org/goshawk/gdc/issues=0A=0Agdc -v gives:=0AUsing built-in specs=
.=0ACOLLECT_GCC=3Dgdc=0ACOLLECT_LTO_WRAPPER=3D/opt/gdc/libexec/gcc/x86_64-u=
nknown-linux-gnu/4.6.2/lto-wrapper=0ATarget: x86_64-unknown-linux-gnu=0ACon=
figured with: ../configure --enable-languages=3Dd --enable-checking=3Drelea=
se --disable-shared --disable-nls --prefix=3D/opt/gdc --with-bugurl=3Dhttps=
://bitbucket.org/goshawk/gdc/issues --disable-libgomp --disable-libmudflap =
--enable-multilib --enable-nls=0AThread model: posix=0Agcc version 4.6.2 20=
111026 (gdc 0.30, using dmd 2.057) (GCC)=0A=0AMy platform is Linux 3.1.5-6.=
fc16.x86_64=0A
Dec 22 2011
parent reply Trass3r <un known.com> writes:
 If I include additional modules on the compilation command line like  
 this:

 gdc test.d /opt/gdc/include/d2/4.6.2/std/internal/uni.d  
 /opt/gdc/include/d2/4.6.2/std/internal/uni_tab.d

 where test.d is my program, all symbols resolve OK.

 Does this indicate a problem in the building of libgphobos2.a or have I  
 made a mistake in configuring gdc
 prior to compiling it ? I don't see any open issues listed for regex on
Yeah, looks like the phobos lib is missing these. Did you properly update, i.e. with gcc/d/setup-gcc.sh -v2 --update?
Dec 23 2011
next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 23 December 2011 13:40, Trass3r <un known.com> wrote:
 If I include additional modules on the compilation command line like this:

 gdc test.d /opt/gdc/include/d2/4.6.2/std/internal/uni.d
 /opt/gdc/include/d2/4.6.2/std/internal/uni_tab.d

 where test.d is my program, all symbols resolve OK.

 Does this indicate a problem in the building of libgphobos2.a or have I
 made a mistake in configuring gdc
 prior to compiling it ? I don't see any open issues listed for regex on
Yeah, looks like the phobos lib is missing these. Did you properly update, i.e. with gcc/d/setup-gcc.sh -v2 --update?
You should also remove / clean at least the GDC and Phobos directories prior to rebuilding post upgrade too. -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
Dec 23 2011
prev sibling parent GrahamC <grahamc001uk yahoo.co.uk> writes:
 If I include additional modules on the compilation command line like thi=
s:=0A>>=A0=0A>> gdc test.d /opt/gdc/include/d2/4.6.2/std/internal/uni.d /op= t/gdc/include/d2/4.6.2/std/internal/uni_tab.d=0A>>=A0=0A>> where test.d is = my program, all symbols resolve OK.=0A>>=A0=0A>> Does this indicate a probl= em in the building of libgphobos2.a or have I made a mistake in configuring= gdc=0A>> prior to compiling it ? I don't see any open issues listed for re= gex on=0A=0A> Yeah, looks like the phobos lib is missing these.=0A> Did you= properly update, i.e. with gcc/d/setup-gcc.sh -v2 --update?=0A=0A=0A=0AYes= , I did this, I notice there are two modules named uni.d :=0A=0A./d/phobos2= /std/internal/uni.d=0A./d/phobos2/std/uni.d=0A=0A=0AIf I manually compile a= nd add the first to libgphobos2.a I have to rename the .o file first to pre= vent it overwriting=0Athe object module of the latter one. So maybe this is= the problem in the library build process - only one of them=0Aends up in t= he library.
Dec 23 2011