Subject: qmake and gle builds fail needing -lstdc++
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 01/31/2004 05:57:22
qt3-libs's qmake and gle builds fail needing -lstdc++.

For example:

g++ -o qmake project.o property.o main.o makefile.o unixmake2.o unixmake.o
msvc_nmake.o borland_bmake.o mingw_make.o msvc_dsp.o msvc_vcproj.o
option.o winmakefile.o projectgenerator.o metrowerks_xml.o  pbuilder_pbx.o
msvc_objectmodel.o meta.o qstring.o qtextstream.o qiodevice.o qglobal.o
qgdict.o qcstring.o qdatastream.o qgarray.o qbuffer.o qglist.o
qptrcollection.o qfile.o qfile_unix.o qregexp.o qgvector.o qgcache.o
qbitarray.o qdir.o quuid.o qfileinfo_unix.o qdir_unix.o qfileinfo.o
qdatetime.o qstringlist.o qmap.o qconfig.o qunicodetables.o qsettings.o
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status

Mine is located at /usr/gcc3/lib/libstdc++.so.

That directory doesn't seem to be known by g++ which was installed from
gcc3-g++ package.

reed@puget:/usr/pkgsrc/x11/qt3-libs$ g++ -print-search-dirs | grep librari
libraries:
=/usr/bin/../lib/gcc-lib/i386-pc-linux/3.3.2/:/usr/bin/../lib/gcc-lib/:/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.2/:/usr/lib/gcc/i386-pc-linux/3.3.2/:/usr/bin/../lib/gcc-lib/i386-pc-linux/3.3.2/../../../../i386-pc-linux/lib/i386-pc-linux/3.3.2/:/usr/bin/../lib/gcc-lib/i386-pc-linux/3.3.2/../../../../i386-pc-linux/lib/:/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.2/../../../../i386-pc-linux/lib/i386-pc-linux/3.3.2/:/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.2/../../../../i386-pc-linux/lib/:/usr/bin/../lib/gcc-lib/i386-pc-linux/3.3.2/../../../i386-pc-linux/3.3.2/:/usr/bin/../lib/gcc-lib/i386-pc-linux/3.3.2/../../../:/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.2/../../../i386-pc-linux/3.3.2/:/usr/gcc3/lib/gcc-lib/i386-pc-linux/3.3.2/../../../:/lib/i386-pc-linux/3.3.2/:/lib/:/usr/lib/i386-pc-linux/3.3.2/:/usr/lib/

I tried getting qmake to build by adding -lstdc++ and also tried
-L/usr/gcc3/lib -Wl,-R/usr/gcc3/lib -lstdc++ but still received:
/usr/bin/ld: cannot find -lstdc++


As for gle ... it failed with:
checking for IceConnectionNumber in -lICE... yes
checking for glGetError in -lGL... yes
checking for gluNewQuadric in -lGLU... no
configure: error: Cannot find required GLU library
*** Error code 1

config.log had:

configure:9310: cc -o conftest -g -DGLX_GLXEXT_LEGACY -I/usr/include -Wall
-DGLX
_GLXEXT_LEGACY  -I/usr/include  -lXext -L/usr/lib -Wl,-R/usr/lib
conftest.c -lGL
U  -lSM -lICE -lGL  -L/usr/lib -lX11   -lm >&5
/scratch/pkgsrc/graphics/gle/work.puget/.buildlink/lib/libGLU.so:
undefined refe
rence to `operator new[](unsigned)'
/scratch/pkgsrc/graphics/gle/work.puget/.buildlink/lib/libGLU.so:
undefined refe
rence to `vtable for __cxxabiv1::__si_class_type_info'
/scratch/pkgsrc/graphics/gle/work.puget/.buildlink/lib/libGLU.so:
undefined refe
rence to `operator delete(void*)'
/scratch/pkgsrc/graphics/gle/work.puget/.buildlink/lib/libGLU.so:
undefined refe
rence to `__gxx_personality_v0'
/scratch/pkgsrc/graphics/gle/work.puget/.buildlink/lib/libGLU.so:
undefined refe
rence to `__cxa_pure_virtual'
/scratch/pkgsrc/graphics/gle/work.puget/.buildlink/lib/libGLU.so:
undefined refe
rence to `vtable for __cxxabiv1::__class_type_info'
/scratch/pkgsrc/graphics/gle/work.puget/.buildlink/lib/libGLU.so:
undefined refe
rence to `operator delete[](void*)'
/scratch/pkgsrc/graphics/gle/work.puget/.buildlink/lib/libGLU.so:
undefined refe
rence to `vtable for __cxxabiv1::__vmi_class_type_info'
/scratch/pkgsrc/graphics/gle/work.puget/.buildlink/lib/libGLU.so:
undefined refe
rence to `operator new(unsigned)'
collect2: ld returned 1 exit status

My fix for gle was to add LDFLAGS+=              -lstdc++
to graphics/gle/Makefile.




   Jeremy C. Reed
   http://www.reedmedia.net/