Bug 30353 - building multilib mesa fails or bogus
Summary: building multilib mesa fails or bogus
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) All
: medium major
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-23 12:18 UTC by Sergey Kondakov
Modified: 2014-09-21 19:45 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
config.log (40.86 KB, text/plain)
2010-09-23 12:19 UTC, Sergey Kondakov
Details

Description Sergey Kondakov 2010-09-23 12:18:35 UTC
right now if i try to build mesa with '--enable-32-bit --enable-64-bit' it fails with:
x86_64-pc-linux-gnu-gcc -c -I. -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers  -march=k8-sse3 -O2 -pipe -g -ffast-math -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing -m32 -m64 -g  -fPIC -m32 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DDEBUG -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XCB_DRI2 -DHAVE_LIBUDEV -DHAVE_XEXTPROTO_71 -DGALLIUM_LLVMPIPE -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0207 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/usr/include  -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fomit-frame-pointer -fPIC lp_test_main.c -o lp_test_main.o
g++ -Wl,-z,lazy -L/usr/lib  -lpthread -lffi -ldl -lm  lp_test_format.o lp_test_main.o -o lp_test_format -Wl,--start-group  -L../../auxiliary/ -lgallium libllvmpipe.a -lLLVMBitWriter -lLLVMX86CodeGen -lLLVMX86Info -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMInterpreter -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport -lLLVMSystem -lstdc++  -lXext -lXdamage -lXfixes -lXxf86vm -lX11-xcb -lX11 -lxcb-glx -lxcb   -ldrm   -lm -lpthread -ldl -Wl,--end-group
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ../../auxiliary//libgallium.a when searching for -lgallium
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgallium
collect2: ld returned 1 exit status
gmake[4]: *** [lp_test_format] Error 1
gmake[4]: Leaving directory `/var/tmp/portage/media-libs/mesa-9999-r3/work/Mesa-9999/src/gallium/drivers/llvmpipe'

but even in past, when building was not broken, `make install` would not actually install 32bit binaries.
besides, even if it will build & install those, will it be able to automatically put them into <supplied libdir>/../lib32 ?

anyway, i remember, in even more distant past it worked (build & install correctly) as expected. should be now too as building twice (1: 32/no64, 2:no32/64) suck.
Comment 1 Sergey Kondakov 2010-09-23 12:19:19 UTC
Created attachment 38918 [details]
config.log
Comment 2 Sergey Kondakov 2010-09-24 08:09:19 UTC
so, it did built with '-j1' passed to make and with llvm support disabled.
but it was fruitless - it just installed 32 bit binaries into supplied libdir.
Comment 3 David Heidelberg (okias) 2010-12-28 16:49:13 UTC
mklib: Making Linux static library:  libllvmpipe.a
ar: creating libllvmpipe.a
gcc -c -I. -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers  -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing -m32  -fPIC -m32  -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_UDIS86 -DGALLIUM_LLVMPIPE -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0208 -I/usr/include  -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS lp_test_format.c -o lp_test_format.o
gcc -c -I. -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers  -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing -m32  -fPIC -m32  -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_UDIS86 -DGALLIUM_LLVMPIPE -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0208 -I/usr/include  -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS lp_test_main.c -o lp_test_main.o
g++  -L/usr/lib64/llvm  -ludis86 -lpthread -lffi -ldl -lm  lp_test_format.o lp_test_main.o -o lp_test_format -Wl,--start-group  -L../../auxiliary/ -lgallium libllvmpipe.a -lLLVMBitWriter -lLLVMX86CodeGen -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMInterpreter -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport -lLLVMSystem -lstdc++ -ludis86  -lXext -lXdamage -lXfixes -lXxf86vm -lX11-xcb -lX11 -lxcb-glx -lxcb   -ldrm   -lm -lpthread -ldl -Wl,--end-group
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible ../../auxiliary//libgallium.a when searching for -lgallium
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgallium
collect2: ld returned 1 exit status
gmake[4]: *** [lp_test_format] Error 1
gmake[4]: Leaving directory `/root/32bit/mesa/src/gallium/drivers/llvmpipe'
gmake[3]: *** [default] Error 1
gmake[3]: Leaving directory `/root/32bit/mesa/src/gallium/drivers'
gmake[2]: *** [default] Error 1
gmake[2]: Leaving directory `/root/32bit/mesa/src/gallium'
gmake[1]: *** [subdirs] Error 1
gmake[1]: Leaving directory `/root/32bit/mesa/src'
gmake: *** [default] Error 1

I can confirm that bug. 32bit build is OK, but WITHOUT LLVM. With LLVM end with exactly same error. llvm version is 2.8.
Comment 4 Michel Dänzer 2010-12-29 00:29:08 UTC
AFAIR Mesa has never supported building both 32 and 64 bit binaries at the same time. This should probably be handled more gracefully though.
Comment 5 Sergey Kondakov 2010-12-29 04:27:56 UTC
never ? then what "--<switch>-32-bit --<switch>-64-bit" are for ? either those options should have been mutually exclusive from begin with or it should build all bunch of libraries as it were long time ago when i first tried it.

it probably can easily be fixed for non-llvm builds but with llvm two complications arise:
1) vendors don't have packages for 32bit llvm libs (or at least, Gentoo doesn't) and llvm don't seems to provide them as gcc does, for example
2) if llvm 32bit libraries would be provided by separate package they may be build not together with main llvm package and be of another, older version.

so, mesa building scripts should automatically check for native and llvm 32bit versions and configure them slightly differently (with llvm for native and no llvm support for 32bit if llvm 32bit not present, for example). it would be sweet.

ideally, i would just dropped mesa 32bit libs but because of wine and random non-opensource software (which both, unfortunately, are most demanding of graphic stack features and performance) i can't. no one can't :(
and in Gentoo you either sit with obsolete 32bit pre-built binaries or build your own by hacky and ugly ebuild which will never go official. clean way of doing so in mesa building scripts might help.
Comment 6 David Heidelberg (okias) 2010-12-29 04:52:50 UTC
Gentoo have emul libs compiled WITH llvm... I personally asked for it :-))
Comment 7 Sergey Kondakov 2010-12-30 01:14:16 UTC
they are ? good for them. but i still don't see 32bit llvm libraries lying anywhere so i could build _my_ mesa 32bit stuff in sync with my main mesa stuff and stop relying on some random fat package to deliver an obsolete 32bit mesa libs together with pile of other random libs.
not that it would help with current condition of handling multilib building in mesa.
Comment 8 Kevin DeKorte 2011-10-03 05:09:17 UTC
Might want to read this mailing list thread I posted about using llvm on 32bit and 64bit builds. I seemed like it might be going somewhere and then it just died.

http://lists.freedesktop.org/archives/mesa-dev/2011-August/010941.html
Comment 9 Matt Turner 2014-09-21 19:45:23 UTC
multilib stuff is now fixed and documented in docs/autoconf.html.


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.