-
Notifications
You must be signed in to change notification settings - Fork 428
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
AUR packaging #19837
AUR packaging #19837
Conversation
Signed-off-by: ghbrown <[email protected]>
@mppf I also ran a build from source with |
I've done a bit more poking around and have the following thoughts:
Anecdotally, this is often a benign warning, but the Arch Wiki suggests running
The first 3 directories in this path exist, but the rest don't exist and I can't find this file. What do you see here if anything? I do have an environment variable called |
I think it's expected for
Right the compiler is just creating a temporary directory in |
util/packaging/aur/chapel/PKGBUILD
Outdated
pkgrel=1 | ||
pkgdesc="Programming language designed for productive parallel computing at scale" | ||
url="https://chapel-lang.org/" | ||
arch=('x86_64') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it is relevant to you but we also support arm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I think I can add arm
to that array then.
check() { | ||
cd "$srcdir/${pkgname}-${pkgver}" | ||
export PATH="$srcdir/${pkgname}-${pkgver}/bin/linux64-x86_64:$PATH" | ||
make check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this checks that chpl
runs before it is installed, right? I think the problem we are seeing is that something about the install process is not working right, so that's why this can pass even though the package is not working. Is there a post-install check available in some way (maybe just for people editing the AUR package and not necessarily something that runs when somebody installs the AUR package)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's my understanding as well, and I think that could be the case.
It is possible for me to include a post install script, but I'm not sure how integrated it is in the build and install process, since the package will already be installed. The one example I have hear is people using this script to bring up end user license agreement and so on, but I'm sure we can get it do more. What exactly were you thinking would go in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just thinking it would be nice to have some scripting so that the maintainer of the Chapel AUR package can easily check that the installation is working. I.e. it could just be a script that you know how to run after installing. If we have that, we can (eventually) get some nightly testing config to check it as well.
I don't know whether or not it would be reasonable to do this with an AUR post install script but I suspect you wouldn't want people just installing the package to always run it. (So then not a post-install).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree post-install is probably not the right tool here, but something like you describe would be nice.
I think the typical approach for AUR packages is to do verification with make check
before install, but that didn't work for us. I'm sure there are issues with this approach, but the way I was going to verify that the installation is working is just by building and running it myself (then addressing user issues as they appear in comments on AUR). This is less of a problem for chapel
since it's frozen until the next release, but perhaps would be problematic for chapel-git
which changes (and possibly breaks) with every PR.
I'm trying to debug the problem on Arch and the instructions you added have been very useful to me. I'm running |
I found a problem when |
Thanks for answering the questions I raised a few days ago. I agree it doesn't make sense to keep a bunch of test-compile executables around. As for the I'm glad you found the instructions useful and have narrowed down the issue! I'm not sure why these arguments aren't added automatically, but if I can dig into anything on my side or run any tests just let me know. I can look into them after the packaging and readme improvements from your comments. |
The old AUR packaging used to have a dependence on Great, glad you found it! Is there a way for me to get around this at build-time when packaging 1.26.0? Your PR will fix things automatically for |
I think it has to be a patch, for this one, unfortunately. The only thing I can think of is somehow getting the pkgbuild stuff to install the .la files but presumably there is a reason it does not. |
Would you be able to do an experiment to see if I don't think we need |
Signed-off-by: ghbrown <[email protected]>
I'm relatively inexperienced at patching manually, but I'm not optimistic about it in this case. Now onto the compile-time errors (though you are apparently not getting any?). Both the unpatched release with the compiler flags you suggested and the fully patched release with no compiler flags give errors like this
Perhaps I'm doing something wrong? As for package dependencies, I added |
@mppf I started work on a I also tried to spot differences in compilation commands with |
The symbols you mentioned ought to be brought in by |
Oh, maybe the difference between our two systems is that you have libnuma installed somewhere and hwloc is auto-detecting it? E.g., for me, I get this:
I think I can install numactl with Given that the
I could probably create a series of patches against 1.26 but let's figure out how to get |
It looks like (from my previous AUR install) that it does install the An aside, I am curious why the AUR install process deletes the .la files, if you are able to figure that out. |
@ghbrown - I've created PR #19913 to hopefully address the .la files issue (which you were observing as a link errors related to missing .SRCINFO
PKGBUILD
Next steps are:
Thanks for your continuing help with this @ghbrown ! |
Apologies for the delay, I was out of town and unavailable for a bit. I plan to catch up on Chapel issues and PRs starting tonight.
Sure, I'd be happy to. Your example PKGBUILD already looks about right, which is great.
I think this is probably the best use of time. I can temporarily change the description of AUR chapel to direct users to chapel-git (once it's up and running) and note that it will revert on upcoming 1.27. |
Signed-off-by: ghbrown <[email protected]>
I've created |
@ghbrown - quick question - is |
Yes, but I am working on my personal machine. Let me know if you find any issues. |
Don't use libtool .la files to get 3p lib flags This PR updates Python scripts in util/chplenv to avoid using libtool .la files in most cases. The reason to avoid .la files is that they are removed by package installation on many systems (in particular, we are facing this problems in attempts to create an AUR package for Arch linux - see #19837). Instead of using libtool .la files, this PR changes the scripts use .pc files where available. The single exception is qthreads which doesn't yet build a .pc file and so we still use .la files there. But, common configurations of qthreads don't add any new dependencies, so the current fallback, if the .la file is missing, on `-Lpath/to/qthreads` `-lqthreads` should be sufficient. The .pc file support was added in #18880 and previous to this PR was only used for Gasnet. In more detail: * changed many calls to `get_bundled_link_args` to `pkgconfig_get_bundled_link_args` and adjusted `pkgconfig_get_bundled_link_args` to help make this easier * adjusted `pkgconfig_get_bundled_link_args` to add -rpath arguments similarly to what `get_bundled_link_args` was doing. I'm pretty sure it is only relevant for libraries that build a .so. It was added in 35f8e21 for libfabric support but the only .so I can see being built in a standard configuration is libgmp.so. Even in a `CHPL_COMM=ofi` build with `CHPL_LIBFABRIC=bundled` I am also not seeing any .so libraries other than libgmp.so. * Leaves the old behavior of `get_bundled_link_args` available as `libtool_get_bundled_link_args` which is currently only used with qthreads. Once the bundled qthreads can generate a .pc file, we can remove this function along with `handle_la`. Here is what we do with each 3p when using bundled, before and after this PR: Key: * libtool: parse .la file, add -Lpath -Wl,-rpath,path, add -lbla if .la file is missing * pkcgonfig: parse .pc file (does not add -L or -rpath arguments) * simple: add -Lpath -Wl,-rpath,path -lbla | 3p | Before this PR | This PR | | :--- | :--- | :--- | | gasnet | pkgconfig | pkgconfig | | gmp | libtool | pkgconfig | | hwloc | libtool | pkgconfig | | jemalloc | custom * | custom | | libfabric | libtool | pkgconfig | | libunwind | libtool | pkgconfig | | llvm | custom * | custom | | qthreads | libtool | libtool (for now) | | re2 | simple * | pkgconfig | Notes * jemalloc uses -ljemalloc and also runs jemalloc-config to get additional dependencies * llvm uses llvm-config but also -lbla for various clang libraries not covered in llvm-config. * re2 doesn't produce a .la file so we were falling back on "simple" previously even though the code looked for a .la file Future Work: * we add -rpath flags for 3rd party libraries that are only built as static libraries, which is mostly harmless, but it adds noise to the already complex link lines. We could consider skipping the -rpath args if the -L directory does not contain any .so files. * the .pc file can also include compilation flags which we currently ignore in most cases. The most likely way this could be relevant is for `-I/path/to/dependency` arguments. * qthreads still uses the .la file but we would like to use a .pc file. We opened sandialabs/qthreads#107 to ask qthreads to generate a .pc file. Reviewed by @ronawho - thanks! - [x] 'make check' works on Mac OS X - [x] 'make check' works on Ubuntu 22.04 - [x] compiler functions after a `make install` if all `.la` files are removed from install prefix on Ubuntu 22.04 - [x] draft AUR package can install, compile and run Hello World - [x] Hello World works on a system using `CHPL_COMM=ofi` with `CHPL_LIBFABRIC=bundled` - [x] full local testing
Great, thanks. I can make the change tomorrow morning, although it will only be to |
@mppf When I use |
Huh, that is weird. As you are observing,
The tag You could consider doing some scripting to parse |
Thanks for confirming and checking it out. |
If you are just getting the hash maybe another command (not |
I think I'm just going to replace the leading part of |
…correct Signed-off-by: ghbrown <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let me know if you feel this version is ready to merge into the Chapel repo or if there is something else you want to do first. I think it's ready to merge once you are satisfied with it. Thanks again for your efforts on the Chapel AUR package!
@@ -0,0 +1,18 @@ | |||
pkgbase = chapel-git | |||
pkgdesc = Programming language designed for productive parallel computing at scale | |||
pkgver = 1.27.0.7648.gbcc4ac3109 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know what the stuff after the 1.27.0 here means? I copied it from something else but I have no idea what it's purpose is. I guess I'm just checking that you know more than I do about it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure exactly what you mean by "copied" it from something else?
The output of the pkgver() function automatically overwrites the pkgver line in PKGBUILD (I think the makepkg
command probably feeds it to sed
or something behind the scenes?).
As for what it means, I'm unsure on the central 4-digit part, but the very last part is g<beginning of most recent commit hash
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I made a hacky chapel-git for my own testing I just copied the version number from the other AUR project I was basing it on. Anyway since it will be overwritten in the PKGBUILD file by running pkgver()
, it might be nice to have a comment to that effect next to the pkgver=
line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying. Just added that comment.
Overall, I'm happy with the state of the PR, but just to make sure we are on the same page about its outstanding deficiencies:
|
@ghbrown - I forgot to ask earlier, but the PR message is now out of date. Would you mind updating it? It would be a good place to call out those deficiencies you just mentioned. |
Adds packaging builds for Arch (Linux) User Repository (AUR). The chapel package for AUR tracks the static 1.26 release, but is non-functional due to issues in 1.26 that cause build issues on Arch. These issues have been resolved, but the chapel AUR package will be left broken until 1.27 releases (the online description points to chapel-git). The chapel-git package for AUR tracks the main branch of the chapel repo, and is fully functional. Future work includes: - updating chapel AUR to use 1.27 upon its release - fixing the git describe behavior for the main branch (currently main reports as version 1.24 via git describe, while it is really 1.26 at the time of writing). Signed-off-by: ghbrown <[email protected]>
I hope that was the correct approach? |
Oh I'm not sure what you did. I was just talking about the text box at the top of the PR that starts with
We (as a matter of practice) turn that into the commit message for the merge when we merge a PR, so its content matters. (Besides browsing PRs when understanding history). Anyway this line is no longer true, right?
|
Ah, thanks. I changed the final git commit message to be more substantial and detailed (following the trend of some others I'd seen in the git log), but didn't change the PR comment here. |
The commit messages can be whatever they were at the time - no need to update them all. The detailed commit messages you are seeing are from merge commits when we paste the PR message (that appears at the top of the PR webpage) into the merge commit message. For the most part our project focuses on PRs as the unit of archeology.
No need to worry about the git commit messages for this. Just update the PR message (which I think you are calling the 1st comment in the PR but it's at the top of the PR webpage either way). Markdown or plain text are both fine - up to you. I do tend to use markdown myself most of the time. |
Yes, thankfully I only changed the last commit message (which was probably for the best anyway). The PR message should be changed too. |
@mppf Thank you for all your help and support on this, it was a pleasure! |
AUR updates for 1.27.0 [PR by @ghbrown - thanks! Reviewed/merged by @mppf] This PR updates the Arch User Repository package "chapel", which is static source. "chapel-git" does not need to be updated since the version in the AUR repos tracks `main` and dynamically collects version numbers, meaning it differs from the packaging here by only two or three strings that change with every install. The previous version of the static source package did not build on Arch due to issues discussed in #19837 . I'm happy to report that there were no issues with 1.27 building on Arch, and the installed compiler also worked on some simple test programs (one of the problems resolved since 1.26). This effectively removes the primary "outstanding issue" from #19837, and all "future work" remains the same as far as I can tell.
Adds packaging and build/test instructions for the Arch (Linux) User Repository (AUR), as per the discourse discussion.
Additions:
main
, but the chapel AUR package will be left broken until 1.27 releases (the online description of the broken AUR points to functioning chapel-git package).Outstanding issues:
git describe --long --tags --always
behavior for the main branch (currently main reports as version 1.24, while it is really 1.26 at the time of writing).Possible future work: