LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-27-2022, 04:55 PM   #1
iluvatar1
LQ Newbie
 
Registered: Apr 2014
Posts: 26

Rep: Reputation: Disabled
Cannot rebuild mesa from official slackbuild in latest current, problems with openmpi


Hi,
I know this sounds crazy, but I was having segfaults with openmpi and, after many investigations, hair pulling, redoing the virtual machines, etc, I found that the segfault goes away if I remove the mesa package. Then I though I could just recompile it to check if it works, so I downloaded the official current slackbuild and surprisingly mesa does not build succesfully. I am using the latest current slackware64 version (Wed 26 2022). How can I track the root problem, which is very strange? I also has suspicions on the llvm packages since mesa also says something like "undefined reference to `LLVMInitializeBPFTarget" but this goes way out of my league.

FULL DETAILS


This is the original segfault from mpi (version 4.1.0 and 4.1.2 tested, installed with sbopkg, even after recompiling and using the latest version for hwloc)

Quote:
❯ mpirun -np 2 /bin/hostname
[sala36:08418] *** Process received signal ***
[sala36:08418] Signal: Segmentation fault (11)
[sala36:08418] Signal code: Address not mapped (1)
[sala36:08418] Failing at address: 0x10
[sala36:08418] [ 0] /lib64/libpthread.so.0(+0x123a0)[0x7feca9f213a0]
[sala36:08418] [ 1] /usr/lib64/gallium-pipe/pipe_iris.so(+0x5d16c9)[0x7feca15b26c9]
[sala36:08418] [ 2] /usr/lib64/gallium-pipe/pipe_iris.so(+0x1b590e)[0x7feca119690e]
[sala36:08418] [ 3] /usr/lib64/gallium-pipe/pipe_iris.so(+0x1b5613)[0x7feca1196613]
[sala36:08418] [ 4] /usr/lib64/gallium-pipe/pipe_iris.so(+0x13eaf7)[0x7feca111faf7]
[sala36:08418] [ 5] /usr/lib64/libMesaOpenCL.so.1(+0x6582b)[0x7feca9ab982b]
[sala36:08418] [ 6] /usr/lib64/libMesaOpenCL.so.1(+0x5407c)[0x7feca9aa807c]
[sala36:08418] [ 7] /usr/lib64/libMesaOpenCL.so.1(+0x601e8)[0x7feca9ab41e8]
[sala36:08418] [ 8] /usr/lib64/libMesaOpenCL.so.1(+0x327fb)[0x7feca9a867fb]
[sala36:08418] [ 9] /lib64/ld-linux-x86-64.so.2(+0x1138e)[0x7fecaa49b38e]
[sala36:08418] [10] /lib64/ld-linux-x86-64.so.2(+0x11470)[0x7fecaa49b470]
[sala36:08418] [11] /lib64/libc.so.6(_dl_catch_exception+0xad)[0x7feca9e777dd]
[sala36:08418] [12] /lib64/ld-linux-x86-64.so.2(+0x15984)[0x7fecaa49f984]
[sala36:08418] [13] /lib64/libc.so.6(_dl_catch_exception+0x65)[0x7feca9e77795]
[sala36:08418] [14] /lib64/ld-linux-x86-64.so.2(+0x14f28)[0x7fecaa49ef28]
[sala36:08418] [15] /lib64/libdl.so.2(+0x1278)[0x7fecaa2f0278]
[sala36:08418] [16] /lib64/libc.so.6(_dl_catch_exception+0x65)[0x7feca9e77795]
[sala36:08418] [17] /lib64/libc.so.6(_dl_catch_error+0x1f)[0x7feca9e7783f]
[sala36:08418] [18] /lib64/libdl.so.2(+0x1949)[0x7fecaa2f0949]
[sala36:08418] [19] /lib64/libdl.so.2(dlopen+0x36)[0x7fecaa2f02f6]
[sala36:08418] [20] /usr/lib64/libOpenCL.so.1(+0x664c)[0x7fecaa0e264c]
[sala36:08418] [21] /usr/lib64/libOpenCL.so.1(+0x682f)[0x7fecaa0e282f]
[sala36:08418] [22] /usr/lib64/libOpenCL.so.1(clGetPlatformIDs+0xc3)[0x7fecaa0e3693]
[sala36:08418] [23] /usr/lib64/libhwloc.so.15(+0x329d4)[0x7fecaa2999d4]
[sala36:08418] [24] /usr/lib64/libhwloc.so.15(+0x968e)[0x7fecaa27068e]
[sala36:08418] [25] /usr/lib64/libhwloc.so.15(hwloc_topology_load+0x710)[0x7fecaa278d60]
[sala36:08418] [26] /usr/lib64/libopen-pal.so.40(opal_hwloc_base_get_topology+0xf08)[0x7fecaa364358]
[sala36:08418] [27] /usr/lib64/openmpi/mca_ess_hnp.so(+0x58a6)[0x7feca9ced8a6]
[sala36:08418] [28] /usr/lib64/libopen-rte.so.40(orte_init+0x2b0)[0x7fecaa42d460]
[sala36:08418] [29] /usr/lib64/libopen-rte.so.40(orte_submit_init+0x863)[0x7fecaa3e1083]
[sala36:08418] *** End of error message ***
[1] 8418 segmentation fault mpirun -np 2 /bin/hostname
```
The, after just `slackpkg remove mesa` (a tip after running gdb mpirun), the output from the same command is

Quote:
❯ mpirun -np 2 /bin/hostname
sala36
sala36
So mpirun works without mesa. Then, I downloaded the mesa.SlackBuild stuff from https://mirrors.slackware.com/slackw...source/x/mesa/ , I tried to recompile mesa (tested 21.3.{1,2,...,5} versions) and I get an error with libMesaOpenCL
Quote:
[2634/2640] Linking target src/gallium/targets/opencl/libMesaOpenCL.so.1.0.0
FAILED: src/gallium/targets/opencl/libMesaOpenCL.so.1.0.0
c++ -o src/gallium/targets/opencl/libMesaOpenCL.so.1.0.0 -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libMesaOpenCL.so.1 -Wl,--whole-archive src/gallium/frontends/clover/libclover.a -Wl,--no-whole-archive -O2 -fPIC src/gallium/auxiliary/pipe-loader/libpipe_loader_dynamic.a src/loader/libloader.a src/util/libxmlconfig.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/gallium/auxiliary/libgallium.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/gallium/frontends/clover/libclllvm.a src/gallium/frontends/clover/libclspirv.a src/gallium/frontends/clover/libclnir.a -Wl,--gc-sections -Wl,--version-script /tmp/mesa-21.3.5/src/gallium/targets/opencl/opencl.sym /usr/lib64/libz.so -pthread -lm -ldl /usr/lib64/libunwind.so /usr/lib64/libelf.so /usr/lib64/libclang-cpp.so /usr/lib64/libdrm.so /usr/lib64/libexpat.so /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/../../../../lib64/libzstd.so -lLLVMOption -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMCFGuard -lLLVMX86Desc -lLLVMX86Info -lLLVMMCJIT -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCoverage -lLLVMAMDGPUDisassembler -lLLVMMCDisassembler -lLLVMAMDGPUAsmParser -lLLVMAMDGPUCodeGen -lLLVMMIRParser -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAMDGPUDesc -lLLVMAMDGPUUtils -lLLVMAMDGPUInfo -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lsensors -lLLVMOption -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMCFGuard -lLLVMX86Desc -lLLVMX86Info -lLLVMMCJIT -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCoverage -lLLVMAMDGPUDisassembler -lLLVMMCDisassembler -lLLVMAMDGPUAsmParser -lLLVMAMDGPUCodeGen -lLLVMMIRParser -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAMDGPUDesc -lLLVMAMDGPUUtils -lLLVMAMDGPUInfo -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -Wl,--end-group
/usr/bin/ld: src/gallium/frontends/clover/libclllvm.a(llvm_invocation.cpp.o): in function `(anonymous namespace)::create_context(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
invocation.cpp.text._ZN12_GLOBAL__N_114create_contextERNSt7__cxx1112basic_stringIcSt11char_traitsI cESaIcEEE+0x56): undefined reference to `LLVMInitializeBPFTarget'
/usr/bin/ld: invocation.cpp.text._ZN12_GLOBAL__N_114create_contextERNSt7__cxx1112basic_stringIcSt11char_traitsI cESaIcEEE+0x65): undefined reference to `LLVMInitializeBPFTargetInfo'
/usr/bin/ld: invocation.cpp.text._ZN12_GLOBAL__N_114create_contextERNSt7__cxx1112basic_stringIcSt11char_traitsI cESaIcEEE+0x74): undefined reference to `LLVMInitializeBPFTargetMC'
/usr/bin/ld: invocation.cpp.text._ZN12_GLOBAL__N_114create_contextERNSt7__cxx1112basic_stringIcSt11char_traitsI cESaIcEEE+0x83): undefined reference to `LLVMInitializeBPFAsmParser'
/usr/bin/ld: invocation.cpp.text._ZN12_GLOBAL__N_114create_contextERNSt7__cxx1112basic_stringIcSt11char_traitsI cESaIcEEE+0x92): undefined reference to `LLVMInitializeBPFAsmPrinter'
collect2: error: ld returned 1 exit status
[2640/2640] Linking target src/gallium/targets/dri/libgallium_dri.so
ninja: build stopped: subcommand failed.
 
Old 01-27-2022, 06:31 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,374

Rep: Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754
Have you seen this?

Perhaps rebuilding LLVM without -DBUILD_SHARED_LIBS=ON (the Slackware default) and with the options discussed here is required.
 
Old 01-27-2022, 08:10 PM   #3
iluvatar1
LQ Newbie
 
Registered: Apr 2014
Posts: 26

Original Poster
Rep: Reputation: Disabled
Excellent search skills thanks.
Yes, after following the links you posted, I recompiled LLVM with DLYB on, and then mesa compiled in current! But the problem with openmpi persists. I tried also recompiling llvm, then mesa, then openmpi, same problem. There must be some interdependence which is above my understanding. For now, and given that we are using the computers remotely, I will just keep mesa uninstalled. Also I will use the opempi implementation from spack.
Thanks for your help
 
  


Reply

Tags
llvm, mesa3d, mpi



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] current: mesa rebuild marrowsuck Slackware 2 04-04-2020 10:04 PM
[SOLVED] mesa-19.3.4-x86_64-1 - crash of the X11 server on a box with AM3 Athlon x4 605e running -current and latest Plasma5 LuckyCyborg Slackware 19 02-16-2020 04:48 AM
[SOLVED] How to rebuild the corrupted rebuild RPM database pantdk Linux - Server 3 02-19-2015 01:01 AM
[SOLVED] Mesa 10.1.5 (-current) Slackbuild change to run on AMD HD7750 sberthelot Slackware 4 08-03-2014 01:36 AM
Problems compiling OpenMPI in SLES 11 bighoppa SUSE / openSUSE 6 05-04-2010 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration