Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hsa-rocr] Update PKGBUILD to correctly build without 'chroot' #885

Closed
wants to merge 1 commit into from

Conversation

grinness
Copy link

Add exports for CMAKE to correctly pick-up rocm llvm and clang(++) installed by package [rocm-llvm] in repo [rocm-arch]

Add exports for CMAKE to correctly pick-up rocm llvm and clang(++) installed by package [rocm-llvm] in repo [rocm-arch]
@grinness grinness changed the title Update PKGBUILD [hsa-rocm] Update PKGBUILD to correctly build without 'chroot' Oct 16, 2022
@grinness grinness changed the title [hsa-rocm] Update PKGBUILD to correctly build without 'chroot' [hsa-rocr] Update PKGBUILD to correctly build without 'chroot' Oct 16, 2022
@AdamNiederer
Copy link

This resolves #882 and #881 as well; thank you!

@tpkessler
Copy link
Member

PKGBUILDs are designed to work in a clean chroot, not in any possible user environment. Therefore, I won't accept your PR. In ee888ba I've updated the readme with further information. AGAIN: Clean chroot is the way to go. A "correct" build without a clean chroot does not exist.

@tpkessler tpkessler closed this Oct 17, 2022
@grinness
Copy link
Author

grinness commented Oct 17, 2022

@tpkessler

This is not correct, See:
https://wiki.archlinux.org/title/PKGBUILD
(aka there is no mandatory requirement for chroot, in fact pacman already does that in specific circustances -- see paragraph 6.3 in the link above)

Furthermore, those environments var are a simple consequence of requiring a specific version of llvm, that is a pre-requisite for [rocm-rocr] and installed by rocm-llvm from the same repo -- so you know already where those dependencies are and how to configure them.

Finally, you should check the mess in the PKGBUILD for pytorch-rocm in repo [rocm-arch]:
https://github.com/rocm-arch/python-pytorch-rocm/blob/master/PKGBUILD

Anyhow, expect low 'end-user' accept rate and lots of issues open.
Personally I am moving to docker container and leave to you this mess.

All the best

@tpkessler
Copy link
Member

This is not correct

All packages in the Arch Linux repositories are built in a clean chroot.

so you know already where those dependencies are and how to configure them

This is the job of cmake. Again: I cannot write the build script to have a fallback for any possible user configuration.

you should check the mess

Please don't be rude. Everyone is doing this voluntarily here. We should be very grateful for their work. I'm not responsible for python-pytorch-rocm. Please open an issue / PR here.

accept rate and lots of issues open

I'll explain them everything they want to know. No worries.

@grinness
Copy link
Author

These packages are not in the (Official) Arch Linux repos, they are on the AUR -- Arch USER Repo
Users expect to use a simple helper to install stuff (e,g: yay). -- any other package in the AUR compiles and installs without chroot (chroot is mainly for developers as pacman/yay/... use aready a fakeroot for security and isolation).

As a matter of fact last night I installed (compiled) all rocm 5.3 from this repo without the need of any chroot, only 4 exports.
I also spent time to figure out the issue and submitted a PR (as requested by your colleagues) for free ...
And note that your colleagues thanked me for the PR as it solves other issues too related to the hard dependency on rocm-llvm local install -- a PR that you simply canned due to (legitimate) aspiration of being considered for some official arch repo.

Maybe publish the packages onto the ADR (Arch DEVELOPER Repo), if it exists.

and for python-pythorch-rocm ... you can figure it out, I personally do not think that much else can be done (the 'mess' was sarcastic, in the sense that you refused a PR with 4 exports, while in that PKGBUILD there is a lot more, and if you want you can check also the tesorflow-rocm to)

All the best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants