Summary: | media-libs/mesa-9.0.3[r600-llvm-compiler] build failure against sys-devel/llvm[-debug] - r600_dri.so.tmp: undefined reference to `llvm::isCurrentDebugType(char const*)' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paolo Pedroni <paolo.pedroni> |
Component: | [OLD] Library | Assignee: | Gentoo X packagers <x11> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, bruce, luke-jr+gentoobugs |
Priority: | Normal | ||
Version: | 10.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 500368 | ||
Attachments: |
Build log for media-libs/mesa-9.0.3
Ebuild environment file mesa-9.0.3.ebuild.patch mesa-9.0.3.ebuild.patch mesa-9.0.3.ebuild.patch |
Description
Paolo Pedroni
2013-02-26 13:53:54 UTC
Created attachment 340168 [details]
Build log for media-libs/mesa-9.0.3
Created attachment 340170 [details]
Ebuild environment file
I forgot to say that the same error happens with media-libs/mesa-9.0.2 as well. I just hit this problem as well. It works if you compile llvm with the debug use flag. I can confirm this issue too, it is caused by the r600-llvm-compiler USE if I'm not mistaken. Can't we just make mesa with said use flag depend on llvm with the debug use enabled? My memory may be failing but this should be doable since, at least, EAPI 4 (In reply to comment #5) > I can confirm this issue too, it is caused by the r600-llvm-compiler USE if > I'm not mistaken. This also happen with video_cards_radeonsi USE flag enabled: radeonsi_dri.so.tmp: undefined reference to `llvm::isCurrentDebugType(char const*)' radeonsi_dri.so.tmp: undefined reference to `llvm::DebugFlag' $ emerge -pqv mesa [ebuild U ] media-libs/mesa-9.0.3 [9.0.1] USE="classic egl g3dvl gallium gbm gles1 gles2 llvm nptl openvg pax_kernel shared-glapi vdpau -bindist -debug -osmesa -pic -r600-llvm-compiler (-selinux) -wayland -xa -xorg -xvmc" VIDEO_CARDS="intel radeon radeonsi -i915 -i965 -nouveau -r100 -r200 -r300 -r600 -vmware" https://bugs.freedesktop.org/show_bug.cgi?id=52136 "the isCurrentDebugType and DebugFlag errors are cause by -DNDEBUG. The problem with -DNDEBUG is that LLVM defines DNDEBUG in public headers, so if you compiled LLVM with it, you have have to compile Mesa with it as well." Mesa's build system doesn't preserve -DNDEBUG flag from llvm-config: # pwd /var/tmp/portage/media-libs/mesa-9.0.3/work/Mesa-9.0.3: # grep 'LLVM_C.*FLAGS=' ./configure LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'` LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'` LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'` So -DNDEBUG flag should be explicitly appended by a mesa ebuild if USE="-debug". And debug USE flag should match between mesa and llvm. Created attachment 344440 [details, diff]
mesa-9.0.3.ebuild.patch
This patch works for me.
I didn't check, but if mesa with -DNDEBUG compiles fine against llvm[debug], then append-flags could be called unconditionaly and no need to change dependency llvm -> llvm[debug?]. Created attachment 344614 [details, diff] mesa-9.0.3.ebuild.patch Updated patch with fixed deps. Please, ignore my comment 10. Problems may arise when mesa is built against non-debug llvm, then that llvm is rebuilt with debug enabled (or vice versa). Possibly a dependeny on llvm[debug=] is needed. (In reply to comment #12) > Possibly a dependeny on llvm[debug=] is needed. This is what I wanted in the first patch, but I've mistakenly used llvm[debug?] for this. As a result both of my patches does exactly the same thing. %) Created attachment 346078 [details, diff]
mesa-9.0.3.ebuild.patch
So did you verify whether it is actually needed or not? If not then there is no reason to make the dependencies so strict. (In reply to comment #15) > So did you verify whether it is actually needed or not? If not then there is > no reason to make the dependencies so strict. I only tested compilation, and in this regard dependency on llvm[debug?] is enough. I can't test mesa with VIDEO_CARDS="radeonsi", because the only version that works with my HD 7750 is mesa-9.2*. Earlier versions cause Xorg to segfault at startup. I can try to test mesa with USE="r600-llvm-compiler" on a HD 6450 card, but how? Is succesfuly running gnome-shell after recompilation of llvm with switched debug use flag is enough? I explained one reason to have dependency on llvm[debug=] in bug 480732. A warning message was added to the ebuild if a mismatch between mesa and llvm debug flags is detected. FWIW, this no longer seems to be an issue with Mesa 10 |