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)
- Build failure with 2.40.1 HOT 5
- The small capacity of the CDROM triggered a Buffer I/O error during the probe.
- minimal multilib build fails HOT 5
- option to link to always create hard links to first found file HOT 3
- `-Dbuild-lsfd=disabled` apparently doesn't disable the tests for it also
- Feature proposal: umount --recursive on non-mountpoint directory HOT 2
- Typeo in wipefs.c ("superblok")
- Stop capturing paswords with the log-in flag
- mount with mountfd API cannot remount with relatime or strictatime HOT 1
- Build issue 2.40.1 HOT 2
- 2.40.1 - ld.lld: error: version script assignment of 'UUID_2.40' to symbol 'uuid_time64' failed: symbol not defined
- libblkid doc: missing blkid_probe_get_partitions() error check in partitions API usage example
- command "lscpu -e" hangs/loops when output column width greater than tty column width HOT 2
- Feature request: Shouldn't lscpu output the microcode version of the CPU, too?
- [SECURITY] Memory Leak in fsck.c HOT 1
- libsmartcols/src/filter-xxx.c file causing unnecessary rebuilding and even errors HOT 1
- lscpu: The model name of core in the last cluster is not displayed HOT 10
- Bug: Very confusing error message positioning in fdisk output
- Lack of ability to customize ncurses headers/libraries location for cross-compilation
- Rename command sets basename of file to zero length if a rename of the suffix is attempted HOT 4
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.