View previous topic :: View next topic |
Author |
Message |
jeffss n00b
Joined: 13 Sep 2019 Posts: 55
|
Posted: Mon Apr 24, 2023 12:19 am Post subject: help on getting ebuild to work with multilib |
|
|
I am writing a modified version of the media-libs/mesa ebuild for adding support for rusticl. So far I resolved must of the problems, except for getting it to work with multilib, currently my situation is to either try it with only x86_64 ABI, but fail to compile because of its dependencies on very basic system libraries, or to reinstall all the problematic dependencies as x86_64 ABI. A necessity I had for this ebuild is that the ROCm in which the opencl support on AMD GPUs depend, does need PCIe with Atomics. So I am trying this other opencl system by mesa to find if it will support my system, as the clover driver also wont support because my GPU is newer then what is supported by clover, an AMD Radeon Pro WX 2100
page with informations I used for writing the ebuild: https://docs.mesa3d.org/rusticl.html
here is the error shown: https://pastebin.com/eBbZgxjZ
the patch I used for that ebuild:
Code: |
diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build
index a082a87..4ae80a5 100644
--- a/src/compiler/clc/meson.build
+++ b/src/compiler/clc/meson.build
@@ -19,7 +19,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-clang_resource_dir = join_paths(llvm_libdir, 'clang', dep_llvm.version(), 'include')
+clang_resource_dir = join_paths('/usr/lib/clang', dep_llvm.version(), 'include')
if dep_llvm.version().version_compare('< 15.0')
opencl_c_h = custom_target(
|
the ebuild itself (look for the USE flag rusticl for most of the changes):
https://pastebin.com/KghgS137
the modified llvm ebuild for supporting rusticl: https://pastebin.com/NtikBg72
for further information, the lspci output:
https://pastebin.com/DF6WBmK4
and the message from dmesg:
Code: | [ 1.211364] kfd kfd: amdgpu: skipped device 1002:6995, PCI rejects atomics 730<0 |
Last edited by jeffss on Thu Jun 08, 2023 9:57 pm; edited 2 times in total |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9605 Location: beyond the rim
|
Posted: Mon Apr 24, 2023 7:37 am Post subject: Re: help on getting ebuild to work with multilib environment |
|
|
jeffss wrote: | I am writing a modified version of the media-libs/mesa ebuild for adding support for rusticl. So far I resolved must of the problems, except for getting it to work with multilib, currently my situation is to either try it with only x86_64 ABI, but fail to compile because of its dependencies on very basic system libraries, or to reinstall all the problematic dependencies as x86_64 ABI. |
Not quite sure I can follow you there. The error you posted is from the attempt of building the 32 bit version of the package (abi_x86_32), which fails due to trying to link to 64 bit object files. Which likely is a result of the first error:
Code: | Compiler for language rust for the build machine not found.
../mesa-22.3.7/meson.build:937:2: ERROR: Rust compiler rustc -C linker=x86_64-pc-linux-gnu-gcc -C link-arg=-m32 -C link-arg=-mfpmath=sse can not compile programs. |
Also why do you need to hardcode the path to clang in meson? Looks like it would cause problems, not solve them. But then I don't know much about llvm/clang/rust. |
|
Back to top |
|
|
jeffss n00b
Joined: 13 Sep 2019 Posts: 55
|
Posted: Mon Apr 24, 2023 2:00 pm Post subject: |
|
|
I was having problem with the building operation not finding a header, then the header was inside the folder that I hardcoded there and when I used Code: | equery f sys-devel/clang | the output indicated that the meson configuration was likely pointing to the wrong location, which was a merge of the llvm path, followed by a path related to clang
Thanks for the clarification about Rust, I am able to at least install the ebuild if I drop the x86_32 abi. However for system upgrades it is still a problem, as many reverse dependencies need it. I know at least that I can use the rust-toolchain eclass. However my problem seems to be that rust calls the c compiler to build for 64 abi and then tries to link in 32, when building for the 32 abi, and I am not being able to change the build target of the objects. I dont know if I should use an external flag or change the meson configuration |
|
Back to top |
|
|
jeffss n00b
Joined: 13 Sep 2019 Posts: 55
|
Posted: Sun Jun 18, 2023 12:06 am Post subject: |
|
|
now I am being able to install the multilib version by restricting the rusticl feature to x86_64:
Code: |
if use rusticl && [[ ${MULTILIB_ABI_FLAG} == x86_64 ]]; then
RUST_TARGET="$(rust_abi x86_64)"
emesonargs+=(
-Dgallium-rusticl=true
-Dllvm=enabled
-Drust_std=2021
)
fi
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|