This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Trouble compiling 2.0b1/svn

Tags: None
(comma "," separated)
Belgabor
Registered Member
Posts
7
Karma
0

Trouble compiling 2.0b1/svn

Sun Jun 18, 2006 2:13 am
Hi guys,

I'm trying to compile ktorrent on my server (Gentoo), but both current svn and 2.0b1 give me a linker error in the upnp plugin. I'm not terribly experienced in linux programming, so I unfortunately have no idea where to poke to make it work...
Code: Select all
Making all in upnp
make[4]: Entering directory `/var/tmp/portage/ktorrent-svn-2.0/work/ktorrent-svn-2.0/ktorrent/plugins/upnp'
/bin/sh ../../../libtool --silent --mode=link --tag=CXX i686-pc-linux-gnu-g++  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -march=pentium2 -O3 -pipe -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -fexceptions     -o ktupnpplugin.la -rpath /usr/lib/kde3 -module -avoid-version -module -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -R /usr/lib -R /usr/kde/3.5/lib -R /usr/qt/3/lib -R /usr/lib -R /usr/kde/3.5/lib  -L/usr/kde/3.5/lib -L/usr/qt/3/lib -L/usr/lib    -L/usr/kde/3.5/lib upnpplugin.lo upnpprefpage.lo upnpprefwidget.lo upnpwidget.lo upnppluginsettings.lo libktupnp.la -lkparts ../../libktorrent/libktorrent.la -lqt-mt  -lz -lpng -lz -lm -lXext -lX11  -lSM -lICE -lpthread -lkdecore -lkdeui -lkio
.libs/upnpprefwidget.o: In function `kt::UPnPPrefWidget::~UPnPPrefWidget()':
upnpprefwidget.cpp:(.text+0x854): undefined reference to `__cxa_get_exception_ptr'
.libs/upnpprefwidget.o: In function `kt::UPnPPrefWidget::~UPnPPrefWidget()':
upnpprefwidget.cpp:(.text+0xb39): undefined reference to `__cxa_get_exception_ptr'
.libs/upnpprefwidget.o: In function `kt::UPnPPrefWidget::~UPnPPrefWidget()':
upnpprefwidget.cpp:(.text+0xe19): undefined reference to `__cxa_get_exception_ptr'
collect2: ld returned 1 exit status

(Note: this is from a second run, so the compilation messages are missing)
George
Moderator
Posts
5421
Karma
1

Sun Jun 18, 2006 3:33 pm
Some googling shows that __cxa_get_exception_ptr is part of libstdc++. Maybe you have an old version of that library.

See:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20170

I suggest you try upgrading libstdc++.
Belgabor
Registered Member
Posts
7
Karma
0

Mon Jun 19, 2006 7:11 pm
Should have known about Google...

Nevertheless, that wasn't the reason. After updating gcc & glibc it still didn't work so I looked at the source (upnpprefwidget.cpp). The catch in the destructor reads:
Code: Select all
catch (Error e)

while all other catches in that file read:
Code: Select all
catch (Error & e)

after changing the catch in the destructor to the 'majority vote', ktorrent compiles & runs.
George
Moderator
Posts
5421
Karma
1

Tue Jun 20, 2006 5:12 pm
Hmm, strange why did nobody else ran into this problem ?
Belgabor
Registered Member
Posts
7
Karma
0

Wed Jun 21, 2006 2:05 am
The issue seems to be related to GCC 4.x, maybe it compiles fine on GCC 3.x?
George
Moderator
Posts
5421
Karma
1

Wed Jun 21, 2006 4:18 pm
Belgabor wrote:The issue seems to be related to GCC 4.x, maybe it compiles fine on GCC 3.x?


I'm running gcc 4.0.3, maybe you are running a more recent version.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]