Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 673002 - media-libs/mesa-18.3.1[gallium,test] fails to link tests
Summary: media-libs/mesa-18.3.1[gallium,test] fails to link tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2018-12-12 12:40 UTC by Mart Raudsepp
Modified: 2019-03-04 06:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log with meson-0.47.1 (fail) (build.log.xz,44.61 KB, application/x-xz)
2018-12-12 15:15 UTC, Mart Raudsepp
Details
build.log with meson-0.48.2 (success) (build.log.xz,82.74 KB, application/x-xz)
2018-12-12 15:17 UTC, Mart Raudsepp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2018-12-12 12:40:00 UTC
gallium tests fail to link with mesa-18.3.0 and 18.3.1.
I can't find anything that obviously changed to break it between 18.2.6 and 18.3.1, at least in the build system -- code added u_cpu_detect.c that has another call to call_once, which might now be implicitly needed by tests, while add_to_atexit_list maybe wasn't needed before. It is suspect that -pthread is missing from these g++ calls, despite mesa_util stuff referencing it in meson.build. Maybe only gl_priv_libs has what's necessary?

Some unrelated parts of my system aren't fully up to date, but if that's the problem, then it'd mean we have missing minimum deps here or something instead, but I don't think this can be the case. It feels like a build system bug, and just not many build tests with gallium or something?
git master fails the same for me, when same meson configuration is used.


FAILED: src/gallium/tests/trivial/quad-tex 
x86_64-pc-linux-gnu-g++ -m32  -o src/gallium/tests/trivial/quad-tex 'src/gallium/tests/trivial/src@gallium@tests@trivial@@quad-tex@exe/quad-tex.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group src/util/libmesa_util.a src/gallium/auxiliary/libgallium.a src/gallium/auxiliary/pipe-loader/libpipe_loader_dynamic.a src/loader/libloader.a src/util/libxmlconfig.a /usr/lib32/libz.so -lm -Wl,--end-group /usr/lib32/libdrm.so -L/usr/lib64/llvm/7/lib32 -lLLVMAMDGPUDisassembler -lLLVMAMDGPUCodeGen -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMAMDGPUAsmParser -lLLVMAMDGPUDesc -lLLVMAMDGPUInfo -lLLVMAMDGPUAsmPrinter -lLLVMAMDGPUUtils -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMProfileData -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -ldl -lm /usr/lib32/libexpat.so -lm -O2 -pipe -march=native -fno-omit-frame-pointer -ggdb -frecord-gcc-switches -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu 
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/util/libmesa_util.a(u_cpu_detect.c.o): in function `call_once':
/tmp/portage/media-libs/mesa-18.3.1/work/mesa-18.3.1-abi_x86_32.x86/../mesa-18.3.1/src/../include/c11/threads_posix.h:96: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
[1291/1346] /usr/bin/python3.6 /usr/lib64/python-exec/python3.6/meson --internal symbolextractor src/gallium/targets/graw-null/libgraw_null.so 'src/gallium/targets/graw-null/src@gallium@targets@graw-null@@graw_null@sha/libgraw_null.so.symbols' --cross-host=linux
[1292/1346] x86_64-pc-linux-gnu-g++ -m32  -o src/gallium/tests/trivial/tri 'src/gallium/tests/trivial/src@gallium@tests@trivial@@tri@exe/tri.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group src/util/libmesa_util.a src/gallium/auxiliary/libgallium.a src/gallium/auxiliary/pipe-loader/libpipe_loader_dynamic.a src/loader/libloader.a src/util/libxmlconfig.a /usr/lib32/libz.so -lm -Wl,--end-group /usr/lib32/libdrm.so -L/usr/lib64/llvm/7/lib32 -lLLVMAMDGPUDisassembler -lLLVMAMDGPUCodeGen -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMAMDGPUAsmParser -lLLVMAMDGPUDesc -lLLVMAMDGPUInfo -lLLVMAMDGPUAsmPrinter -lLLVMAMDGPUUtils -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMProfileData -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -ldl -lm /usr/lib32/libexpat.so -lm -O2 -pipe -march=native -fno-omit-frame-pointer -ggdb -frecord-gcc-switches -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu 
FAILED: src/gallium/tests/trivial/tri 
x86_64-pc-linux-gnu-g++ -m32  -o src/gallium/tests/trivial/tri 'src/gallium/tests/trivial/src@gallium@tests@trivial@@tri@exe/tri.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group src/util/libmesa_util.a src/gallium/auxiliary/libgallium.a src/gallium/auxiliary/pipe-loader/libpipe_loader_dynamic.a src/loader/libloader.a src/util/libxmlconfig.a /usr/lib32/libz.so -lm -Wl,--end-group /usr/lib32/libdrm.so -L/usr/lib64/llvm/7/lib32 -lLLVMAMDGPUDisassembler -lLLVMAMDGPUCodeGen -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMAMDGPUAsmParser -lLLVMAMDGPUDesc -lLLVMAMDGPUInfo -lLLVMAMDGPUAsmPrinter -lLLVMAMDGPUUtils -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMProfileData -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -ldl -lm /usr/lib32/libexpat.so -lm -O2 -pipe -march=native -fno-omit-frame-pointer -ggdb -frecord-gcc-switches -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu 
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/util/libmesa_util.a(u_cpu_detect.c.o): in function `call_once':
/tmp/portage/media-libs/mesa-18.3.1/work/mesa-18.3.1-abi_x86_32.x86/../mesa-18.3.1/src/../include/c11/threads_posix.h:96: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
Comment 1 Mart Raudsepp gentoo-dev 2018-12-12 14:25:24 UTC
The problem went away after meson got upgraded from 0.47.1 to 0.48.2 - should upstream and us depend on that version, or can it be made to work with older meson too (for upstream to support building with older meson for enterprise distros or so)? Or something else wonky going on, or a temporary 0.47.1 regression, or...
Comment 2 Mart Raudsepp gentoo-dev 2018-12-12 14:41:04 UTC
With meson-0.47.1 -pthread is not passed to those failing compiler calls, and with meson-0.48.2 it is
Comment 3 Mart Raudsepp gentoo-dev 2018-12-12 15:15:14 UTC
Created attachment 557674 [details]
build.log with meson-0.47.1 (fail)
Comment 4 Mart Raudsepp gentoo-dev 2018-12-12 15:17:27 UTC
Created attachment 557676 [details]
build.log with meson-0.48.2 (success)

