Subject: Re: libstdc++ problems on Linux
To: Ben Collver <>
From: Louis Guillaume <>
List: tech-pkg
Date: 04/21/2004 01:22:43
>> sed < > -e 's,^\(libdir.*\)/.,\1,'

This workaround seems to have fixed many problems. Both qt3-libs and 
qt3-tools compiled without a hitch, whereas before there were problems.

But the arts package still has linking problems. It seems to be unable 
to find certain Arts:: classes....

.libs/artscbackend.o(.gnu.linkonce.t._ZN8ReceiverD0Ev+0x22c): In 
function `Receiver::~Receiver [in-charge deleting]()':
: warning: undefined reference to `Arts::Object_base::~Object_base 
.libs/artscbackend.o(.gnu.linkonce.t._ZN8Receiver4readEPhi+0x171): In 
function `Receiver::read(unsigned char*, int)':
: warning: undefined reference to `Arts::Dispatcher::the()'
.libs/artscbackend.o(.gnu.linkonce.t._ZN8Receiver4readEPhi+0x1e5): In 
function `Receiver::read(unsigned char*, int)':
: warning: undefined reference to `Arts::Dispatcher::the()'

... Then it eventually fails as shown below. I have no idea how to fix 
this. Any help would be great. This package compiles just fine on 
NetBSD, so I suspect it's a buildlink on Linux problem...

make[2]: Entering directory `/usr/pkgsrc/audio/arts/work/arts-1.2.2/qtmcop'
/usr/pkg/qt3/bin/moc ./qiomanager_p.h -o qiomanager_p.moc
if /bin/sh ../libtool --silent --mode=compile --tag=CXX g++ 
-DHAVE_CONFIG_H -I. -I. -I.. -I../mcop -I/usr/pkg/include 
-I/usr/pkg/qt3/include -I/usr/pkg/X11R6/include  -I/usr/pkg/include 
-I/usr/pkg/X11R6/include -I../libltdl -I/usr/pkg/qt3/include 
-DQT_THREAD_SUPPORT -I/usr/pkg/include -I/usr/pkg/qt3/include 
-DGLX_GLXEXT_LEGACY -I/usr/include -I/usr/pkg/include/freetype2 
-D_REENTRANT -pthread -I/usr/pkg/include/glib/glib-2.0 
-I/usr/pkg/lib/glib-2.0/include    -Wnon-virtual-dtor -Wno-long-long 
-Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align 
-Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings 
-DNDEBUG -DNO_DEBUG -O2 -O2 -I/usr/pkg/include -I/usr/pkg/qt3/include 
-DGLX_GLXEXT_LEGACY -I/usr/include -I/usr/pkg/include/freetype2 
-Wformat-security -Wmissing-format-attribute -fno-exceptions 
-fno-check-new -fno-common  -ftemplate-depth-99  -MT qiomanager.lo -MD 
-MP -MF ".deps/qiomanager.Tpo" -c -o qiomanager.lo; \
then mv -f ".deps/qiomanager.Tpo" ".deps/qiomanager.Plo"; else rm -f 
".deps/qiomanager.Tpo"; exit 1; fi
/bin/sh ../libtool --silent --mode=link --tag=CXX g++ 
-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O2 
-I/usr/pkg/include -I/usr/pkg/qt3/include -DGLX_GLXEXT_LEGACY 
-I/usr/include -I/usr/pkg/include/freetype2 -Wformat-security 
-Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common 
-ftemplate-depth-99   -L/usr/pkg/qt3/lib -L/usr/pkg/lib 
-Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/qt3/lib -L/usr/lib -Wl,-R/usr/lib 
-L/usr/pkg/X11R6/lib -Wl,-R/usr/pkg/X11R6/lib -o -rpath 
/usr/pkg/lib -no-undefined -Wl,--no-undefined 
-Wl,--allow-shlib-undefined -version-info 1:0   -L/usr/pkg/qt3/lib 
-L/usr/pkg/qt3/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib 
-Wl,-R/usr/pkg/qt3/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/X11R6/lib 
-Wl,-R/usr/pkg/X11R6/lib -L/usr/pkg/X11R6/lib qiomanager.lo 
../mcop/ -lqt-mt  -lz -lpng -lz -lm -lXext -lX11  -lSM -lICE 
shlibtool: link: warning: 
seems to be moved
grep: /usr/pkgsrc/audio/arts/work/.buildlink/lib/ No such 
file or directory
/bin/sed: can't read 
/usr/pkgsrc/audio/arts/work/.buildlink/lib/ No such file or 
shlibtool: link: 
`/usr/pkgsrc/audio/arts/work/.buildlink/lib/' is not a valid 
libtool archive
make[2]: *** [] Error 1

Ben Collver wrote:

> If you are using Slackware 9.1, you might have run into the same problem I
> have.  Here is a brute force workaround:
> 1)
> Remove all your packages that have libtool libraries that depend on libstdc++.
> 2)
> cd /usr/lib
> cp
> sed < > -e 's,^\(libdir.*\)/.,\1,'
> 3)
> Rebuild the packages that you removed.
> Cheers,
> Ben
> On Wed, Apr 14, 2004 at 01:27:47AM -0400, Louis  Guillaume wrote:
>>I've been having some terrible problems compiling various packages, 
>>appartently due to some kind of buildlink/libstdc++ problems.
>>This is on Slackware.
>>Either the build will fail at some point because it can't find 
>><package>/work/.buildlink/lib/ or there are really verbose 
>>"undefined reference" warnings or both.
>>Is there some secret to get buildlink and libstdc++ to play nice?
>>I'm trying to get meta-pkgs/kde3 built for Linux and it doesn't get very 
>>far. I've been able to get qt3-libs and qt3-tools to build. I'm not sure 
>>I can trust these builds, however, because of some "undefined reference" 
>>warnings. There's no testing either, because arts won't build for the 
>>same problem.
>>These slackware packages are installed...
>>$ ls /var/adm/packages|grep gcc
>>... I kind of expected those to handle these issues. It seems that 
>>sometimes buildlink is able to make itself aware of and 
>>sometimes it isn't, perhaps depending on the package.
>>For some reason, though these problems don't exist on NetBSD, so I don't 
>>believe I can blame buildlink.
>>It would appear that I'm missing something important to get things 
>>working smoothly on Linux. Any help would be greatly appreciated.

Louis Guillaume
Administrative Systems
Berklee College of Music