Search code examples
windowsunixparallel-processinggnugnu-parallel

How can build GNU Parallel to executable file on Windows


I try to build GNU Parallel to an executable file on Windows. When I build it by using code below:

wget https://git.savannah.gnu.org/cgit/parallel.git/plain/10seconds_install
bash 10seconds_install

I didn't get any executable file. Further detail, you can see below:

C:\Users\nexleuser\Desktop\tmp>bash 10seconds_install

GnuPG (gpg) is not installed so the signature cannot be checked.
This means that if the code has been changed by criminals, you will not discover that!

Continue anyway? (y/n)
y
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether ln -s works... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
make  all-recursive
make[1]: Entering directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922'
Making all in src
make[2]: Entering directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922/src'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922/src'
make[2]: Entering directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922'
make[2]: Leaving directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922'
make[1]: Leaving directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922'
Making install in src
make[1]: Entering directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922/src'
make[2]: Entering directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922/src'
 /usr/bin/mkdir -p '/usr/local/bin'
 /usr/bin/install -c parallel sql niceload parcat parset env_parallel env_parallel.ash env_parallel.bash env_parallel.csh env_parallel.dash env_parallel.fish env_parallel.ksh env_parallel.mksh env_parallel.pdksh env_parallel.sh env_parallel.tcsh env_parallel.zsh '/usr/local/bin'
make  install-exec-hook
make[3]: Entering directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922/src'
rm /usr/local/bin/sem || true
ln -s parallel /usr/local/bin/sem
make[3]: Leaving directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922/src'
 /usr/bin/mkdir -p '/usr/local/share/doc/parallel'
 /usr/bin/install -c -m 644 parallel.html env_parallel.html sem.html sql.html niceload.html parallel_tutorial.html parallel_book.html parallel_design.html parallel_alternatives.html parcat.html parset.html parallel.texi env_parallel.texi sem.texi sql.texi niceload.texi parallel_tutorial.texi parallel_book.texi parallel_design.texi parallel_alternatives.texi parcat.texi parset.texi parallel.pdf env_parallel.pdf sem.pdf sql.pdf niceload.pdf parallel_tutorial.pdf parallel_book.pdf parallel_design.pdf parallel_alternatives.pdf parcat.pdf parset.pdf parallel_cheat.pdf '/usr/local/share/doc/parallel'
 /usr/bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 parcat.1 parset.1 '/usr/local/share/man/man1'
 /usr/bin/mkdir -p '/usr/local/share/man/man7'
 /usr/bin/install -c -m 644 parallel_tutorial.7 parallel_book.7 parallel_design.7 parallel_alternatives.7 '/usr/local/share/man/man7'
make[2]: Leaving directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922/src'
make[1]: Leaving directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922/src'
make[1]: Entering directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922'
make[2]: Entering directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922'
make[1]: Leaving directory '/cygdrive/c/Users/nexleuser/Desktop/tmp/parallel-20190922'

 installed globally22

I have a question: How can we build GNU Parallel to an executable file on windows? Is it possible?

Do I need to install more packages to build GNU Parallel to an executable file?

Thanks for your support.


Solution

  • From your output this command succeeds:

    /usr/bin/install -c parallel sql niceload parcat parset env_parallel env_parallel.ash env_parallel.bash env_parallel.csh env_parallel.dash env_parallel.fish env_parallel.ksh env_parallel.mksh env_parallel.pdksh env_parallel.sh env_parallel.tcsh env_parallel.zsh '/usr/local/bin'
    

    It installs parallel (and friends) in /usr/local/bin.

    So you should be able to do:

    /usr/local/bin/parallel --version
    

    And if you add /usr/local/bin to $PATH then parallel should work.

    export PATH=/usr/local/bin:$PATH
    parallel --version
    

    (But there is something wrong going on: $latest in your script does not simply contain 'parallel-20190922', but probably 'parallel-20190922\r'. How the '\r' comes in there I can only guess. Maybe you for some reason calls Windows sort instead of GNU sort and maybe that inserts '\r' for each line. Could you try replacing sort in 10seconds_install with perl -e 'print sort <>' and see if the last line in the output changes? It should say: 'GNU parallel-20190922 installed globally')