Bug 82546 - [regression] libOSMesa build failure
Summary: [regression] libOSMesa build failure
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
: 82581 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-13 08:02 UTC by Fabio Pedretti
Modified: 2014-08-14 14:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
build log of failure (157.27 KB, text/plain)
2014-08-13 13:15 UTC, Knut Andre Tidemann
Details

Description Fabio Pedretti 2014-08-13 08:02:01 UTC
Current mesa bit fails to build, errore pasted below. Full build log including con figure options at:
https://launchpadlibrarian.net/182160038/buildlog_ubuntu-utopic-i386.mesa_10.3~git1408130909.52901e~gd~u_FAILEDTOBUILD.txt.gz


  CXXLD    libOSMesa.la
../../../../src/mesa/.libs/libmesa.a(fbobject.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mesa/.libs/libmesa.a(hash.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mesa/.libs/libmesa.a(arrayobj.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mesa/.libs/libmesa.a(bufferobj.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mesa/.libs/libmesa.a(framebuffer.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mesa/.libs/libmesa.a(pipelineobj.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mesa/.libs/libmesa.a(renderbuffer.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mesa/.libs/libmesa.a(shaderapi.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mesa/.libs/libmesa.a(shared.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mesa/.libs/libmesa.a(texcompress_s3tc.o): In function `_mesa_dlopen':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../src/mesa/main/dlopen.h:54: undefined reference to `dlopen'
../../../../src/mesa/.libs/libmesa.a(texcompress_s3tc.o): In function `_mesa_dlsym':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
../../../../src/mesa/.libs/libmesa.a(texcompress_s3tc.o): In function `_mesa_dlclose':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../src/mesa/main/dlopen.h:102: undefined reference to `dlclose'
../../../../src/mesa/.libs/libmesa.a(texobj.o): In function `mtx_init':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:179: undefined reference to `pthread_mutexattr_init'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mesa/../../../../include/c11/threads_posix.h:188: undefined reference to `pthread_mutexattr_destroy'
../../../../src/mapi/glapi/.libs/libglapi.a(glapi_gentable.o): In function `_glapi_create_table_from_handle':
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mapi/glapi/glapi_gentable.c:126: undefined reference to `dlsym'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mapi/glapi/glapi_gentable.c:137: undefined reference to `dlsym'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mapi/glapi/glapi_gentable.c:148: undefined reference to `dlsym'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mapi/glapi/glapi_gentable.c:159: undefined reference to `dlsym'
/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mapi/glapi/glapi_gentable.c:170: undefined reference to `dlsym'
../../../../src/mapi/glapi/.libs/libglapi.a(glapi_gentable.o):/build/buildd/mesa-10.3~git1408130909.52901e~gd~u/build/dri/src/mapi/glapi/glapi_gentable.c:181: more undefined references to `dlsym' follow
collect2: error: ld returned 1 exit status
Makefile:595: recipe for target 'libOSMesa.la' failed
make[5]: *** [libOSMesa.la] Error 1
Comment 1 Knut Andre Tidemann 2014-08-13 13:15:07 UTC
I have a very similar build failure in libOSMesa when trying to build the current master ( 52901ec2615761390f5ef97b11516dae330d27d1 ).

I've attached a build log and here are my configure options:

  ./autogen.sh --prefix=/usr \
    --sysconfdir=/etc \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast \
    --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
    --with-egl-platforms=drm,x11,wayland \
    --with-llvm-shared-libs \
    --enable-gallium-egl --enable-shared-glapi \
    --enable-gallium-llvm \
    --enable-glx-tls \
    --enable-gles1 \
    --enable-gles2 \
    --enable-egl \
    --enable-dri \
    --enable-glx \
    --enable-xa \
    --enable-osmesa \
    --enable-gbm \
    --enable-texture-float \
    --enable-vdpau \
    --enable-opencl \
    --enable-opencl-icd

I'm on Arch Linux 64 bit.

Snippet of build failure:make[4]: Entering directory '/var/abs/local/mesa-git/mesa-git/src/build/src/mesa/drivers/osmesa'
  CC       osmesa.lo
  CXXLD    libOSMesa.la
../../../../src/mesa/.libs/libmesa.a(texcompress_s3tc.o): In function `_mesa_dlopen':
/var/abs/local/mesa-git/mesa-git/src/build/src/mesa/../../src/mesa/main/dlopen.h:54: undefined reference to `dlopen'
../../../../src/mesa/.libs/libmesa.a(texcompress_s3tc.o): In function `_mesa_dlsym':
/var/abs/local/mesa-git/mesa-git/src/build/src/mesa/../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
/var/abs/local/mesa-git/mesa-git/src/build/src/mesa/../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
/var/abs/local/mesa-git/mesa-git/src/build/src/mesa/../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
/var/abs/local/mesa-git/mesa-git/src/build/src/mesa/../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
/var/abs/local/mesa-git/mesa-git/src/build/src/mesa/../../src/mesa/main/dlopen.h:84: undefined reference to `dlsym'
../../../../src/mesa/.libs/libmesa.a(texcompress_s3tc.o): In function `_mesa_dlclose':
/var/abs/local/mesa-git/mesa-git/src/build/src/mesa/../../src/mesa/main/dlopen.h:102: undefined reference to `dlclose'
../../../../src/mapi/glapi/.libs/libglapi.a(glapi_gentable.o): In function `_glapi_create_table_from_handle':
/var/abs/local/mesa-git/mesa-git/src/build/src/mapi/glapi/glapi_gentable.c:126: undefined reference to `dlsym'
/var/abs/local/mesa-git/mesa-git/src/build/src/mapi/glapi/glapi_gentable.c:137: undefined reference to `dlsym'
/var/abs/local/mesa-git/mesa-git/src/build/src/mapi/glapi/glapi_gentable.c:148: undefined reference to `dlsym'
/var/abs/local/mesa-git/mesa-git/src/build/src/mapi/glapi/glapi_gentable.c:159: undefined reference to `dlsym'
/var/abs/local/mesa-git/mesa-git/src/build/src/mapi/glapi/glapi_gentable.c:170: undefined reference to `dlsym'
../../../../src/mapi/glapi/.libs/libglapi.a(glapi_gentable.o):/var/abs/local/mesa-git/mesa-git/src/build/src/mapi/glapi/glapi_gentable.c:181: more undefined references to `dlsym' follow

The last build I did was f525bd01d1430a5e33f57805f50fe4e89aa86ae8 and it went fine.
Comment 2 Knut Andre Tidemann 2014-08-13 13:15:58 UTC
Created attachment 104562 [details]
build log of failure
Comment 3 Emil Velikov 2014-08-13 14:23:08 UTC
Gents can you strip down the configure flags to the bare minimum required to reproduce this and/or give git bisect a try ?

None of the recent patches removes/changes the libraries against we link against.
Comment 4 Tobias Klausmann 2014-08-13 16:06:25 UTC
git bisect shows

2af28040d639dddbb7c258981a00eaf3dfcbcf03 is the first bad commit
commit 2af28040d639dddbb7c258981a00eaf3dfcbcf03
Author: Alexandre Demers <alexandre.f.demers@gmail.com>
Date:   Fri Nov 22 20:06:20 2013 -0500

    configure: Fix --enable-XX-bit flags by moving LT_INIT where it should
    
    Moving LT_INIT after setting completely (AM_)C(XX)FLAGS and LDFLAGS.
    LT_INIT needs them as they are expected to be used all along
    the compilation when the macro runs its tests to determine among other
    things the host type.
    
    For info, see http://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50754
    Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
    Tested-by: Tapani Palli <lemody@gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Comment 5 Emil Velikov 2014-08-13 20:43:18 UTC
*** Bug 82581 has been marked as a duplicate of this bug. ***
Comment 6 Emil Velikov 2014-08-13 20:45:51 UTC
My plan is to revert the offending commit and remove the enable-32,64-bit hacks that the commit was fixing.
I'm also adding a note how to properly do cross-compile/multilib builds :)
Comment 7 Emil Velikov 2014-08-14 14:54:47 UTC
The offending commit has been reverted.

commit 957a28e63c8a205d01c48cb8fa03c3c1abe4b499
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Wed Aug 13 17:55:39 2014 +0100

    Revert "configure: Fix --enable-XX-bit flags by moving LT_INIT where it should"

    This reverts commit 2af28040d639dddbb7c258981a00eaf3dfcbcf03.


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.