Skip to contentSkip to conversation

New: Mesa fails to link r600_dri.so with LLVM

Bug 52136 [email protected] 1 participant 7 messages Jul 16, 2012 – Feb 1, 2017

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=52136

Bug #: 52136
Summary: Mesa fails to link r600_dri.so with LLVM
Classification: Unclassified
Product: Mesa
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r600
AssignedTo: [email protected]
ReportedBy: [email protected]

Created attachment 64258
--> https://bugs.freedesktop.org/attachment.cgi?id=64258
Full build log

When I try to build Mesa, it fails with the following error:

make[3]: Entering directory `/var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/mesa-scm/src/gallium/targets/dri-r600' rm -f depend
touch depend
/usr/bin/makedepend -fdepend -I/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.1/include -I/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.1/include-fixed -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_NOOP -I. -I../../../../src/mesa/drivers/dri/common -Iserver -I../../../../include -I../../../../include/GL/internal -I../../../../src/mapi -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers -I../../../../src/gallium/winsys -I../../../../src/mesa -I../../../../src/mesa/main -I../../../../src/mesa/math -I../../../../src/mesa/transform -I../../../../src/mesa/shader -I../../../../src/mesa/swrast -I../../../../src/mesa/swrast_setup -I../../../../src/egl/main -I../../../../src/egl/drivers/dri
-I/usr/include/libdrm target.c
../../../../src/mesa/drivers/dri/common/utils.c ../../../../src/mesa/drivers/dri/common/dri_util.c

../../../../src/mesa/drivers/dri/common/xmlconfig.c  \
         2> /dev/null

../Makefile.dri:110: depend: No such file or directory
make[3]: Leaving directory /var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/mesa-scm/src/gallium/targets/dri-r600' make[3]: Entering directory /var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/mesa-scm/src/gallium/targets/dri-r600' x86_64-pc-linux-gnu-gcc -c -I. -I../../../../src/mesa/drivers/dri/common -Iserver -I../../../../include -I../../../../include/GL/internal -I../../../../src/mapi -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers -I../../../../src/gallium/winsys -I../../../../src/mesa -I../../../../src/mesa/main -I../../../../src/mesa/math -I../../../../src/mesa/transform -I../../../../src/mesa/shader -I../../../../src/mesa/swrast -I../../../../src/mesa/swrast_setup -I../../../../src/egl/main -I../../../../src/egl/drivers/dri
-I/usr/include/libdrm -march=native -pipe -O2 -Wall -std=c99
-Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -m64 -march=native -pipe -O2 -fPIC -D_GNU_SOURCE -DPTHREADS -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_POSIX_MEMALIGN -DIN_DRI_DRIVER -DUSE_XCB -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_LLVM=0x0301 -fvisibility=hidden -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_NOOP target.c -o target.o
/bin/sh ../../../../bin/mklib -o r600_dri.so.tmp -noprefix -linker

'x86_64-pc-linux-gnu-g++' -ldflags ' -L/usr/lib   -ldl -lpthread' \
        target.o ../../../../src/mesa/drivers/dri/common/utils.o

../../../../src/mesa/drivers/dri/common/dri_util.o ../../../../src/mesa/drivers/dri/common/xmlconfig.o ../../../../src/gallium/drivers/r600/libr600.a ../../../../src/gallium/state_trackers/dri/drm/libdridrm.a ../../../../src/gallium/winsys/radeon/drm/libradeonwinsys.a ../../../../src/gallium/drivers/trace/libtrace.a ../../../../src/gallium/drivers/rbug/librbug.a

../../../../src/gallium/drivers/noop/libnoop.a \
                -Wl,--start-group ../../../../src/mesa/libmesagallium.a
../../../../src/gallium/auxiliary/libgallium.a -Wl,--end-group \
                  ../../../../lib64/libdricore8.1.0.so  -ldrm   -lexpat -lm

-lpthread -ldl -ldrm_radeon -lLLVMBitWriter -lLLVMX86AsmParser -lLLVMX86Disassembler -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -lLLVMInstrumentation -lLLVMLinker -lLLVMArchive -lLLVMBitReader -lLLVMipo -lLLVMVectorize -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -lLLVMAsmParser -lLLVMBitReader -lLLVMCore -lLLVMSupport
mklib: Making Linux shared library: r600_dri.so.tmp x86_64-pc-linux-gnu-g++ -march=native -pipe -O2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -m64 -march=native -pipe -O2 -fPIC -D_GNU_SOURCE -DPTHREADS -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_POSIX_MEMALIGN -DIN_DRI_DRIVER -DUSE_XCB -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_LLVM=0x0301 -fvisibility=hidden -o r600_dri.so.test ../../../../src/mesa/drivers/dri/common/dri_test.o r600_dri.so.tmp
../../../../lib64/libdricore8.1.0.so -ldrm -lexpat -lm -lpthread -ldl
-ldrm_radeon -L/usr/lib -ldl -lpthread;
make[3]: Leaving directory /var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/mesa-scm/src/gallium/targets/dri-r600' r600_dri.so.tmp: undefined reference to llvm::isCurrentDebugType(char const*)' r600_dri.so.tmp: undefined reference to typeinfo for llvm::SelectionDAGISel' r600_dri.so.tmp: undefined reference to typeinfo for llvm::TargetInstrInfoImpl'
r600_dri.so.tmp: undefined reference to typeinfo for llvm::TargetPassConfig' r600_dri.so.tmp: undefined reference to typeinfo for llvm::MCAsmInfo' r600_dri.so.tmp: undefined reference to `typeinfo for llvm::TargetSubtargetInfo'
r600_dri.so.tmp: undefined reference to typeinfo for llvm::LLVMTargetMachine' r600_dri.so.tmp: undefined reference to typeinfo for llvm::MachineFunctionInfo'
r600_dri.so.tmp: undefined reference to `typeinfo for llvm::TargetFrameLowering'
r600_dri.so.tmp: undefined reference to `llvm::DebugFlag'
r600_dri.so.tmp: undefined reference to `typeinfo for llvm::MachineFunctionPass'
r600_dri.so.tmp: undefined reference to `typeinfo for llvm::TargetIntrinsicInfo'
r600_dri.so.tmp: undefined reference to typeinfo for llvm::TargetRegisterInfo' r600_dri.so.tmp: undefined reference to typeinfo for llvm::TargetLowering'
collect2: error: ld returned 1 exit status
make[3]: *** [r600_dri.so] Error 1

