Problems packaging on buster - makefile

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?

Related

Errors wihen buildng NetCDF: 'cd: IR/grib2/lib: No such file or directory'

I tried to installing netcdf-4.1.3. After configuring the netcdf-4.1.3 file, i had errors with my 'make' command. The error message is below
ameyaw_prince#Mytoses-ThinkPad-T430:~/Build_WRF/LIBRARIES/netcdf-4.1.3$ make
make all-recursive
make[1]: Entering directory '/home/ameyaw_prince/Build_WRF/LIBRARIES/netcdf-4.1.3'
Making all in include
make[2]: Entering directory '/home/ameyaw_prince/Build_WRF/LIBRARIES/netcdf-4.1.3/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/ameyaw_prince/Build_WRF/LIBRARIES/netcdf-4.1.3/include'
Making all in libdispatch
make[2]: Entering directory '/home/ameyaw_prince/Build_WRF/LIBRARIES/netcdf-4.1.3/libdispatch'
/bin/bash ../libtool --tag=CC --mode=link /usr/bin/gcc -g -O2 -LIR/grib2/lib -o libdispatch.la libdispatch_la-parallel.lo libdispatch_la-copy.lo libdispatch_la-file.lo libdispatch_la-dim.lo libdispatch_la-att.lo libdispatch_la-error.lo libdispatch_la-var.lo libdispatch_la-dispatch.lo libdispatch_la-nc_uri.lo libdispatch_la-nclist.lo libdispatch_la-ncbytes.lo libdispatch_la-nchashmap.lo libdispatch_la-nclog.lo -lm -lcurl
../libtool: line 5992: cd: IR/grib2/lib: No such file or directory
libtool: link: cannot determine absolute directory name of `IR/grib2/lib'
make[2]: *** [Makefile:328: libdispatch.la] Error 1
make[2]: Leaving directory '/home/ameyaw_prince/Build_WRF/LIBRARIES/netcdf-4.1.3/libdispatch'
make[1]: *** [Makefile:551: all-recursive] Error 1
make[1]: Leaving directory '/home/ameyaw_prince/Build_WRF/LIBRARIES/netcdf-4.1.3'
make: *** [Makefile:422: all] Error 2

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.
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')

Problems building gcc 5.2.0 with gcc 3.4.6

gcc 3.4.6 is the highest native install for gcc on my Synology DS413, so I'm attempting use it to build 5.2.0 from source. The steps I'm using from /root is
tar xzf gcc-5.2.0.tar.gz
cd gcc-5.2.0
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-5.2.0/configure --prefix=$HOME/gcc-5.2.0
make
make install
The build appears to go well until towards the end of 'make' which gives these errors at the end of its run:
:
:
make[3]: Entering directory `/root/objdir/gmp'
gcc `test -f 'gen-fac_ui.c' || echo '/root/objdir/../gcc-5.2.0/gmp/'`gen-fac_ui.c -o gen-fac_ui
./gen-fac_ui 32 0 >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1)
gcc `test -f 'gen-fib.c' || echo '/root/objdir/../gcc-5.2.0/gmp/'`gen-fib.c -o gen-fib
./gen-fib header 32 0 >fib_table.h || (rm -f fib_table.h; exit 1)
./gen-fib table 32 0 >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1)
gcc `test -f 'gen-bases.c' || echo '/root/objdir/../gcc-5.2.0/gmp/'`gen-bases.c -o gen-bases
/tmp/ccdefY1e.o: In function `generate':
gen-bases.c:(.text+0x28b8): undefined reference to `log'
collect2: ld returned 1 exit status
make[3]: *** [gen-bases] Error 1
make[3]: Leaving directory `/root/objdir/gmp'
make[2]: *** [all-stage1-gmp] Error 2
make[2]: Leaving directory `/root/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/root/objdir'
make: *** [all] Error 2
'make install' then returns
make[1]: Entering directory `/root/objdir'
/bin/ash /root/objdir/../gcc-5.2.0/mkinstalldirs /root/gcc-5.2.0 /root/gcc-5.2.0
make[2]: Entering directory `/root/objdir/fixincludes'
make[2]: *** No rule to make target `install'. Stop.
make[2]: Leaving directory `/root/objdir/fixincludes'
make[1]: *** [install-fixincludes] Error 2
make[1]: Leaving directory `/root/objdir'
make: *** [install] Error 2
What's making make unhappy? I'm a newb, so may be missing something obvious.
I think you have already IPKG(optware) installed on your diskstation and the compiler there is really old.
But: There is a developer how actualize the optware. Called: Optware new generation.
I have now GCC 5.2.0 running on my DS713+
further information here:
Optware
Optware NG on Github

build cross compiler mingw w64 gcc 4.8.2 on linux with winpthreads

I want to build a cross compiler mingw-w64 gcc in x86_64-unknown-linux-gnu to i686-w64-mingw32 with winphreads. From the document in the source package mingw-w64-v3.1.0/mingw-w64-doc, I know how to build cross gcc with win32 thread. However, I need to use c++11 thread, so I need to build cross gcc with posix thread. Moreover I know that mingw-w64 support posix thread in mingw-w64-v3.1.0/mingw-w64-libraries/winpthreads. Unfortunately, the above document does not explain how to build cross compiler mingw-w64 gcc.
Additional requirement, I need gcc, g++ gfortran and dwarf2 exception mode
As a result, I try the following procedure:
1 #!/bin/sh
2
3 threads=8
4
#build binutils
5 wget http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2 -O - | tar -xj
6 cd binutils-2.24
7 mkdir build; cd $_
8 ../configure --prefix=$HOME/cross --with-sysroot=$HOME/cross --target=i686-w64-mingw32 --disable-multilib
9 make -j $threads; make check; make install-strip; cd ..; cd ..; rm -rf ~-
10
#install mingw-w64-headers
11 wget http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v3.1.0.tar.bz2/download -O - | tar -xj
12 cd mingw-w64-v3.1.0/mingw-w64-headers
13 mkdir build; cd $_
14 ../configure --prefix=$HOME/cross/i686-w64-mingw32
15 make install; cd $HOME
16
17 ln -s $HOME/cross/i686-w64-mingw32 $HOME/cross/mingw
18
#build static gcc
19 wget http://www.netgull.com/gcc/releases/gcc-4.8.2/gcc-4.8.2.tar.bz2 -O - | tar -xj
20 cd gcc-4.8.2
21 mkdir build; cd $_
22 ../configure --prefix=$HOME/cross --with-sysroot=$HOME/cross --target=i686-w64-mingw32 --with-gmp=$HOME/gcc --with-mpfr=$HOME/gcc --with-mpc=$HOME/gcc --with-isl=$HOME/gcc --with-cloog=$HOME/gcc --enable-threads=posix --enable-checking=release --disable-multilib --enable-languages=c,c++,fortran --enable-__cxa_atexit --enable-dwarf2
23 make -j $threads all-gcc; make install-gcc
24
25 export PATH=$HOME/cross/bin:$PATH
26
#build mingw-w64-crt
27 cd $HOME/mingw-w64-v3.1.0/mingw-w64-crt
28 mkdir build; cd $_
29 ../configure --prefix=$HOME/cross/i686-w64-mingw32 --with-sysroot=$HOME/cross --host=i686-w64-mingw32
30 make -j $threads; make install-strip
31
#build winpthreads
32 cd $HOME/mingw-w64-v3.1.0/mingw-w64-libraries/winpthreads
33 mkdir build; cd $_
34 ../configure --prefix=$HOME/cross/i686-w64-mingw32 --with-sysroot=$HOME/cross --host=i686-w64-mingw32 --enable-shared=no
35 make -j $threads; make install-strip
36
#build full gcc
37 cd $HOME/gcc-4.8.2/build
38 make -j $threads; make check; make install-strip
However, when I do the last step build full gcc, I get the error as the following:
.libs/compatibility-atomic-c++0x.o: In function `_gthread_mutex_lock':
/home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32/bits/gthr-default.h:748: undefined reference to `_imp__pthread_mutex_lock'
.libs/compatibility-atomic-c++0x.o: In function `_gthread_mutex_unlock':
/home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32/bits/gthr-default.h:778: undefined reference to `_imp__pthread_mutex_unlock'
.libs/compatibility-atomic-c++0x.o: In function `_gthread_mutex_lock':
/home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32/bits/gthr-default.h:748: undefined reference to `_imp__pthread_mutex_lock'
.libs/compatibility-atomic-c++0x.o: In function `_gthread_mutex_unlock':
/home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32/bits/gthr-default.h:778: undefined reference to `_imp__pthread_mutex_unlock'
collect2: error: ld returned 1 exit status
make[5]: *** [libstdc++.la] Error 1
make[5]: Leaving directory `/home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: *** Waiting for unfinished jobs....
config.status: executing libtool commands
config.status: executing gstdint.h commands
make[1]: Leaving directory `/home/cguo/gcc-4.8.2/build'
make: *** [all] Error 2
So, how to fix the problem?
Thank you very much

(Cygwin - make) file not recognized: File format not recognized collect2: ld returned 1 exit status

I'm using Cygwin (in windows 7) to emulate Linux terminal, however, when I execute "make" to one of the files, I get the following error, (please note that this worked in Linux terminal)
cd ./agents/randomAgentJava/ && make
make[1]: Entering directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/randomAgentJava'
javac -source 5 -d bin -cp ../../system/libraries/RLVizLib.jar src/RandomAgent/RandomAgent.java
warning: [options] bootstrap class path not set in conjunction with -source 1.5
1 warning
make[1]: Leaving directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/randomAgentJava'
cd ./agents/randomAgentCPP/ && make
make[1]: Entering directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/randomAgentCPP'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/randomAgentCPP'
cd ./agents/mountainCarAgentCPP/ && make
make[1]: Entering directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/mountainCarAgentCPP'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/mountainCarAgentCPP'
cd ./agents/realTimeStrategyAgentJava/ && make
make[1]: Entering directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/realTimeStrategyAgentJava'
javac src/**/*.java -d bin -cp ../../system/libraries/RLVizLib.jar
make[1]: Leaving directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/realTimeStrategyAgentJava'
cd ./agents/helicopterAgentCPP/ && make
make[1]: Entering directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/helicopterAgentCPP'
g++ -c -I../../system/RL-Glue/RL-Glue -I../../system/RL-Glue/Utils -I./src src/weak_baseline_controller.cpp -o bin/weak_baseline_controller.o
g++ -o ./bin/RL_agent bin/weak_baseline_controller.o bin/Glue_utilities.o bin/RL_client_agent.o bin/RL_network.o -lm
bin/Glue_utilities.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
Makefile:25: recipe for target `bin/RL_agent' failed
make[1]: *** [bin/RL_agent] Error 1
make[1]: Leaving directory `/cygdrive/f/Linux Files/Helicopter_Control/rl-competition/agents/helicopterAgentCPP'
Makefile:13: recipe for target `all' failed
make: *** [all] Error 2
Thanks in advance!

Resources