Bug 59831 - undefined symbol _ZN4llvm19createGlobalDCEPassEv in r600g
Summary: undefined symbol _ZN4llvm19createGlobalDCEPassEv in r600g
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Tom Stellard
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 02:47 UTC by Alex Deucher
Modified: 2013-01-26 02:49 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Alex Deucher 2013-01-25 02:47:08 UTC
libGL error: dlopen /usr/lib64/dri/r600_dri.so failed (/usr/lib64/dri/r600_dri.so: undefined symbol: _ZN4llvm19createGlobalDCEPassEv)
with mesa head at:
c6a50ddfcb736e8a33b65fe8a72f2b6b9f70073b
Not sure if it's a mesa or llvm regression.
Comment 1 Michel Dänzer 2013-01-25 13:25:24 UTC
Is that with or without --with-llvm-shared-libs for the Mesa build?
Comment 2 Alex Deucher 2013-01-25 13:28:42 UTC
without.  Is that required now?

My configure options are:
./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-dri-drivers=radeon,r200 --with-gallium-drivers=r300,r600,radeonsi,swrast --enable-gles1 --enable-gles2 --enable-xorg --enable-vdpau --enable-shared-glapi --enable-gbm --enable-gallium-llvm --with-egl-platforms=drm --enable-glx-tls --enable-debug

Also, I'm using llvm c5c65f9ad0e1e897f6d828248bdf25a6714cdd09 from Tom's tree.
Comment 3 Michel Dänzer 2013-01-25 13:53:55 UTC
(In reply to comment #2)
> without.  Is that required now?

No, but I do wonder if we shouldn't drop support for linking LLVM statically.
Comment 4 Tom Stellard 2013-01-25 14:16:38 UTC
The problem is that llvm_wrapper.cpp is being built without --enable-opencl or --enable-r600-llvm-compiler, so the necessary libraries haven't been added to LLVM_LIBS.  The fix is to disable building of llvm_wrapper.cpp in this case.  I will write a patch.
Comment 5 Johannes Obermayr 2013-01-25 14:35:47 UTC
It was false to remove libr600_la_LDFLAGS in this patch:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=69d639ba8b3cfd95cfbb12b861dbe2eda53f2e25

And please change all Makefile.am to generate LLVM related LIBADDs this way to avoid stupid dependencies if LLVM was compiled with the better cmake build system which creates shared instead of static libs / one big shared lib and can save memory this way.
Comment 6 Tom Stellard 2013-01-25 15:48:34 UTC
This should be fixed by this patch:

http://lists.freedesktop.org/archives/mesa-dev/2013-January/033482.html
Comment 7 Tom Stellard 2013-01-25 15:53:14 UTC
(In reply to comment #5)
> It was false to remove libr600_la_LDFLAGS in this patch:
> http://cgit.freedesktop.org/mesa/mesa/commit/
> ?id=69d639ba8b3cfd95cfbb12b861dbe2eda53f2e25
> 
> And please change all Makefile.am to generate LLVM related LIBADDs this way
> to avoid stupid dependencies if LLVM was compiled with the better cmake
> build system which creates shared instead of static libs / one big shared
> lib and can save memory this way.

Generating different shared libraries depending on the build system used is a bug in LLVM.  However, until it is fixed we need to support both build systems even if one is better.

Adding llvm libraries in makefiles using llvm-config will not work when we are linking against shared libraries generated by an autotools build of LLVM, because then we will be linking against shared and static libraries at the same time.


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.