Summary: | x11-libs/cairo-1.12.2-r3[qt4] fails to link (underlinking, missing libstdc++ and libm) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | SpanKY <vapier> |
Component: | [OLD] Library | Assignee: | Ben de Groot (RETIRED) <yngwin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra, Martin.Jansa, nikoli, spatz, tetromino, x11 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=59038 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 269315, 372079 | ||
Attachments: |
emerge --info
build log |
Created attachment 320128 [details]
build log
That's not the only issue I'd say. With gcc-4.7 and forced as-needed no-add-needed I get the following underlinking: CCLD cairo-sphinx /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.1/../../../../x86_64-pc-linux-gnu/bin/ld: ../../util/cairo-script/.libs/libcairo-script-interpreter.so: undefined reference to symbol 'ceil@@GLIBC_2.2.5' /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.1/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /usr/lib64/libm.so so try adding it to the linker command line /usr/lib64/libm.so: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status Part of the answer lies in src/Makefile.am, src/Makefile.sources and src/Makefile.am.features: while the comment in the second seems out of data in regard of cairo, it's somewhat factual in regard of automake (as recently pulseaudio has added a workaround for similar issue); whether it's per design or not in automake doesn't really matter So it seems in src/Makefile.am libcairo_cxx_la_LIBADD would be the point of fix (though perhaps it's even a real issue in automake with convenience archives). =x11-libs/cairo-1.12.8 still having the same behaviour as Vapier said, but at least, it doesn't fail to link. # scanelf -qn /usr/lib/libcairo.so libpthread.so.0,libpixman-1.so.0,libfontconfig.so.1, libfreetype.so.6,libEGL.so.1, libdl.so.2, libpng15.so.15, libQtGui.so.4, libQtCore.so.4, libxcb-shm.so.0, libxcb-render.so.0, libxcb.so.1, libXrender.so.1, libX11.so.6, libXext.so.6, libz.so.1, libGL.so.1, librt.so.1, libm.so.6, libgcc_s.so.1, libc.so.6 /usr/lib/libcairo.so # readelf -sW /usr/lib/libcairo.so | grep gxx 84: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __gxx_personality_v0 The issue still exists in 1.12.8 and it is a regression from 1.10. Reported upstream as https://bugs.freedesktop.org/show_bug.cgi?id=59038 qt4 flag is masked so I will drop the blocker on the cairo stabilization bug. A little note: in 1.14.0 release notes, there's following line: Fix broken build for Qt backend, due to missing libstdc++. cairo-1.14.2 is in tree, does this problem still exist in it? Upstream bug was fixed by commit 2a37cbbabc00c7474be5baa25f848778b1773b2c Author: Bryce Harrington <b.harrington@samsung.com> Date: Tue Jul 8 15:53:41 2014 -0700 configure.ac: Fix broken build for Qt backend which was in 1.14.0, so marking this fixed as well. |
Created attachment 320126 [details] emerge --info libcairo.so links in some C++ code, but fails to link against libstdc++.so itself. this leads to build failures with gold. # emerge cairo -u ... [ebuild U ] x11-libs/cairo-1.12.2-r3 [1.10.2-r2] USE="X glib opengl qt4 svg xcb (-aqua) -debug -directfb -doc (-drm) (-gallium) -openvg -static-libs" 0 kB ... CCLD cairo-sphinx /var/tmp/portage/x11-libs/cairo-1.12.2-r3/work/cairo-1.12.2/src/.libs/libcairo.so: error: undefined reference to '__gxx_personality_v0' /var/tmp/portage/x11-libs/cairo-1.12.2-r3/work/cairo-1.12.2/src/.libs/libcairo.so: error: undefined reference to '__cxa_begin_catch' /var/tmp/portage/x11-libs/cairo-1.12.2-r3/work/cairo-1.12.2/src/.libs/libcairo.so: error: undefined reference to '__cxa_end_catch' /var/tmp/portage/x11-libs/cairo-1.12.2-r3/work/cairo-1.12.2/src/.libs/libcairo.so: error: undefined reference to '__cxa_rethrow' /var/tmp/portage/x11-libs/cairo-1.12.2-r3/work/cairo-1.12.2/src/.libs/libcairo.so: error: undefined reference to 'typeinfo for std::bad_alloc' cairo-boilerplate-qt.cpp:77: error: undefined reference to 'operator new(unsigned long)' cairo-boilerplate-qt.cpp:77: error: undefined reference to 'operator delete(void*)' collect2: error: ld returned 1 exit status make[4]: *** [cairo-sphinx] Error 1 ... and indeed, if we look at the library: # scanelf -qn /var/tmp/portage/x11-libs/cairo-1.12.2-r3/work/cairo-1.12.2/src/.libs/libcairo.so libpthread.so.0,libpixman-1.so.0,libfontconfig.so.1,libfreetype.so.6,libEGL.so.1,libdl.so.2,libpng15.so.15,libQtGui.so.4,libQtCore.so.4,libxcb-shm.so.0,libxcb-render.so.0,libxcb.so.1,libXrender.so.1,libX11.so.6,libz.so.1,libGL.so.1,librt.so.1,libm.so.6,libgcc_s.so.1,libc.so.6 /var/tmp/portage/x11-libs/cairo-1.12.2-r3/work/cairo-1.12.2/src/.libs/libcairo.so no libstdc++.so is listed there even though it uses such symbols: # readelf -sW /var/tmp/portage/x11-libs/cairo-1.12.2-r3/work/cairo-1.12.2/src/.libs/libcairo.so | grep gxx 391: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __gxx_personality_v0 5840: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __gxx_personality_v0