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.
Created attachment 350164 [details, diff] Include -lstdc++ in linker call This fix works for me.
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.
Created attachment 350198 [details, diff] patch to the pari-2.5.4 ebuild to use c++ for linking when using qt4
+*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 +