-
Notifications
You must be signed in to change notification settings - Fork 246
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
Please port the gnu --prefix and --libdir options to meson #474
Comments
It looks like the issue is with rootprefix not being smart enough by default to detect whether a system has the /usr merge. Currently the default rootprefix is '/', but it should be '/usr' if /bin is a symlink. To fix this, I'll need to require >= meson 0.53.0. I will run a test on ci to make sure that is possible. The issues you are seeing in the "support" directory are a separate issue that exists with the gnu make build system as well. |
This requires at leaste meson 0.53.0 since it uses the fs module. This is for #474.
I can't think of a reason to do this since these scripts are just examples. This is for #474.
I can't think of a reason to do this since these scripts are just examples. This is for #474.
Thanks for the response and code changes. I tried compiling the 0.44.9 tarball with meson-0.60.2, with commit "build: set rootprefix_default to /usr if on a /usr merged system" patched in, and without option "-D rootprefix=/usr". The "meson install" failure "ln: failed to create symbolic link..." I reported is fixed. The init.d example files now match between gnu make and meson builds. I only noticed a few differences summarized by the diff below.
To summarize, when building with meson, I'm seeing duplicates of /usr/bin and /usr/sbin in the _sanitize_path function in file functions.sh and /usr/etc/init.d in the _done_dirs variable in file gendepends.sh (maybe this is a valid path for /etc on some systems?). I don't know how helpful this information is, but I wanted to report back with something. Thanks again for everything! EDIT: replaced autotools with gnu make |
@0strodamus I deliberately didn't include the extra commit you patched in because it will break one of my downstream users. Alpine is using muon instead of meson, and they don't have support for fs.is_symlink yet. Also, I don't know how you are doing an autotools build, there is no support for autotools in the repository. |
My mistake, I meant gnu make. I corrected my original post. Sorry for any confusion! |
@0strodamus No problem. :-) Can you show me the commands you are using to do the build (both for meson and gnu make) I? |
Sure! I hope I'm not doing something stupid! For gnu make, I'm using command:
For meson, I'm applying Artix Linux's librcdir patch and using commands:
|
@0strodamus Sorry I didn't get back to this right away. Based on your diffs, it looks like the only remaining issue is the setting of PKG_PREFIX, right? |
No problem. PKG_PREFIX and also /bin|/sbin are getting removed/replaced by duplicate /usr/bin|/usr/sbin entries in functions.sh when building with meson. |
Maybe also relevant: mesonbuild/meson#2561 Seems like much of the complexity here is for the purpose of circumventing this limitation? Four years later, it is under consideration again to remove the restriction. FWIW muon doesn't seem to care. So it would also be possible to just build with muon. But it would still be good to discuss removing the restriction in meson too. |
@eli-schwartz Maybe. I took the idea of ROOTPREFIX from http://github.com/systemd/systemd. I guess they have a similar issue where prefix is /usr but some things are installed optionally on /. |
@eli-schwartz I am unable to build openrc with muon. The last time I attempted it, the fs module didn't have the is_symlink() function, e.g. something like this fails:
Also , as of right now, muon can't be bootstrapped. |
I see that openrc has added is_symlink usage since the time that I tested building openrc via muon. (Sure it can be bootstrapped, there is a giant section in the README.md with the header "building", and the only build instructions for the project are for bootstrapping. This is not something easy to confuse.) |
@eli-schwartz This is what happens when I try to bootstrap the current git version. |
That error message says that the You would get the same error if you tried building with meson and didn't disable the |
Please port the gnu --prefix and --libdir options to meson before removing the gnu make build system.
Passing options "--prefix=/usr --libdir=/usr/lib" results in command "meson configure build" showing the correct values under "User defined options" such as:
bindir : /usr/bin
libdir : /usr/lib
sysconfdir : /etc
However, the "meson compile" build still installs things in the default locations. This results in a "meson install" failure of "ln: failed to create symbolic link '/home/.../openrc-0.44.8-1/pkg/openrc/usr/bin/service': No such file or directory" due to the file actually being in '/home/.../openrc-0.44.8-1/pkg/openrc/bin/service' (missing /usr).
I can use the option "-D rootprefix=/usr" like Artix is doing to workaround this, however then I find oddities like "openvpn_dir:=/usr/etc/openvpn" (incorrect /usr prefix) in /usr/share/openrc/support/init.d.examples/openvpn instead of "openvpn_dir:=/etc/openvpn".
I don't feel comfortable migrating my system to meson builds until they are a 1:1 match with the gnu make builds. Thanks in advance for any consideration to porting these options before removing gnu make support and for providing openrc. Your hard work is much appreciated!
The text was updated successfully, but these errors were encountered: