Problems building gcc 5.2.0 with gcc 3.4.6 - gcc

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

Related

Problems packaging on buster

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?

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

Compile error when compiling a driver using Makefile

When I try to compile the hello.c as a driver component, I got an error as follows:
root#ubuntu:/home/steven/Downloads# make
make -C /lib/modules/`uname -r`/build M=/home/steven/Downloads modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-29-generic'
CC [M] /home/steven/Downloads/hello.o
**cc1: error: code model kernel does not support PIC mode**
scripts/Makefile.build:332: recipe for target '/home/steven/Downloads/hello.o' failed
make[2]: *** [/home/steven/Downloads/hello.o] Error 1
Makefile:1552: recipe for target '_module_/home/steven/Downloads' failed
make[1]: *** [_module_/home/steven/Downloads] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-29-generic'
Makefile:13: recipe for target 'modules' failed
make: *** [modules] Error 2
My Makefile is as follows:
ifneq ($(KERNELRELEASE),)
MODULE_NAME = hellomodule
$(MODULE_NAME)-objs := hello.o
obj-m := $(MODULE_NAME).o
else
KERNEL_DIR = /lib/modules/`uname -r`/build
MODULEDIR := $(shell pwd)
.PHONY: modules
default: modules
modules:
make -C $(KERNEL_DIR) M=$(MODULEDIR) modules
clean distclean:
rm -f *.o *.mod.c .*.*.cmd *.ko
rm -rf .tmp_versions
endif
Can anybody help me to solve this problem?

build openwrt on mac os x failed, how to fix it?

export MAKEFLAGS= ;/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Volumes/OpenWrt/trunk/build_dir/host/bc-1.06.95 install
Making install in lib
make[6]: Nothing to be done for `install-exec-am'.
make[6]: Nothing to be done for `install-data-am'.
Making install in bc
test -z "/Volumes/OpenWrt/trunk/staging_dir/host/bin" || /Volumes/OpenWrt/trunk/build_dir/host/bc-1.06.95/install-sh -d "/Volumes/OpenWrt/trunk/staging_dir/host/bin"
/Users/zhushajun/ctags/install -c 'bc' '/Volumes/OpenWrt/trunk/staging_dir/host/bin/bc'
/bin/bash: /Users/zhushajun/ctags/install: Permission denied
make[6]: *** [install-binPROGRAMS] Error 1
make[5]: *** [install-am] Error 2
make[4]: *** [install-recursive] Error 1
make[3]: *** [/Volumes/OpenWrt/trunk/staging_dir/host/stamp/.bc_installed] Error 2
make[3]: Leaving directory `/Volumes/OpenWrt/trunk/tools/bc'
make[2]: *** [tools/bc/install] Error 2
make[2]: Leaving directory `/Volumes/OpenWrt/trunk'
make[1]: *** [/Volumes/OpenWrt/trunk/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyyynyyyyyyyynyyyynnyyynnyynnnyyyy] Error 2
make[1]: Leaving directory `/Volumes/OpenWrt/trunk'
make: *** [world] Error 2
sorry for my poor English.
these are the output info,"make V=s" not work and "sudo make V=s" neither,somebody would help me?thanks

(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