milahu / gnumake-tokenpool

jobclient and jobserver for the GNU make tokenpool protocol. implementations in multiple languages
MIT License
4 stars 3 forks source link

jobclient init fails with gnumake 4.4 and make --jobserver-style=fifo #5

Closed milahu closed 8 months ago

milahu commented 10 months ago

currently, the jobclient fails to parse MAKEFLAGS like -j2 --jobserver-auth=fifo:/tmp/asdf

$ ./py/test/test.sh 
+ make -j2
python3 test.py "jobserver on"
debug jobclient.py 781944 2023-12-24 11:01:16.407: init: MAKEFLAGS:  -j2 --jobserver-auth=fifo:/tmp/GMfifo781943
debug jobclient.py 781944 2023-12-24 11:01:16.410: init: fdRead = None, fdWrite = None, maxJobs = 2, maxLoad = None
debug jobclient.py 781944 2023-12-24 11:01:16.410: init failed: no fds

make --jobserver-style=fifo is the default since gnumake 4.4

quickfix: make --jobserver-style=pipe

gnumake docs

--jobserver-style=[style]

Chooses the style of jobserver to use. This option only has effect if parallel builds are enabled (see Parallel Execution). On POSIX systems style can be one of fifo (the default) or pipe. On Windows the only acceptable style is sem (the default). This option is useful if you need to use an older versions of GNU make, or a different tool that requires a specific jobserver style.

see also

milahu commented 10 months ago

jobserver-style fifo should work now in javascript and python

@mkoeppe feel free to make a new python release

mkoeppe commented 10 months ago

Great. I'll set up a GH Actions workflow that will publish to PyPI when a py/... tag is pushed

mkoeppe commented 10 months ago

https://pypi.org/project/gnumake-tokenpool/0.0.6/ (created by the new GH Actions workflow)

milahu commented 8 months ago

closing as "should be fixed"

jobserver-style fifo should work now in javascript and python