I have attached the full build log.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#1 lore raw

[Bug 52136] Mesa fails to link r600_dri.so with LLVM

https://bugs.freedesktop.org/show_bug.cgi?id=52136

--- Comment #1 from Tom Stellard <[email protected]> 2012-07-16 13:41:13 PDT --- I've seen this before. The problem is mismatched CXXFLAGS in mesa and llvm. The typeinfo errors are caused the -fno-rtti flag (or the absence of it) and 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.

If you play with your configure flags you should be able to get this to work. I'll try to look into a proper solution when I get a chance.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#2 lore raw

[Bug 52136] Mesa fails to link r600_dri.so with LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=52136

--- Comment #2 from Tom Stellard <[email protected]> --- Is this still an issue?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

[Bug 52136] Mesa fails to link r600_dri.so with LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=52136

--- Comment #3 from Niels Ole Salscheider <[email protected]> --- This used to work, but it seems to be broken again since ce8eadb6e8adc24f675b364e0620dbf1c9e079a8:

libtool: link: x86_64-pc-linux-gnu-g++ -fPIC -DPIC -shared -nostdlib /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/crti.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/crtbeginS.o .libs/egl.o
.libs/egl_pipe.o .libs/egl_st.o -Wl,--whole-archive
../../../../src/gallium/auxiliary/.libs/libgallium.a
../../../../src/gallium/drivers/identity/.libs/libidentity.a
../../../../src/gallium/drivers/trace/.libs/libtrace.a
../../../../src/gallium/drivers/rbug/.libs/librbug.a
../../../../src/gallium/state_trackers/egl/.libs/libegl.a
../../../../src/gallium/winsys/sw/xlib/.libs/libws_xlib.a
../../../../src/gallium/winsys/sw/wayland/.libs/libws_wayland.a
../../../../src/egl/wayland/wayland-drm/.libs/libwayland-drm.a
../../../../src/mesa/.libs/libmesagallium.a
../../../../src/gallium/state_trackers/vega/.libs/libvega.a
../../../../src/gallium/winsys/radeon/drm/.libs/libradeonwinsys.a
../../../../src/gallium/drivers/r600/.libs/libr600.a
../../../../src/gallium/winsys/radeon/drm/.libs/libradeonwinsys.a
../../../../src/gallium/drivers/radeonsi/.libs/libradeonsi.a
../../../../src/gallium/drivers/softpipe/.libs/libsoftpipe.a
../../../../src/gallium/drivers/llvmpipe/.libs/libllvmpipe.a
-Wl,--no-whole-archive -Wl,-rpath
-Wl,/var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/src/egl/main/.libs
-Wl,-rpath -Wl,/var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/src/gbm/.libs
-Wl,-rpath -Wl,/usr/lib64/../lib64 -Wl,-rpath
-Wl,/var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/src/mapi/shared-glapi/.libs
-Wl,-rpath
-Wl,/var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/src/mapi/vgapi/.libs
-Wl,-rpath -Wl,/usr/lib64/../lib64
-L/var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/src/gbm/.libs -L/var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/src/mapi/shared-glapi/.libs
-L/usr/lib64 ../../../../src/egl/main/.libs/libEGL.so -L/usr/lib64/../lib64
/usr/lib64/libX11-xcb.so /usr/lib64/libxcb-dri2.so /usr/lib64/libxcb-xfixes.so
/usr/lib64/libxcb-render.so /usr/lib64/libxcb-shape.so /var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/src/gbm/.libs/libgbm.so
/usr/lib64/libXext.so /usr/lib64/libXfixes.so /usr/lib64/libX11.so
/usr/lib64/libxcb.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so
../../../../src/gbm/.libs/libgbm.so /usr/lib64/libudev.so
/usr/lib64/libwayland-client.so /usr/lib64/libwayland-server.so
/usr/lib64/../lib64/libffi.so
/var/tmp/paludis/build/x11-dri-mesa-scm/work/C/64/src/mapi/shared-glapi/.libs/libglapi.so ../../../../src/mapi/shared-glapi/.libs/libglapi.so
../../../../src/mapi/vgapi/.libs/libOpenVG.so -lelf /usr/lib64/libdrm_radeon.so
/usr/lib64/libdrm.so -lrt -ldl -lcurses -lpthread -lz -lLLVMR600CodeGen
-lLLVMR600Desc -lLLVMR600Info -lLLVMR600AsmPrinter -lLLVMOption -lLLVMIRReader
-lLLVMBitReader -lLLVMAsmParser -lLLVMInstrumentation -lLLVMLinker -lLLVMipo
-lLLVMVectorize -lLLVMMCJIT -lLLVMBitWriter -lLLVMX86Disassembler
-lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter
-lLLVMMCParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils
-lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen
-lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils
-lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore
-lLLVMSupport -L/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2
-L/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64 -L/lib/../lib64
-L/usr/lib/../lib64
-L/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/../../..
/usr/lib64/../lib64/libstdc++.so -lm -lc -lgcc_s
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/crtendS.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/crtn.o
-march=native -O2 -m64 -Wl,--no-undefined -Wl,--allow-multiple-definition -Wl,/var/tmp/paludis/build/x11-dri-mesa-scm/work/mesa-scm/src/gallium/targets/egl-static/egl.link
-Wl,--rpath-link -Wl,/lib64 -Wl,--rpath-link -Wl,/lib64 -Wl,--rpath-link
-Wl,/lib64 -pthread -Wl,-soname -Wl,egl_gallium.so -o .libs/egl_gallium.so
../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_debug.o):(.data.rel.ro._ZTI17raw_debug_ostream[_ZTI17raw_debug_ostream]+0x10):
undefined reference to `typeinfo for llvm::raw_ostream' ../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_debug.o):(.data.rel.ro._ZTI18BufferMemoryObject[_ZTI18BufferMemoryObject]+0x10):
undefined reference to `typeinfo for llvm::MemoryObject' ../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_debug.o):(.data.rel.ro._ZTIN4llvm14format_object1ImEE[_ZTIN4llvm14format_object1ImEE]+0x10):
undefined reference to `typeinfo for llvm::format_object_base'
collect2: error: ld returned 1 exit status

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

[Bug 52136] Mesa fails to link r600_dri.so with LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=52136

Niels Ole Salscheider <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #64258|0                           |1

is obsolete| |

--- Comment #4 from Niels Ole Salscheider <[email protected]> --- Created attachment 89316
--> https://bugs.freedesktop.org/attachment.cgi?id=89316&action=edit
Full build log

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

[Bug 52136] Mesa fails to link r600_dri.so with LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=52136

Niels Ole Salscheider <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #89316|text/plain                  |application/octet-stream
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

[Bug 52136] Mesa fails to link r600_dri.so with LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=52136

Jan Vesely <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Jan Vesely <[email protected]> --- I'm pretty sure this one builds and links OK.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel