Mesa 7.8.3-rc1 from git branch 7.8 fails to compile. make shows the following error: --- /usr/bin/ld: xeglthreads.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' /usr/bin/ld: note: 'pthread_join@@GLIBC_2.2.5' is defined in DSO //lib64/libpthread.so.0 so try adding it to the linker command line //lib64/libpthread.so.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [xeglthreads] Error 1 make[2]: Leaving directory `/home/jos/src/xorg/mesa-7.8/progs/egl' make[1]: *** [subdirs] Error 1 make[1]: Leaving directory `/home/jos/src/xorg/mesa-7.8/progs' make: *** [default] Error 1 ---
Created attachment 38719 [details] [review] link to pthread Does this patch help?
(In reply to comment #1) > Does this patch help? I applied your patch but now I get another compilation error: --- /usr/bin/ld: xeglthreads.o: undefined reference to symbol 'XNextEvent' /usr/bin/ld: note: 'XNextEvent' is defined in DSO //usr/lib64/libX11.so.6 so try adding it to the linker command line //usr/lib64/libX11.so.6: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [xeglthreads] Error 1 make[2]: Leaving directory `/home/jos/src/xorg/mesa-7.8/progs/egl' make[1]: *** [subdirs] Error 1 make[1]: Leaving directory `/home/jos/src/xorg/mesa-7.8/progs' make: *** [default] Error 1 ---
(In reply to comment #2) > (In reply to comment #1) > > Does this patch help? > I applied your patch but now I get another compilation error: > --- > /usr/bin/ld: xeglthreads.o: undefined reference to symbol 'XNextEvent' > /usr/bin/ld: note: 'XNextEvent' is defined in DSO //usr/lib64/libX11.so.6 so > try adding it to the linker command line > //usr/lib64/libX11.so.6: could not read symbols: Invalid operation > collect2: ld returned 1 exit status Does adding -lX11 to the Makefile help? How do you configure your build and what does X11_LIBS in $(TOP)/configs/current expand to? > make[2]: *** [xeglthreads] Error 1 > make[2]: Leaving directory `/home/jos/src/xorg/mesa-7.8/progs/egl' > make[1]: *** [subdirs] Error 1 > make[1]: Leaving directory `/home/jos/src/xorg/mesa-7.8/progs' > make: *** [default] Error 1 > ---
(In reply to comment #3) I configure with ./autogen.sh --prefix=/usr --enable-debug=no --disable-gallium --with-dri-drivers=r600 which always works when compiling mesa 7.9 --- jos@debian:~/src/xorg/mesa-7.8$ ./autogen.sh --prefix=/usr --enable-debug=no --disable-gallium --with-dri-drivers=r600 autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf autoreconf: configure.ac: not using Autoheader autoreconf: configure.ac: not using Automake autoreconf: Leaving directory `.' checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gmake... no checking for make... make checking for makedepend... /usr/bin/makedepend checking for sed... /bin/sed checking for a BSD-compatible install... /usr/bin/install -c checking whether gcc version is sufficient... yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking whether gcc supports -fvisibility=hidden... yes checking whether to enable assembly... yes, x86_64 checking for gcc option to produce PIC... -fPIC checking for dlopen... no checking for dlopen in -ldl... yes checking for posix_memalign... yes checking pkg-config files for X11 are available... yes checking for LIBDRM... yes checking for DRI2PROTO... yes checking for GLPROTO... yes checking for DRIGL... yes checking expat.h usability... yes checking expat.h presence... yes checking for expat.h... yes checking for XML_ParserCreate in -lexpat... yes checking for LIBDRM_RADEON... yes checking for EGL_DRI2... yes checking for GLW... yes checking for GLUT... yes checking for XORG... yes checking for XEXT... yes configure: creating ./config.status config.status: creating configs/autoconf config.status: executing configs commands prefix: /usr exec_prefix: ${prefix} libdir: ${exec_prefix}/lib includedir: ${prefix}/include Driver: dri OSMesa: no DRI drivers: r600 DRI driver dir: ${libdir}/dri Use XCB: no Gallium: no Shared libs: yes Static libs: no EGL: glx dri2 GLU: yes GLw: yes (Motif: no) glut: yes Demos: xdemos egl demos redbook samples glsl CFLAGS: -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing -fPIC CXXFLAGS: -g -O2 -Wall -fno-strict-aliasing -fPIC Macros: -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XEXTPROTO_71 -DUSE_X86_64_ASM Run 'make' to build Mesa ---
(In reply to comment #4) > (In reply to comment #3) > > I configure with ./autogen.sh --prefix=/usr --enable-debug=no > --disable-gallium --with-dri-drivers=r600 > which always works when compiling mesa 7.9 > --- > jos@debian:~/src/xorg/mesa-7.8$ ./autogen.sh --prefix=/usr --enable-debug=no > --disable-gallium --with-dri-drivers=r600 > autoreconf: Entering directory `.' > autoreconf: configure.ac: not using Gettext > autoreconf: running: aclocal > autoreconf: configure.ac: tracing > autoreconf: configure.ac: not using Libtool > autoreconf: running: /usr/bin/autoconf > autoreconf: configure.ac: not using Autoheader > autoreconf: configure.ac: not using Automake > autoreconf: Leaving directory `.' > checking build system type... x86_64-unknown-linux-gnu > checking host system type... x86_64-unknown-linux-gnu > checking for gcc... gcc > checking whether the C compiler works... yes > checking for C compiler default output file name... a.out > checking for suffix of executables... > checking whether we are cross compiling... no > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking how to run the C preprocessor... gcc -E > checking for gcc... (cached) gcc > checking whether we are using the GNU C compiler... (cached) yes > checking whether gcc accepts -g... (cached) yes > checking for gcc option to accept ISO C89... (cached) none needed > checking for g++... g++ > checking whether we are using the GNU C++ compiler... yes > checking whether g++ accepts -g... yes > checking for gmake... no > checking for make... make > checking for makedepend... /usr/bin/makedepend > checking for sed... /bin/sed > checking for a BSD-compatible install... /usr/bin/install -c > checking whether gcc version is sufficient... yes > checking for pkg-config... /usr/bin/pkg-config > checking pkg-config is at least version 0.9.0... yes > checking whether gcc supports -fvisibility=hidden... yes > checking whether to enable assembly... yes, x86_64 > checking for gcc option to produce PIC... -fPIC > checking for dlopen... no > checking for dlopen in -ldl... yes > checking for posix_memalign... yes > checking pkg-config files for X11 are available... yes It should then print "checking for X11... yes" and set X11_LIBS to -lX11. Can you show me the result of executing "pkg-config --libs x11" on your system? Also, you may want to upgrade your autoconf, pkg-config, and libx11-dev and see if it helps? 7.9 compiles fine because the demos are moved to another repository. > checking for LIBDRM... yes > checking for DRI2PROTO... yes > checking for GLPROTO... yes > checking for DRIGL... yes > checking expat.h usability... yes > checking expat.h presence... yes > checking for expat.h... yes > checking for XML_ParserCreate in -lexpat... yes > checking for LIBDRM_RADEON... yes > checking for EGL_DRI2... yes > checking for GLW... yes > checking for GLUT... yes > checking for XORG... yes > checking for XEXT... yes > configure: creating ./config.status > config.status: creating configs/autoconf > config.status: executing configs commands > > prefix: /usr > exec_prefix: ${prefix} > libdir: ${exec_prefix}/lib > includedir: ${prefix}/include > > Driver: dri > OSMesa: no > DRI drivers: r600 > DRI driver dir: ${libdir}/dri > Use XCB: no > > Gallium: no > > Shared libs: yes > Static libs: no > EGL: glx dri2 > GLU: yes > GLw: yes (Motif: no) > glut: yes > Demos: xdemos egl demos redbook samples glsl > > CFLAGS: -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math > -fvisibility=hidden -fno-strict-aliasing -fPIC > CXXFLAGS: -g -O2 -Wall -fno-strict-aliasing -fPIC > Macros: -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN > -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING > -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XEXTPROTO_71 -DUSE_X86_64_ASM > > Run 'make' to build Mesa > ---
(In reply to comment #5) > > Can you show me the result of executing "pkg-config --libs x11" on your system? > Also, you may want to upgrade your autoconf, pkg-config, and libx11-dev and > see if it helps? > pkg-config --libs x11 -lX11 As I am using (upgraded) Debian/Sid autoconf and pkg-config are the latest Debian versions. Installing the git master branch version of libx11 did not help. Because I was compiling with gcc4.5 v.4.5.1-7 (Debian/Experimental) I tried reverting to gcc4.4 (v.4.4.4-14) which solved the compilation problem!
(In reply to comment #6) > (In reply to comment #5) > > > > Can you show me the result of executing "pkg-config --libs x11" on your system? > > Also, you may want to upgrade your autoconf, pkg-config, and libx11-dev and > > see if it helps? > > > > pkg-config --libs x11 > -lX11 > As I am using (upgraded) Debian/Sid autoconf and pkg-config are the latest > Debian versions. > Installing the git master branch version of libx11 did not help. > Because I was compiling with gcc4.5 v.4.5.1-7 (Debian/Experimental) I tried > reverting to gcc4.4 (v.4.4.4-14) which solved the compilation problem! It sounds like a version mismatch between the packages, but I am not sure how that happens. You may compare the results of running ./configure on both compilers for hints. I've committed the pthread patch and am closing this bug.
(In reply to comment #7) > > Because I was compiling with gcc4.5 v.4.5.1-7 (Debian/Experimental) I tried > > reverting to gcc4.4 (v.4.4.4-14) which solved the compilation problem! > It sounds like a version mismatch between the packages, but I am not sure how > that happens. You may compare the results of running ./configure on both > compilers for hints. I've committed the pthread patch and am closing this bug. ./configure of both compilers are identical.
(In reply to comment #8) > (In reply to comment #7) > > > > Because I was compiling with gcc4.5 v.4.5.1-7 (Debian/Experimental) I tried > > > reverting to gcc4.4 (v.4.4.4-14) which solved the compilation problem! > > It sounds like a version mismatch between the packages, but I am not sure how > > that happens. You may compare the results of running ./configure on both > > compilers for hints. I've committed the pthread patch and am closing this bug. > > ./configure of both compilers are identical. Weird. What was the command gcc4.5 build use to link xeglthreads? What does $ grep X11_LIBS configs/current give?
(In reply to comment #9) > > ./configure of both compilers are identical. > Weird. What was the command gcc4.5 build use to link xeglthreads? --- /usr/bin/ld: xeglthreads.o: undefined reference to symbol 'XNextEvent' /usr/bin/ld: note: 'XNextEvent' is defined in DSO //usr/lib64/libX11.so.6 so try adding it to the linker command line //usr/lib64/libX11.so.6: could not read symbols: Invalid operation --- > > What does $ grep X11_LIBS configs/current give? > $ grep X11_LIBS configs/current $ nothing!
(In reply to comment #10) > (In reply to comment #9) > > > > ./configure of both compilers are identical. > > Weird. What was the command gcc4.5 build use to link xeglthreads? > > --- > /usr/bin/ld: xeglthreads.o: undefined reference to symbol 'XNextEvent' > /usr/bin/ld: note: 'XNextEvent' is defined in DSO //usr/lib64/libX11.so.6 so > try adding it to the linker command line > //usr/lib64/libX11.so.6: could not read symbols: Invalid operation > --- > > > > > What does $ grep X11_LIBS configs/current give? > > > > $ grep X11_LIBS configs/current > $ nothing! Now something is broken. What is the output of $ grep X11_LIBS configs/current configs/autoconf configs/autoconf.in ?
(In reply to comment #11) > Now something is broken. What is the output of > > $ grep X11_LIBS configs/current configs/autoconf configs/autoconf.in > > ? jos@debian:~/src/xorg/mesa-7.8$ grep X11_LIBS configs/current configs/autoconf configs/autoconf.in jos@debian:~/src/xorg/mesa-7.8$ nothing, when using gcc4.4 and 4.5, although pkg-config --libs x11 -lX11 When compiling mesa-7.9: jos@debian:~/src/xorg/mesa-7.9$ grep X11_LIBS configs/current configs/autoconf configs/autoconf.in configs/current:X11_LIBS = -lX11 configs/autoconf:X11_LIBS = -lX11 configs/autoconf.in:X11_LIBS = @X11_LIBS@
(In reply to comment #12) > (In reply to comment #11) > > Now something is broken. What is the output of > > > > $ grep X11_LIBS configs/current configs/autoconf configs/autoconf.in > > > > ? > jos@debian:~/src/xorg/mesa-7.8$ grep X11_LIBS configs/current configs/autoconf > configs/autoconf.in > jos@debian:~/src/xorg/mesa-7.8$ nothing, when using gcc4.4 and 4.5, although > pkg-config --libs x11 > -lX11 > > When compiling mesa-7.9: > jos@debian:~/src/xorg/mesa-7.9$ grep X11_LIBS configs/current configs/autoconf > configs/autoconf.in > configs/current:X11_LIBS = -lX11 > configs/autoconf:X11_LIBS = -lX11 > configs/autoconf.in:X11_LIBS = @X11_LIBS@ It looks like your ~/src/xorg/mesa-7.8/configs/autoconf.in has local modifications.
BTW, do you have these problems with Mesa 7.8.2?
(In reply to comment #13) > It looks like your ~/src/xorg/mesa-7.8/configs/autoconf.in has local > modifications. No local modifications, it's the one I got from mesa-7.8.tar.bz2 http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.8
(In reply to comment #14) > BTW, do you have these problems with Mesa 7.8.2? I just tried and yes, 7.8.2 too doesn't compile when using gcc-4.5 but contrary to 7.8.3 I get: ~/src/xorg/mesa-7.8.2$ grep X11_LIBS configs/current configs/autoconf configs/autoconf.in configs/current:X11_LIBS = -lX11 configs/autoconf:X11_LIBS = -lX11 configs/autoconf.in:X11_LIBS = @X11_LIBS@ The compilation error is the same as given by 7.8.3: --- /usr/bin/ld: xeglthreads.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' /usr/bin/ld: note: 'pthread_join@@GLIBC_2.2.5' is defined in DSO //lib64/libpthread.so.0 so try adding it to the linker command line //lib64/libpthread.so.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [xeglthreads] Error 1 make[2]: Leaving directory `/home/jos/src/xorg/mesa-7.8.2/progs/egl' make[1]: *** [subdirs] Error 1 --- No compilation error when using gcc4.4
(In reply to comment #14) > BTW, do you have these problems with Mesa 7.8.2? After applying the patch (id=38719)'link to pthread' mesa 7.8.2 compiles well when using gcc-4.5
(In reply to comment #15) > (In reply to comment #13) > > > It looks like your ~/src/xorg/mesa-7.8/configs/autoconf.in has local > > modifications. > No local modifications, it's the one I got from mesa-7.8.tar.bz2 > http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.8 I see. The tarball is mesa 7.8. You need to click on the the commit to get the latest release http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.8&id=340e063525831d817df7f48fd34f1a00fd2720d5
(In reply to comment #18) > (In reply to comment #15) > > (In reply to comment #13) > > > > > It looks like your ~/src/xorg/mesa-7.8/configs/autoconf.in has local > > > modifications. > > No local modifications, it's the one I got from mesa-7.8.tar.bz2 > > http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.8 > I see. The tarball is mesa 7.8. You need to click on the the commit to get > the latest release > > http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.8&id=340e063525831d817df7f48fd34f1a00fd2720d5 OK! that's the right patched one. It compiles well using gcc-4.5 Thanks.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.