Packaging lix for openSUSE: dependency pegtl not found #471
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#471
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I am trying to package lix for openSUSE, but I fail to get it working due to pegtl. Running
meson setup build --prefix="$PWD/outputs/out"
I get this:There is a pegtl-devel package, that apparently installs the needed dependencies to
/usr/include/tao/pegtl/
. But for whatever reason it is not being found.I saw that the pegtl is defined in the
meson.build
file. I tried changing themodules
line to readtao:pegtl
, as the path is not containingcpp
on openSUSE, but to no avail.Any idea how to get meson / cmake to find the package?
Kind Regards,
Johannes
Hello and thank you for your work!
Here's our pegtl package: https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pe/pegtl/package.nix
It appears that it's completely devoid of content, so i think it's just using the bog standard cmake build, test, install flow. Does your pegtl package expose whichever cmake/pkg-config/etc shipped by upstream?
You can inspect the files installed by ours with
nix build -f '<nixpkgs>' 'pegtl^*'
then looking in the result* symlinks. It is possible, though it would be infuriating, that some of the shenanigans done by the nixpkgs stdenv and cc wrapper somehow were load bearing here but I don't think so: this should just be using pkg-config or cmake.For what it's worth, it looks like openSUSE does include the necessary CMake files that we use to find pegtl at
/usr/share/cmake/Modules/pegtl-config{,-version}.cmake
and those definitely do use a target/module name oftaocpp::pegtl
I'm not sure how meson looks up CMake modules though, so something might be wonky there
Actually is line 66 correct in the rpmspec for pegtl at https://build.opensuse.org/projects/openSUSE:Factory/packages/pegtl/files/pegtl.spec?expand=1? I think it maybe should be going to
%{_libdir}/cmake/pegtl
instead of${_datadir}/cmake/Modules
(edit: See https://cmake.org/cmake/help/book/mastering-cmake/chapter/Finding%20Packages.html for differences in Module mode vs Config mode for finding CMake packages -- this generates for Config mode but the current directory the rpmspec is placing the file into is only searched for Module mode)
If I recall correctly you can get the full details out of the build directory somewhere, and the meson configure log mentioned in the configure failure message gives some detail on the fake meson project in use.
Thanks for checking.
I switched to using meson instead of just, because yet another layer of abstraction seemed to not make things better.
Maybe I am just missing an option for meson, probably one of the many things that might be set in
$mesonFlags
? I have not found out how 'just' would set them, I just found that packages.nix contains lots of things that might (or might not) be in there.I can try repackaging, but as this package is already in Tumbleweed and seems to be used by other packages, I daresay it should be correct. Of course, it might be correct with an option that other packages are handing over to meson/cmake to have it find the packages.
But other packages were found by the lix meson/cmake build, so it may be a flaw in the package.
OK, I tried with a modified version of the pegtl package. Actually two, one with the cmake modules in
_libdir
and one completely without them.Both tries failed.
So I daresay the pegtl-devel package is not the problem, somehow meson/cmake fail to find it for $REASONS.
With the following changes to your
pegtl.spec
file at https://build.opensuse.org/projects/home:ojkastl_buildservice:Branch_devel_tools/packages/pegtl/files/pegtl.spec?expand=1, it seems to work for me. Does this work for you?Thanks for checking @lilyinstarlight,
I can confirm that the lix package finds the pegtl library with your changes.
I'll submit them upstream and see what the openSUSE folks say.
Hmm, I can't close this issue. Could someone close it, please?