PDA

View Full Version : Problem with compile QString issue?



Infintilenewbie
03-22-2002, 12:49 PM
After reading all the FAQ's, installing 3.0.1 rpms, compiling qt-2.3.2.

I have this as my setup.

Mandrake 8.2
Compiled /usr/local/qt-2.3.2 with -thread - worked no errors.
Installed compiler:
gcc-c++-2.96-0.76mdk
gcc3.0-cpp-3.0.1-1mdk
gcc3.0-3.0.1-1mdk
gcc-2.96-0.76mdk
gcc3.0-c++-3.0.1-1mdk
gcc-cpp-2.96-0.76mdk
libgcc3.0-3.0.1-1mdk
lrwxrwxrwx 1 root root 21 Mar 20 06:47 gcc -> /etc/alternatives/gcc*
-rwxr-xr-x 1 root root 86040 Feb 21 16:42 gcc-2.96*
lrwxrwxrwx 1 root root 9 Mar 22 10:44 gcc3 -> gcc-3.0.1*
-rwxr-xr-x 1 root root 75548 Aug 21 2001 gcc-3.0.1*
-rwxr-xr-x 1 root root 23 Aug 21 2001 gcc3-version*

I have pcaps installed, those parts appear fine.

Everything appears to be compiling, till the linking. I get this:

