Bug 82946

Summary: Build failure while linking libMesaOpenCL.la with any Mesa release >= 10.2: undefined references to .LLST7{1,5,9}
Product: Mesa Reporter: Giovanni Mariani <mc2374>
Component: OtherAssignee: mesa-dev
Status: RESOLVED NOTOURBUG QA Contact:
Severity: major    
Priority: medium CC: mc2374
Version: 10.2   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Log of a failed build

Description Giovanni Mariani 2014-08-22 11:35:30 UTC
Created attachment 105097 [details]
Log of a failed  build

I'm trying to build a rpm package of Mesa 10.2.6 for Rosa Fresh 2012.1 R3, but the build process always fails while linking libMesaOpenCL.la in src/gallium/targets/opencl, with the error message below:

***************************
Making all in opencl
gmake[3]: Entering directory `/home/giovanni/rpm/BUILD/Mesa-10.2.6/src/gallium/targets/opencl'
  CXXLD    libMesaOpenCL.la
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.a9eb1c180a77705c]+0x1e1): undefined reference to `.LLST71'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.a9eb1c180a77705c]+0x2bf): undefined reference to `.LLST75'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.a9eb1c180a77705c]+0x391): undefined reference to `.LLST79'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.ba46d5e26f0312cc]+0x22c): undefined reference to `.LLST71'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.ba46d5e26f0312cc]+0x30a): undefined reference to `.LLST75'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.ba46d5e26f0312cc]+0x3dc): undefined reference to `.LLST79'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.925e964f0ba680c7]+0x1e1): undefined reference to `.LLST71'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.925e964f0ba680c7]+0x2bf): undefined reference to `.LLST75'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.925e964f0ba680c7]+0x391): undefined reference to `.LLST79'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.cae0c7e56b9d064f]+0x578): undefined reference to `.LLST71'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.cae0c7e56b9d064f]+0x656): undefined reference to `.LLST75'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.cae0c7e56b9d064f]+0x728): undefined reference to `.LLST79'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.b0ea443f945b6ea5]+0x3d1): undefined reference to `.LLST71'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.b0ea443f945b6ea5]+0x4af): undefined reference to `.LLST75'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.b0ea443f945b6ea5]+0x581): undefined reference to `.LLST79'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.8993a09bd283ed4a]+0x441): undefined reference to `.LLST71'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.8993a09bd283ed4a]+0x51f): undefined reference to `.LLST75'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.8993a09bd283ed4a]+0x5f1): undefined reference to `.LLST79'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.6e263beb89c080c1]+0x449): undefined reference to `.LLST71'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.6e263beb89c080c1]+0x527): undefined reference to `.LLST75'
../../../../src/gallium/state_trackers/clover/.libs/libclover.a(lt9-libclover_la-kernel.o):(.debug_types[wt.6e263beb89c080c1]+0x5f9): undefined reference to `.LLST79'
collect2: error: ld returned 1 exit status
gmake[3]: *** [libMesaOpenCL.la] Error 1
***************************

The above error is present for me in any released source from Mesa 10.2 to Mesa 10.2.6, while any source from the 10.1.x series does not fail to build.

My build tools:
automake 1.14
libtool 2.4.2
gcc 4.7.4
llvm/clang 3.4 (I tested also the rel. 3.4.2 in a VM, with the same results)
libclc 0.0.1 (git snapshot at 20/08/2014 from libclc.git on llvm.org).


My build options:
***************************
./configure --build=x86_64-unknown-linux-gnu --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib64 --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --x-includes=/usr/include --x-libraries=/usr/lib64 --enable-dri --enable-dri3 --enable-glx --enable-xvmc --enable-xa --enable-vdpau --enable-opencl --enable-opencl-icd --with-opencl-libdir=/usr/lib/clc --with-clang-libdir=/usr/lib --enable-r600-llvm-compiler --with-dri-driverdir=/usr/lib64/dri --with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast --with-gallium-drivers=i915,ilo,nouveau,r300,r600,radeonsi,svga,swrast --enable-gallium-llvm --enable-egl --enable-gallium-egl --enable-gbm --enable-gallium-gbm --enable-gles1 --enable-gles2 --enable-openvg --enable-omx --enable-shared-glapi --disable-gallium-tests --with-egl-platforms=x11,drm,wayland --enable-glx-tls --enable-texture-float --enable-osmesa --with-osmesa-bits=32
***************************
Comment 1 Francisco Jerez 2014-08-22 12:45:30 UTC
Seems like a compiler bug to me.  Your debug section-related CXXFLAGS (-Wa,--compress-debug-sections -gdwarf-4) probably have an influence, try removing them, or upgrade to a more recent version of GCC (works for me with the same compiler flags on GCC v4.9.1).

Thanks.
Comment 2 Giovanni Mariani 2014-08-22 15:00:44 UTC
(In reply to comment #1)
> Seems like a compiler bug to me.  Your debug section-related CXXFLAGS
> (-Wa,--compress-debug-sections -gdwarf-4) probably have an influence, try
> removing them, or upgrade to a more recent version of GCC (works for me with
> the same compiler flags on GCC v4.9.1).
> 
> Thanks.
Removing the above part of CXXFLAGS gives me the same result as the old one...
I will look for a gcc upgrade (the nearly done Rosa 2014.1 will have gcc 4.9.1, so perhaps I will wait for it).
Comment 3 Giovanni Mariani 2014-08-22 18:44:18 UTC
OK. I tried another time and indeed I can confirm that removing the "-gdwarf-4" from CXXFLAGS fixes the build with gcc 4.7.4 (perhaps the first time I did not massage CXXFLAGS correctly).
Hence not a bug in Mesa: closing.

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.