Comments (10)
The testsuite also needs bash.
Using util-linux on Windows without having run the testsuite is not something that seems advisable.
from util-linux.
We need to call the script from autotools, and dependence on Python is overkill in this case.
The script uses .tarball-version
as a fallback if there is no git; it might be possible to use the file directly in Meson on platforms where the script cannot be executed.
Or you can write a meson function to replace the script and use it only if the original script cannot be executed.
from util-linux.
Thanks! That sounds good. For reference, I found a related issue mesonbuild/meson#688.
from util-linux.
Did you test that it actually works after replacing the tools/git-version-gen
?
There should at least also be issues with tools/all_syscalls
and tools/all_errnos
as they are using bash.
If bash is fine, maybe tools/git-version-gen
can also use it.
from util-linux.
Did you test that it actually works after replacing the
tools/git-version-gen
?
Nope, I haven't gotten that far yet. This is just the first hurdle, but I'll try to test out how far I get with the project version hard-coded.
There should at least also be issues with
tools/all_syscalls
andtools/all_errnos
as they are using bash.
These should be fine as is since those two tools are just used to generate two header files, which are only used by a couple of executables, lsfd
and enosys
. There is already an option to disable lsfd
, we might just need an option to disable enosys
. This assumes that lsfd
and enosys
shouldn't be built on Windows. If they should still be built on Windows, that will require more work.
If bash is fine, maybe
tools/git-version-gen
can also use it.
It would be ideal to avoid any extra dependencies on Windows, such as Bash.
from util-linux.
So, I've delved into the details a bit further on this. There's a couple different approaches that could be taken. Unfortunately, the project
command isn't very flexible, and I'm not sure how you would manage to run multiple commands via run_command
in the argument for version
, which seems to be the only way to use commands for the version. It seems like using some sort of external script is necessary to set the project version as is currently done. Meson supports using a file as an argument for version
, but this file would then need to be present at all times.
- Probably the most straightforward approach is to add a Python script equivalent to
tools/git-version-gen
that is only used by Meson. This doesn't introduce a new dependency since Meson already requires Python and Autotools can continue to usetools/git-version-gen
. The downside is that this duplicates code a bit. - An alternative approach is to hard-code the project version for the
project
command or omit it altogether and use a separate variable to hold the project version. Thetools/git-version-gen
functionality could then be implemented directly in Meson, use a separate Python script to set this variable, or perhaps use Meson's vcs_tag function somehow. The drawback here is that the version for theproject
command is still important for whenutil-linux
is used as a subproject. Thus, the version would still need to be hard-coded and updated on every release.
from util-linux.
The question is, why do you want to use util-linux if you do not have other essential utilities like bash or coreutils? It sounds like an academic exercise :-)
Note that I do not have a problem with supporting non-Linux platforms, but the support must not negatively impact usability on Linux, as it is our primary audience.
from util-linux.
I'm mostly just ignorant of the current support for Windows, since I know that it is possible to build util-linux
on Windows. I wasn't aware of the platform support and requirements, but now it's more apparent that compiling for Windows involves using particular toolchains like MSYS2. Trying to use Meson, I wasn't sure if util-linux
needed this environment or if it was just required previously for Autotools.
There was just a Conan package submitted to package gnu-getopt
from util-linux
and it supports Windows, which made me curious. I'd be fine closing this as wont-fix
, now that I understand the situation better. I'd rather not rewrite the entire test suite. ๐ Maybe the requirements for Windows are worth mentioning somewhere or already are mentioned somewhere?
from util-linux.
Does it work on Windows when bash is available during build?
from util-linux.
Does it work on Windows when bash is available during build?
Apparently it should using MSYS and a non-MVSC compiler, but I haven't tested myself.
from util-linux.
Related Issues (20)
- meson: Missing function declarations in sys-utils/irqtop.c
- meson: Fails to compile when zlib.h is missing
- meson: Missing sys/vfs.h header when compiling libmount on macOS HOT 3
- meson: The linker flag --version-script is not supported on macOS
- How to update util-linux to 2.40 on Ubuntu 16.04 HOT 4
- util-linux-script 2.37.4 left after ssh session disconnected HOT 2
- dmesg -H output broken HOT 7
- 2.40 inconsistent smartcols output HOT 1
- swapoffโs man page makes it seem like swapoff has more options than it actually does HOT 2
- lsns: failure of lsns/ioctl_ns test case in the stable branch
- hexdump Europe/London tzfile(5) not advancing offset pointer across many line format file
- Heap-buffer-overflow in `findmnt` when showing the `SOURCES` column HOT 1
- Regression: umount exits non null due to restrictive permissions of utab.lock in 2.40 HOT 1
- lsns 2.39.2 segfaults enumerating network namespaces created by `ip` HOT 3
- getopt: '-?' short option is not supported
- 2.40 make error HOT 4
- scriptreplay: add interactive playback controls for position and speed HOT 1
- Column (libsmartcols.so) permahangs with certain inputs HOT 1
- uuid_generate_time_safe generates same safe UUIDs after a fork HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from util-linux.