TOP:
Making all in maps
make[2]: Entering directory `/usr/src/RPM/BUILD/showeq-4.0/maps'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/RPM/BUILD/showeq-4.0/maps'
Making all in src
make[2]: Entering directory `/usr/src/RPM/BUILD/showeq-4.0/src'
make all-am
make[3]: Entering directory `/usr/src/RPM/BUILD/showeq-4.0/src'
source='main.cpp' object='main.o' libtool=no \
depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++3 -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/qt-2.3.2/include -I/usr/X11R6/include -DMAPDIR=\"/usr/local/share//showeq\" -DLOGDIR=\"/usr/local/share//showeq\" -I/usr/include/pcap -D_REENTRANT -O2 -Wall -g -ggdb -DDEBUG -finline-functions -DQT_THREAD_SUPPORT=1 -c -o main.o
`test -f main.cpp || echo './'`main.cpp
source='spawn.cpp' object='spawn.o' libtool=no \
depfile='.deps/spawn.Po' tmpdepfile='.deps/spawn.TPo' \
depmode=gcc3 /bin/sh ../depcomp \

IT looks good till this point:
###############################
g++3 -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/qt-2.3.2/include -I/usr/X11R6/include -DMAPDIR=\"/usr/local/share//showeq\" -DLOGDIR=\"/usr/local/share//showeq\" -I/usr/include/pcap -D_REENTRANT -O2 -Wall -g -ggdb -DDEBUG -finline-functions -DQT_THREAD_SUPPORT=1 -c -o gdbmconv.o `test -f gdbmconv.cpp || echo './'`gdbmconv.cpp
/bin/sh ../libtool --mode=link g++3 -D_REENTRANT -O2 -Wall -g -ggdb -DDEBUG -finline-functions -DQT_THREAD_SUPPORT=1 -o showeq main.o spawn.o spawnshell.o spawnlist.o spellshell.o spelllist.o preferences.o m_preferences.o vpacket.o editor.o filter.o m_spawnshell.o m_spawnlist.o m_spellshell.o m_spelllist.o m_editor.o packet.o m_packet.o interface.o m_interface.o compass.o m_compass.o map.o m_map.o util.o experiencelog.o m_experiencelog.o msgdlg.o m_msgdlg.o player.o m_player.o decode.o m_decode.o skilllist.o m_skilllist.o statlist.o m_statlist.o filtermgr.o m_filtermgr.o mapcore.o category.o m_category.o compassframe.o m_compassframe.o group.o
m_group.o itemdb.o gdbmconv.o -L/usr/local/qt-2.3.2/lib -lqt-mt -lpthread -rpath /usr/local/qt-2.3.2/lib -rpath /usr/X11R6/lib -lEQ -lgdbm -lz -lpcap
g++3 -D_REENTRANT -O2 -Wall -g -ggdb -DDEBUG -finline-functions -DQT_THREAD_SUPPORT=1 -o showeq main.o spawn.o spawnshell.o spawnlist.o spellshell.o spelllist.o preferences.o m_preferences.o vpacket.o editor.o filter.o m_spawnshell.o m_spawnlist.o m_spellshell.o m_spelllist.o m_editor.o packet.o m_packet.o interface.o m_interface.o compass.o m_compass.o map.o m_map.o util.o experiencelog.o m_experiencelog.o msgdlg.o m_msgdlg.o player.o m_player.o decode.o m_decode.o skilllist.o m_skilllist.o statlist.o m_statlist.o filtermgr.o m_filtermgr.o mapcore.o category.o m_category.o compassframe.o m_compassframe.o group.o m_group.o itemdb.o gdbmconv.o -L/usr/local/qt-2.3.2/lib -lqt-mt -lpthread -lEQ /usr/local/lib/libgdbm.so -lz -lpcap -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/qt-2.3.2/lib -Wl,--rpath -Wl,/usr/X11R6/lib
main.o: In function `main':
/usr/src/RPM/BUILD/showeq-4.0/src/main.cpp:174: undefined reference to `QString::QString(char
const*)'
main.o: In function `main':
/usr/local/qt-2.3.2/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt-2.3.2/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'
/usr/local/qt-2.3.2/include/qstring.h:643: undefined reference to `QString::shared_null'
/usr/local/qt-2.3.2/include/qstring.h:643: undefined reference to `QString::shared_null'
main.o: In function `main':
/usr/src/RPM/BUILD/showeq-4.0/src/main.cpp:184: undefined reference to `QString::operator=(char const*)'
main.o: In function `main':
/usr/local/qt-2.3.2/include/qstring.h:511: undefined reference to `QString::QString(char const*)'
/usr/local/qt-2.3.2/include/qstring.h:511: undefined reference to `QString::QString(char const*)'
/usr/local/qt-2.3.2/include/qstring.h:511: undefined reference to `QString::latin1() const'
/usr/local/qt-2.3.2/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt-2.3.2/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'
/usr/local/qt-2.3.2/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt-2.3.2/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'
/usr/local/qt-2.3.2/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt-2.3.2/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'
/usr/local/qt-2.3.2/include/qstring.h:511: undefined reference to `QString::QString(char const*)'
/usr/local/qt-2.3.2/include/qstring.h:511: undefined reference to `QString::QString(char const*)'
/usr/local/qt-2.3.2/include/qstring.h:511: undefined reference to `QString::latin1() const'
/usr/local/qt-2.3.2/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt-2.3.2/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'
/usr/local/qt-2.3.2/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt-2.3.2/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'
/usr/local/qt-2.3.2/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt-2.3.2/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'
/usr/local/qt-2.3.2/include/qstring.h:511: undefined reference to `QString::QString(char const*)'
/usr/local/qt-2.3.2/include/qstring.h:511: undefined reference to `QString::QString(char const*)'
/usr/local/qt-2.3.2/include/qstring.h:511: undefined reference to `QString::latin1() const'
/usr/local/qt-2.3.2/include/qstring.h:650: undefined reference to `QString::shared_null'
/usr/local/qt-2.3.2/include/qstring.h:652: undefined reference to `QStringData::deleteSelf()'

Etc... continued for every module it appears it tried to link.


I'm stumped, I've tried 3.0.4 gcc, I've tried qt3.x, this current build is on a very clean mandrake 8.2 install, all disks reformated.

CVS is from a couple days ago?

Any ideas?

thanks!

high_jeeves
03-22-2002, 01:54 PM
You built qt2.3.2 with gcc3? (you sure?) You building ShowEQ with gcc3 at your qt2.3.2? (you sure?) That is generally the cause of this error.

--Jeeves

Infintilenewbie
03-22-2002, 02:47 PM
I'll double check, and recompile qt.

Infintilenewbie
03-22-2002, 02:57 PM
Ok, yes, it didn't use 3.0.1 compiler, I changed the configs, shared entry and it used gcc3.

I got this:
To reconfigure, run make clean and configure.

