Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472362 - sci-mathematics/pari-2.5.3 USE=qt4 - ld: plotQt4.o: undefined reference to symbol '__cxa_rethrow@@CXXABI_1.3' (should link against libstdc++.so)
Summary: sci-mathematics/pari-2.5.3 USE=qt4 - ld: plotQt4.o: undefined reference to sy...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: underlinking
  Show dependency tree
 
Reported: 2013-06-05 05:28 UTC by Martin von Gagern
Modified: 2013-06-11 17:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (sci-mathematics:pari-2.5.4:20130604-075955.log,24.98 KB, text/plain)
2013-06-05 05:28 UTC, Martin von Gagern
Details
Include -lstdc++ in linker call (pari-2.5.4-libstdc++.patch,507 bytes, patch)
2013-06-05 07:17 UTC, Martin von Gagern
Details | Diff
patch to the pari-2.5.4 ebuild to use c++ for linking when using qt4 (ebuild.patch,881 bytes, patch)
2013-06-05 10:16 UTC, François Bissey
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2013-06-05 05:28:20 UTC
Created attachment 350162 [details]
build log

Pari complains about C++ libs not being mentioned as a dependency. This is due to --no-copy-dt-needed-entries which is now the default according to bug 372079 comment 1.

x86_64-pc-linux-gnu-gcc  -o gp-dyn -L"/var/tmp/portage/sci-mathematics/pari-2.5.4/work/pari-2.5.4/Olinux-x86_64" -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer  -march=amdfam10 -O2 -ggdb -pipe  -Wl,--export-dynamic -Wl,--as-needed gp.o gp_init.o gp_rl.o highlvl.o whatnow.o plotport.o plotQt4.o -Wl,-rpath,"/var/tmp/portage/sci-mathematics/pari-2.5.4/work/pari-2.5.4"/Olinux-x86_64:"/usr/lib64":/usr/lib64:/usr/lib -L/usr/lib -lreadline -lpari -L/usr/lib64/qt4 -lQtGui -lQtCore  -lm -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: plotQt4.o: undefined reference to symbol '__cxa_rethrow@@CXXABI_1.3'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: '__cxa_rethrow@@CXXABI_1.3' is defined in DSO /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6 so try adding it to the linker command line
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [gp-dyn] Error 1
 * ERROR: sci-mathematics/pari-2.5.4 failed (compile phase):
 *   emake failed

I guess one possible fix would be adding -lstdc++ to the command line, anothe would be using g++ instead of gcc for this. What makes things a bit ugly is the fact that we have to make this decision conditionally based on a USE flag.
Comment 1 Martin von Gagern 2013-06-05 07:17:23 UTC
Created attachment 350164 [details, diff]
Include -lstdc++ in linker call

This fix works for me.
Comment 2 François Bissey 2013-06-05 10:13:41 UTC
An alternative is to set LD to tc-getCXX in src_compile when making the gp target.
I am attaching an alternative patch to the ebuild only.
Comment 3 François Bissey 2013-06-05 10:16:48 UTC
Created attachment 350198 [details, diff]
patch to the pari-2.5.4 ebuild to use c++ for linking when using qt4
Comment 4 Sébastien Fabbro (RETIRED) gentoo-dev 2013-06-11 17:33:07 UTC
+*pari-2.5.4 (11 Jun 2013)
+
+  11 Jun 2013; Sébastien Fabbro <bicatali@gentoo.org>
+  +files/pari-2.5.4-polred.patch, +files/pari-2.5.4-slow_determinant.patch,
+  +pari-2.5.4.ebuild:
+  Version bump, also closing bug #472362, thanks Martin von Gagern and Francois
+  Bissey
+