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.
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')
Related
I'm trying to build some packages from source, and I'm facing trouble that I don't understand despite lots of googling. This happens with some packages, while others compile and get packed normally. One of the softwares that fail to package is libva.
When I use;
export DH_VERBOSE=1 && dpkg-buildpackage -uc -us -j4 -d --build=full --host-arch=amd64 --target-arch=amd64
I get this error;
checking build system type... Invalid configuration `./autogen.sh': machine `./autogen.sh' not recognized
configure: error: /bin/bash ./config.sub ./autogen.sh failed
find ! -ipath "./debian/*" -a ! \( -path '*/.git/*' -o -path '*/.hg/*' -o -path '*/.bzr/*' -o -path '*/.svn/*' -o -path '*/CVS/*' \) -a -type f -exec md5sum {} + -o -type l -printf "symlink %p
" > debian/autoreconf.after
dh_autoreconf: ./autogen.sh ./autogen.sh returned exit code 1
make[1]: *** [debian/rules:12: override_dh_autoreconf] Error 2
make[1]: Leaving directory '/media/deyaa/BBuffer/buildfolder/intel/libva/libva-2.14.0'
make: *** [debian/rules:9: binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
I also have the architecture set up in the control file.
However when I run;
autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-drm --enable-x11 --enable-glx --enable-wayland --enable-va-messaging
it compiles normally, but I face another problem trying to install it to the same folder under fakeroot.
$ fakeroot make install
Making install in va
make[1]: Entering directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va'
Making install in drm
make[2]: Entering directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va/drm'
make[3]: Entering directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va/drm'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/usr/include/va'
/usr/bin/install -c -m 644 ../../../libva/va/drm/va_drm.h '/usr/include/va'
/usr/bin/install: cannot remove '/usr/include/va/va_drm.h': Permission denied
make[3]: *** [Makefile:502: install-libva_drmincludeHEADERS] Error 1
make[3]: Leaving directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va/drm'
make[2]: *** [Makefile:620: install-am] Error 2
make[2]: Leaving directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va/drm'
make[1]: *** [Makefile:755: install-recursive] Error 1
make[1]: Leaving directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va'
make: *** [Makefile:459: install-recursive] Error 1
I get similar errors while building other packages, like aria2, and intel-media.
I compile on debian buster, with stock gcc, glibc, and libtool.
Could you offer any help or pointers?
I have a project using autoconf/automake. Sometimes I want to remake part of it even though make (correctly) believes all dependencies are up-to-date. For other projects I can use make -W some-file.c to ask make to pretend that some-file.c is new and rebuild accordingly. (Option -W is also called --what-if, --new-file and --assume-new.) However this doesn't work with automake's Makefiles - nothing happens, as if the option is ignored. Is there any way to get this feature working?
I am using automake (GNU automake) 1.16.2 and autoconf (GNU Autoconf) 2.69
Example configure.ac
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([zot.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_PROG_CC
AC_OUTPUT
Example Makefile.am
bin_PROGRAMS=zot
zot_SOURCES=zot.c
Example zot.c file
int main() { return 0;}
Example session
$ ./configure && make
checking for a BSD-compatible install... /usr/bin/install -c
(autoconf output omitted)
config.status: executing depfiles commands
make all-am
make[1]: Entering directory '/tmp/meo'
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT zot.o -MD -MP -MF .deps/zot.Tpo -c -o zot.o zot.c
mv -f .deps/zot.Tpo .deps/zot.Po
gcc -g -O2 -o zot zot.o
make[1]: Leaving directory '/tmp/meo'
$ make
make all-am
make[1]: Entering directory '/tmp/meo'
make[1]: Leaving directory '/tmp/meo'
I would expect the following command to re-compile zot.c and re-link
$ make -W zot.c
make all-am
make[1]: Entering directory '/tmp/meo'
make[1]: Leaving directory '/tmp/meo'
however make does not do anything as everything were up to date.
Can someone explain why make with sub-makes has different parallelization behavior?
I have two examples below. In one, all targets are in one Makefile where as in the second example each target has its own folder/makefile and they call each other using $(MAKE).
Running them with -j produce outputs which are vastly different. In the first case, all access to the top-level dependency (a.out below) is synchronized. Make waits for the target to build before running any targets which depend on that.
In the second case, the top-level target (a.out below) is subjected to concurrent access. This causes serious problems for us unless we use our own synchronization techniques to overcome that.
Examples 1:
jesaremi#u16-3:~/maketest$ cat Makefile
.ONESHELL:
all: d.out b.out c.out a.out
a.out: CALLER ?= self
a.out:
#
echo entering $# "(called by $(CALLER))"
sleep 10
echo exiting $#
b.out: a.out
#
echo entering $#
sleep 1
echo exiting $#
c.out: a.out
#
echo entering $#
sleep 1
echo exiting $#
d.out: a.out
#
echo entering $#
sleep 1
echo exiting $#
jesaremi#u16-3:~/maketest$ make
entering a.out (called by self)
exiting a.out
entering d.out
exiting d.out
entering b.out
exiting b.out
entering c.out
exiting c.out
jesaremi#u16-3:~/maketest$ make -j
entering a.out (called by self)
exiting a.out
entering d.out
entering c.out
entering b.out
exiting c.out
exiting d.out
exiting b.out
Example 2 (using sub-make):
jesaremi#js-u16-1:~/maketest$ cat */Makefile
---------- a/Makefile -------------
.ONESHELL:
a.out: CALLER ?= self
a.out:
#
echo entering $# "(called by $(CALLER))"
sleep 10
echo exiting $#
---------- b/Makefile -------------
.ONESHELL:
export CALLER:=b
a.out:
$(MAKE) -C ../a
b.out: a.out
#
echo entering $#
sleep 1
echo exiting $#
---------- c/Makefile -------------
.ONESHELL:
export CALLER:=c
a.out:
$(MAKE) -C ../a
c.out: a.out
#
echo entering $#
sleep 1
echo exiting $#
---------- d/Makefile -------------
.ONESHELL:
export CALLER:=d
a.out:
$(MAKE) -C ../a
d.out: a.out
#
echo entering $#
sleep 1
echo exiting $#
jesaremi#js-u16-1:~/maketest$ cat Makefile
all: d.out c.out b.out a.out
%.out:
$(MAKE) -C $*
.PHONY:all
jesaremi#js-u16-1:~/maketest$ make
make -C d
make[1]: Entering directory '/home/jesaremi/maketest/d'
make -C ../a
make[2]: Entering directory '/home/jesaremi/maketest/a'
entering a.out (called by d)
exiting a.out
make[2]: Leaving directory '/home/jesaremi/maketest/a'
make[1]: Leaving directory '/home/jesaremi/maketest/d'
make -C c
make[1]: Entering directory '/home/jesaremi/maketest/c'
make -C ../a
make[2]: Entering directory '/home/jesaremi/maketest/a'
entering a.out (called by c)
exiting a.out
make[2]: Leaving directory '/home/jesaremi/maketest/a'
make[1]: Leaving directory '/home/jesaremi/maketest/c'
make -C b
make[1]: Entering directory '/home/jesaremi/maketest/b'
make -C ../a
make[2]: Entering directory '/home/jesaremi/maketest/a'
entering a.out (called by b)
exiting a.out
make[2]: Leaving directory '/home/jesaremi/maketest/a'
make[1]: Leaving directory '/home/jesaremi/maketest/b'
make -C a
make[1]: Entering directory '/home/jesaremi/maketest/a'
entering a.out (called by self)
exiting a.out
make[1]: Leaving directory '/home/jesaremi/maketest/a'
jesaremi#js-u16-1:~/maketest$ make -j
make -C d
make -C c
make -C b
make -C a
make[1]: Entering directory '/home/jesaremi/maketest/d'
make -C ../a
make[1]: Entering directory '/home/jesaremi/maketest/c'
make -C ../a
make[1]: Entering directory '/home/jesaremi/maketest/b'
make -C ../a
make[2]: Entering directory '/home/jesaremi/maketest/a'
make[1]: Entering directory '/home/jesaremi/maketest/a'
entering a.out (called by self)
make[2]: Entering directory '/home/jesaremi/maketest/a'
entering a.out (called by c)
make[2]: Entering directory '/home/jesaremi/maketest/a'
entering a.out (called by d)
entering a.out (called by b)
exiting a.out
make[1]: Leaving directory '/home/jesaremi/maketest/a'
exiting a.out
make[2]: Leaving directory '/home/jesaremi/maketest/a'
exiting a.out
make[1]: Leaving directory '/home/jesaremi/maketest/c'
make[2]: Leaving directory '/home/jesaremi/maketest/a'
make[1]: Leaving directory '/home/jesaremi/maketest/d'
exiting a.out
make[2]: Leaving directory '/home/jesaremi/maketest/a'
make[1]: Leaving directory '/home/jesaremi/maketest/b'
Perhaps you're thinking that recusive invocations of make communicate to each other which targets they are building and somehow interlock so that no two sub-makes are trying to build the same target at the same time.
That's nowhere close to something make can do. All make can do is notify other sub-makes how many targets they are building so that you are ensured that no more than N total targets (for -jN) are invoked.
If you want to ensure that two different makefiles don't try to build the same target, that's up to you to do by organizing your makefiles; make can't do it for you.
In the second example, you list all the prerequisites as a single target:
all: d.out c.out b.out a.out
This recipe says, "before all can be built the targets d.out, c.out, b.out, and a.out must be finished". This says nothing about the relative relationship between the prerequisites (d.out, c.out, b.out, or a.out) themselves so when you run with -j the sub-makes for all of them will be invoked at the same time. If each of those tries to build the same shared target, then they will interfere with each other.
If you want to ensure that doesn't happen you must declare the prerequisite relationship in your makefile so make knows about it. For example you could do this:
all: d.out c.out b.out a.out
d.out c.out b.out: a.out
%.out:
$(MAKE) -C $*
.PHONY:all
Now, the recipes to build d.out, c.out, and b.out won't be started until after the recipe to build a.out is complete.
I want to submit a PR to Homebrew #20409 that should update libp11 from version 0.2.8 to 0.4.7 however I have some problems running the installation locally.
I am pulling my patch 20409 and to an interactive installation.
brew pull https://github.com/Homebrew/homebrew-core/pull/20409
brew install --interactive libp11
after
./configure
make
make install
Make install complains about cannot create regular file ... Operation not permitted
It seems that sudo rights are needed, but I am not sure if its the correct way to do so.
make install
Making install in src
/usr/local/bin/gmkdir -p '/usr/local/Cellar/openssl/1.0.2m/lib/engines'
/usr/local/bin/gmkdir -p '/usr/local/lib'
/usr/local/bin/gmkdir -p '/usr/local/include'
/bin/sh ../libtool --mode=install /usr/local/bin/ginstall -c libp11.la '/usr/local/lib'
/bin/sh ../libtool --mode=install /usr/local/bin/ginstall -c pkcs11.la '/usr/local/Cellar/openssl/1.0.2m/lib/engines'
/usr/local/bin/gmkdir -p '/usr/local/lib/pkgconfig'
/usr/local/bin/ginstall -c -m 644 libp11.h p11_err.h '/usr/local/include'
/usr/local/bin/ginstall -c -m 644 libp11.pc '/usr/local/lib/pkgconfig'
ginstall: cannot create regular file '/usr/local/include/libp11.h': Operation not permitted
ginstall: cannot create regular file '/usr/local/include/p11_err.h': Operation not permitted
make[2]: *** [install-includeHEADERS] Error 1
make[2]: *** Waiting for unfinished jobs....
ginstall: cannot create regular file '/usr/local/lib/pkgconfig/libp11.pc': Operation not permitted
make[2]: *** [install-pkgconfigDATA] Error 1
libtool: install: /usr/local/bin/ginstall -c .libs/libp11.2.dylib /usr/local/lib/libp11.2.dylib
libtool: install: /usr/local/bin/ginstall -c .libs/pkcs11.dylib /usr/local/Cellar/openssl/1.0.2m/lib/engines/pkcs11.dylib
ginstall: cannot create regular file '/usr/local/lib/libp11.2.dylib': Operation not permitted
ginstall: cannot create regular file '/usr/local/Cellar/openssl/1.0.2m/lib/engines/pkcs11.dylib': Operation not permitted
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: *** [install-enginesexecLTLIBRARIES] Error 1
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1
Usually I would call sudo make install however this is not permitted operation not permitted: sudo with Homebrew.
I am running the tests on MAC OS Sierra and not Hight Sierra, so this issues does not apply
I know you said you're running Sierra, but this still just looks like a file permissions problem. For Sierra, you should be able to do this:
sudo chown -R $(whoami) $(brew --prefix)
That other article you linked said that /usr/local cannot be chown'd (good to know, I'll hit that soon.....) so the "fix" was just to chown everything underneath there:
sudo chown -R $(whoami) $(brew --prefix)/*
which would work fine if the directories you need to write to are already created.
I have a working make, I have platform code and like several makes for each os in the folder. Right now I have one makefile which works. I renamed it to Makefile.ws and wrote this in Makefile
all:
make -f Makefile.w32
clean:
make -f Makefile.w32 clean
I ran it and got this error
> "make"
make -f Makefile.w32
make[1]: Entering directory `/c/nightly/test'
make -f Makefile.w32
make[3]: Makefile.w32: No such file or directory
make[3]: *** No rule to make target `Makefile.w32'. Stop.
make[2]: *** [all] Error 2
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/nightly/test'
"make": *** [all] Error 2
Oddly enough the clean works perfectly. Then I decided to write "make -f Makefile.w32 mingw32" and that did not work correctly. In fact it made a folder called mingw32 which I thought was very strange.
As for the mingw32 rule I just copy build which I suspect is the main/normal rule that is used to build
$(BUILD):
#[ -d $# ] || mkdir -p $#
#make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
mingw32:
#[ -d $# ] || mkdir -p $#
#make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
full .w32 source is here http://pastie.org/320035
First, what make are you running? Cygwin or MinGW, or something else?
make -f Makefile.w32
make[1]: Entering directory `/c/nightly/test'
make -f Makefile.w32
make[3]: Makefile.w32: No such file or directory
"Entering directory" is a hint. Why is it entering /c/nightly/test? Is there a Makefile.w32 there?
As to creating the directory "mingw32", the rule
mingw32:
#[ -d $# ] || mkdir -p $#
...
does exactly that. If "mingw32" does not exist, it creates it.
It would be easier to help you if you had a shorter example and clearly explain what you want to accomplish and what you expect to happen.
I think I see the problem in your second example. The mingw32 line should be changed so that it does not include the $(BUILD) variable:
mingw32:
#[ -d $# ] || mkdir -p $#
#make --no-print-directory -C mingw32 -f $(CURDIR)/Makefile
It is clear that he created the directory,
your first command in your given 2 rules, include a mkdir with the object name, i.e. either build or mingw32
Afterwards he changes into the current directory (i.e. no cd at all) and execute Makefile. But as you wrote you renamed Makefile into Makefile.ws, so offcourse you are getting File-Not-Found-error.
From the questions I can only recommend you to have a look at an short introduction or even better the manual for make.
Have you tried calling the secondary makefile using
$(MAKE) -f ...
instead of
make -f ...?