make[1]: Entering directory `/usr/local/qt-2.3.2'
cd src/moc; make
make[2]: Entering directory `/usr/local/qt-2.3.2/src/moc'
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o mocgen.o mocgen.cpp
y.tab.c: In function `int yyparse()':
y.tab.c:3102: warning: suggest parentheses around assignment used as truth
value
y.tab.c:3150: warning: label `yyerrlab' defined but not used
y.tab.c:3145: warning: label `yynewerror' defined but not used
/usr/local/qt-2.3.2/include/qlist.h: At top level:
mocgen.cpp:3: warning: `char yysccsid[36]' defined but not used
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qbuffer.o ../tools/qbuffer.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qcollection.o ../tools/qcollection.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qcstring.o ../tools/qcstring.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qdatastream.o ../tools/qdatastream.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qdatetime.o ../tools/qdatetime.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qfile.o ../tools/qfile.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qgarray.o ../tools/qgarray.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qgdict.o ../tools/qgdict.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qglist.o ../tools/qglist.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qglobal.o ../tools/qglobal.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qgvector.o ../tools/qgvector.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qiodevice.o ../tools/qiodevice.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qregexp.o ../tools/qregexp.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qstring.o ../tools/qstring.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qtextcodec.o ../tools/qtextcodec.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qtextstream.o ../tools/qtextstream.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qutfcodec.o ../tools/qutfcodec.cpp
g++3 -c -I/usr/local/qt-2.3.2/include -Wno-unused -Wno-parentheses -pipe -O2 -Wall -W -DQT_NO_CODECS -DQT_LITE_UNICODE -I../../include -I../tools -I. -o qfile_unix.o ../tools/qfile_unix.cpp
g++ -o ./moc mocgen.o qbuffer.o qcollection.o qcstring.o qdatastream.o qdatetime.o qfile.o qgarray.o qgdict.o qglist.o qglobal.o qgvector.o qiodevice.o qregexp.o qstring.o qtextcodec.o qtextstream.o qutfcodec.o qfile_unix.o
mocgen.o: In function `yylex()':
mocgen.o(.text+0x3f09): undefined reference to `_Unwind_Resume'
mocgen.o: In function `main':
mocgen.o(.text+0x5559): undefined reference to `_Unwind_Resume'
mocgen.o(.text+0x5579): undefined reference to `_Unwind_Resume'
mocgen.o(.text+0x5599): undefined reference to `_Unwind_Resume'
mocgen.o(.text+0x55b5): undefined reference to `_Unwind_Resume'
mocgen.o(.text+0x55d5): more undefined references to `_Unwind_Resume' follow
mocgen.o: In function `init()':
mocgen.o(.text+0x68f3): undefined reference to `operator new(unsigned)'
mocgen.o(.text+0x6921): undefined reference to `operator delete(void*)'
mocgen.o(.text+0x692e): undefined reference to `operator new(unsigned)'
mocgen.o(.text+0x6981): undefined reference to `operator delete(void*)'
mocgen.o(.text+0x6993): undefined reference to `operator new(unsigned)'
mocgen.o(.text+0x69d0): undefined reference to `operator delete(void*)'
mocgen.o(.text+0x69ed): undefined reference to `operator delete(void*)'
mocgen.o(.text+0x69f9): undefined reference to `_Unwind_Resume'
mocgen.o(.text+0x6a2b): undefined reference to `operator delete(void*)'
mocgen.o(.text+0x6a37): undefined reference to `_Unwind_Resume'
mocgen.o(.text+0x6a61): undefined reference to `operator delete(void*)'
mocgen.o(.text+0x6a6d): undefined reference to `_Unwind_Resume'
mocgen.o: In function `enterNameSpace(char const*)':
mocgen.o(.text+0x6b5e): undefined reference to `operator new(unsigned)'
mocgen.o(.text+0x6b9f): undefined reference to `operator delete(void*)'
mocgen.o(.text+0x6bfb): undefined reference to `operator delete(void*)'
mocgen.o(.text+0x6c07): undefined reference to `_Unwind_Resume'
mocgen.o: In function `nameQualifier()':
mocgen.o(.text+0x6d24): undefined reference to `_Unwind_Resume'
mocgen.o: In function `openNameSpaceForMetaObject(_IO_FILE*)':
mocgen.o(.text+0x6f92): undefined reference to `_Unwind_Resume'
mocgen.o: In function `registerClassInNamespace()':
mocgen.o(.text+0x70c7): undefined reference to `_Unwind_Resume'
mocgen.o: In function `rmWS(char const*)':
mocgen.o(.text+0x7289): undefined reference to `_Unwind_Resume'
mocgen.o: In function `stradd(char const*, char const*)':
mocgen.o(.text+0x752a): undefined reference to `operator new[](unsigned)'
mocgen.o: In function `stradd(char const*, char const*, char const*)':
mocgen.o(.text+0x75c6): undefined reference to `operator new[](unsigned)'
mocgen.o: In function `stradd(char const*, char const*, char const*, char const*)':
mocgen.o(.text+0x7682): undefined reference to `operator new[](unsigned)'
mocgen.o: In function `straddSpc(char const*, char const*)':

etc....
Ending in ..
qutfcodec.o: In function `QUtf8Codec::~QUtf8Codec()':
qutfcodec.o(.gnu.linkonce.t._ZN10QUtf8CodecD0Ev+0x 1a): undefined reference to `operator delete(void*)'
qutfcodec.o: In function `QUtf16Codec::~QUtf16Codec()':
qutfcodec.o(.gnu.linkonce.t._ZN11QUtf16CodecD0Ev+0 x1a): undefined reference to `operator delete(void*)'
qutfcodec.o: In function `QUtf8Decoder::~QUtf8Decoder()':
qutfcodec.o(.gnu.linkonce.t._ZN12QUtf8DecoderD0Ev+ 0x1a): undefined reference to `operator delete(void*)'
qutfcodec.o: In function `QUtf16Encoder::~QUtf16Encoder()':
qutfcodec.o(.gnu.linkonce.t._ZN13QUtf16EncoderD0Ev +0x1a): undefined reference to `operator delete(void*)'
qutfcodec.o: In function `QUtf16Decoder::~QUtf16Decoder()':
qutfcodec.o(.gnu.linkonce.t._ZN13QUtf16DecoderD0Ev +0x1a): undefined reference to `operator delete(void*)'
qutfcodec.o: In function `QUtf8Decoder::toUnicode(char const*, int)':
qutfcodec.o(.gnu.linkonce.t._ZN12QUtf8Decoder9toUn icodeEPKci+0x17d): undefined reference to `_Unwind_Resume'
qutfcodec.o: In function `QUtf16Encoder::fromUnicode(QString const&, int&)':
qutfcodec.o(.gnu.linkonce.t._ZN13QUtf16Encoder11fr omUnicodeERK7QStringRi+0xfb): undefined reference to `_Unwind_Resume'
qutfcodec.o(.gnu.linkonce.t._ZN13QUtf16Encoder11fr omUnicodeERK7QStringRi+0x119): undefined reference to `_Unwind_Resume'
qutfcodec.o: In function `QUtf16Decoder::toUnicode(char const*, int)':
qutfcodec.o(.gnu.linkonce.t._ZN13QUtf16Decoder9toU nicodeEPKci+0x1e7): undefined reference to `_Unwind_Resume'
qutfcodec.o: In function `__FRAME_BEGIN__':
qutfcodec.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
qfile_unix.o: In function `QFile::open(int)':
qfile_unix.o(.text+0x58f): undefined reference to `_Unwind_Resume'
qfile_unix.o: In function `__FRAME_BEGIN__':
qfile_unix.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make[2]: *** [moc] Error 1
make[2]: Leaving directory `/usr/local/qt-2.3.2/src/moc'
make[1]: *** [src-moc] Error 2
make[1]: Leaving directory `/usr/local/qt-2.3.2'
make: *** [init] Error 2

A new error. Any ideas?

thanks

high_jeeves
03-22-2002, 03:09 PM
Dunno.. you did make clean and ./configure, right? Might need to blow away your 2.96 built installation of QT, and rebuild from cleaned source.

--Jeeves

Infintilenewbie
03-22-2002, 03:19 PM
OK, going to try the mandrake source file I found on KDE, edited to get gcc3 as the compiler of choice. It has about 8 patches also, see if that helps.

Infintilenewbie
03-22-2002, 03:31 PM
BTW thanks for the help there, knowing what the error was is helping me get the answer for 8.2 fresh compile. Its working QT no errors now, had to fiddle some more settings out of the specfile, but all the patches for QT2.3.2 applied. Guess its an hour now, wonder if it will compile in the car on the way home. :D

its definitly using g++3 now.


Thanks again.