For our purposes, I guess just raising meson dep would be fine (or telling I'm some corner case and do nothing), but upstream handling is more interesting maybe. I don't have the motivation/energy to go upstream myself right now, though, and some of this might be related to this crossfile stuff of ours somehow maybe.
Comment 5 Jeremy Murphy 2019-02-01 10:33:43 UTC
I have different USE flags (no gallium or test) but mesa 18.3.2 is failing to link for me due to undefined references too; different symbols, mind you, for example:

.../ccKmnS0C.ltrans1.ltrans.o: In function `dri2Flush.constprop.6':
<artificial>:(.text+0xe86): undefined reference to `glFlush'

and several more.

That's using meson 0.48.2; I'll experiment with using a more recent version.
Maybe the same underlying problem, maybe not.
Comment 6 Jeremy Murphy 2019-02-01 10:39:57 UTC
Well, same result for meson 0.49.1. I'll open a new bug, although it might turn out to be the same thing.
Comment 7 Matt Turner gentoo-dev 2019-03-04 06:25:07 UTC
(In reply to Mart Raudsepp from comment #4)
> Created attachment 557676 [details]
> build.log with meson-0.48.2 (success)
> 
> For our purposes, I guess just raising meson dep would be fine (or telling
> I'm some corner case and do nothing), but upstream handling is more
> interesting maybe. I don't have the motivation/energy to go upstream myself
> right now, though, and some of this might be related to this crossfile stuff
> of ours somehow maybe.

meson.eclass now has

MESON_DEPEND=">=dev-util/meson-0.48.2"

so I think we're good here.