libglapi not linked against pthread

Bug #1053088 reported by Felix Geyer
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gentoo Linux
Fix Released
Medium
mesa (Fedora)
Fix Released
High
mesa (Ubuntu)
Fix Released
High
Timo Aaltonen
Quantal
Fix Released
High
Timo Aaltonen

Bug Description

qt4-x11 fails to build on armel and armhf because libglapi is not linked against pthread:

> g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/linux-g++ -I. -I/usr/include/freetype2 -I/usr/X11R6/include -o opengles2.o opengles2.cpp
> g++ -Wl,-O1 -o opengles2 opengles2.o -lfontconfig -lGLESv2
> /usr/lib/arm-linux-gnueabihf/libglapi.so.0: undefined reference to `pthread_once'
>collect2: error: ld returned 1 exit status

https://launchpadlibrarian.net/116642032/buildlog_ubuntu-quantal-armhf.qt4-x11_4%3A4.8.3%2Bdfsg-0ubuntu1_FAILEDTOBUILD.txt.gz

Fedora has applied this patch to their mesa package:
http://pkgs.fedoraproject.org/cgit/mesa.git/tree/mesa-undefined-symbols.patch

Related branches

Revision history for this message
In , Orion (orion-redhat-bugs) wrote :

Description of problem:

mesa-libglapi.i686: W: undefined-non-weak-symbol /usr/lib/libglapi.so.0.0.0 pthread_getspecific
mesa-libglapi.i686: W: undefined-non-weak-symbol /usr/lib/libglapi.so.0.0.0 pthread_key_create
mesa-libglapi.i686: W: undefined-non-weak-symbol /usr/lib/libglapi.so.0.0.0 pthread_once
mesa-libglapi.i686: W: undefined-non-weak-symbol /usr/lib/libglapi.so.0.0.0 pthread_setspecific

mesa-libglapi.i686: E: library-without-ldconfig-postin /usr/lib/libglapi.so.0.0.0
mesa-libglapi.i686: E: library-without-ldconfig-postun /usr/lib/libglapi.so.0.0.0

Trying to link against it:

[ 16%] /usr/bin/ld: /lib64/libglapi.so.0: undefined reference to symbol 'pthread_once@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_once@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line

Version-Release number of selected component (if applicable):
mesa-libglapi-8.1-0.8.fc18

Revision history for this message
In , Gary (gary-redhat-bugs) wrote :

Hello. Is someone working on this issue? It is blocking one of my packages from building in fedora 18 "rawhide" while it builds fine in fedora 16 and fedora 17. Thus, my package cannot get into fedora or epel until this bug get fixed.

Revision history for this message
In , Adam (adam-redhat-bugs) wrote :

Apps should never link against libglapi. Never ever ever. It's an implementation detail of libGL, it is not API.

That said, the linker complaining when it's implicitly brought into the link and not usable seems like a real bug. I'll take a look.

Revision history for this message
In , Orion (orion-redhat-bugs) wrote :

It's not linking directly, this is the link command:

/usr/bin/c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O3 -DNDEBUG -Wl,-z,relro -L/builddir/build/BUILD/VirtualGL-2.3.1/staticlib -static-libgcc CMakeFiles/glreadtest.dir/glreadtest.cpp.o -o ../bin/glreadtest -rdynamic -lGL -lGLU -lX11

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

mesa-8.1-0.19.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mesa-8.1-0.19.fc18

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Package mesa-8.1-0.19.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mesa-8.1-0.19.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-12852/mesa-8.1-0.19.fc18
then log in and leave karma (feedback).

Revision history for this message
In , Gary (gary-redhat-bugs) wrote :

Yes. Seems to fix issues building in rawhide. Thanks so much. I also added a comment at the url above for karma.

Revision history for this message
In , Francesco+gentoo-bugzilla (francesco+gentoo-bugzilla) wrote :
Download full text (7.2 KiB)

Created attachment 323928
/etc/portage/patches/media-libs/mesa/mesa-undefined-symbols.patch

getting this error while trying to emerge "x11-libs/qt-gui-5.0.0_beta1:qt" the problem seem to have been fixed in Mageia and RedHat picked up the patch too.

https://bugzilla.redhat.com/show_bug.cgi?id=839060
http://archive.fedoraproject.org/pub/fedora/linux/updates/testing/18/SRPMS/mesa-8.1-0.19.fc18.src.rpm

the patch apply cleanly to media-libs/mesa-9_pre20120831-r1 and permit to pass src_configure, still failing later but that's another bug.

Portage 2.2.0_alpha128 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.15-r2, 3.4.1-vs2.3.3.4 x86_64)
=================================================================
System uname: Linux-3.4.1-vs2.3.3.4-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.1
Timestamp of tree: Sat, 15 Sep 2012 12:30:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.7 [disabled]
app-shells/bash: 4.2_p37
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.3-r2
dev-util/ccache: 3.1.7
dev-util/cmake: 2.8.8-r3
dev-util/pkgconfig: 0.27.1
sys-apps/baselayout: 2.1-r1
sys-apps/openrc: 0.10.5
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.10.3, 1.11.6
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.6.3, 4.7.1
sys-devel/gcc-config: 1.7.3
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc: 2.15-r2
Repositories: gentoo vivovl mysql qt toolchain x11
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=corei7-avx -pipe -frecord-gcc-switches -mno-movbe -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=corei7-avx -fgcse-after-reload -fpredictive-commoning -ftree-vectorize -funswitch-loops -fgraphite-identity -floop-block -floop-interchange -floop-strip-mine -ggdb -gdwarf-4 -fvar-tracking-assignments"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=corei7-avx -pipe -frecord-gcc-switches -mno-movbe -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=corei7-avx -fgcse-after-reload -fpredictive-commoning -ftree-vectorize -funswitch-loops -fgraphite-identity -floop-block -floop-interchange -floop-strip-mine -ggdb -gdwarf-4 -fvar-tracking-assignments -fvisibility-inlines-hidden"
DISTDIR="/g/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --quiet-build=y --buildpkg-exc...

Read more...

Revision history for this message
In , Francesco+gentoo-bugzilla (francesco+gentoo-bugzilla) wrote :

Created attachment 323930
x11-libs:qt-gui-5.0.0_beta1:20120915-181247.log.xz

Revision history for this message
In , Francesco+gentoo-bugzilla (francesco+gentoo-bugzilla) wrote :

for the record:

> still failing later but that's another bug

yes and no, that problem was determined by circular dependencies in x11-libs/qt-{gui,widgets,opengl} and have been solved varying use flags and with emerge --nodeps; not worth a bug report, maybe for qt5 beta 2

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

mesa-8.1-0.19.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Mattst88-h (mattst88-h) wrote :

That patch is not very good.

I've fixed it in my automake-gallium branch (http://cgit.freedesktop.org/~mattst88/mesa/log/?h=automake-gallium) which will be rebased often, so I can't give a commit hash, but the title is

> build: Link libglapi with pthreads

I guess I'll have to do something slightly different for 9.0.

Felix Geyer (debfx)
Changed in mesa (Ubuntu):
importance: Undecided → High
summary: - libglapi not linked against pthread on armel and armhf
+ libglapi not linked against pthread
Changed in gentoo:
importance: Unknown → Medium
Matthias Klose (doko)
Changed in mesa (Ubuntu Quantal):
milestone: none → ubuntu-12.10-beta-2
status: New → Triaged
Timo Aaltonen (tjaalton)
Changed in mesa (Ubuntu Quantal):
assignee: nobody → Timo Aaltonen (tjaalton)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mesa - 9.0~git20120917.7cfd42ce-0ubuntu3

---------------
mesa (9.0~git20120917.7cfd42ce-0ubuntu3) quantal; urgency=low

  * Add 118-undefined-symbols.patch, fixing libglapi and libosmesa
    missing symbols. (LP: #1053088)
 -- Timo Aaltonen <email address hidden> Thu, 20 Sep 2012 13:25:46 +0300

Changed in mesa (Ubuntu Quantal):
status: Triaged → Fix Released
Revision history for this message
In , Mattst88-h (mattst88-h) wrote :
Revision history for this message
In , Mattst88-h (mattst88-h) wrote :

(In reply to comment #4)
> Patches sent:
>
> http://lists.freedesktop.org/archives/mesa-dev/2012-September/027834.html
> http://lists.freedesktop.org/archives/mesa-dev/2012-September/027835.html

Patches committed to master. Will wait a few days and cherry-pick to 9.0.

Revision history for this message
In , Chi-Thanh Christopher Nguyen (chithanh) wrote :

Fixed in 9.0

Changed in gentoo:
status: Unknown → Fix Released
Changed in mesa (Fedora):
importance: Unknown → High
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.