ARM-GCC build error under Fedora 21 - linux

I'm trying to build GCC for ARM under Fedora 21 but 4.6.4 and 4.9.2 fails with same error:
checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
Makefile:8200: recipe for target 'configure-zlib' failed
I follow this guide: http://www.kunen.org/uC/gnu_tool.html
Can't understand, what I'm doing wrong?
P.S. configure command:
../../src/gcc-4.9.2/configure --target=arm-none-eabi --prefix=$MYTOOLS --enable-interwork --enable-multilib --enable-languages="c,c++" --with-newlib --with-headers=../../src/newlib-1.20.0/newlib/libc/include/

if you have zlib installed on this system, you could try adding --with-system-zlib to the configure command you're using.

Related

Compiling GCC 4.8.4 Error (CXX_ABI 1.3.8)

I'm trying to compile GCC version 4.8.4 using the following configuration parameters:
--prefix=<path to gcc src> --enable-languages=c,c++ --build=x86_64-linux-gnu
However, when I try to make I get the following error:
make[5]: Entering directory '/DIR/gcc/objdir/x86_64-linux
gnu/libstdc++-v3/po'
msgfmt -o de.mo ../../../../libstdc++-v3/po/de.po
msgfmt -o fr.mo ../../../../libstdc++-v3/po/fr.po
msgfmt: /DIR/gcc/objdir/x86_64-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version CXXABI_1.3.8 not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.55)
Makefile:460: recipe for target fr.mo failed
make[5]: *** [fr.mo] Error 1
make[5]: *** Waiting for unfinished jobs....
msgfmt: /DIR/gcc/objdir/x86_64-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version CXXABI_1.3.8 not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.55)
Try 1: I've tried setting LD_LIBRARY_PATH to /usr/lib/x86_64-linux-gnu/:/usr/lib/lib32/. Yet it does not seem to work.
Try 2: I've tried changing the GCC version used to compile it. I've used versions 4.7, 4.5, and 5. This also does not seem to work.
It seems that when compiling GCC, the wrong libstdc++.so.6 is pull?
Any ideas or aclarations are welcome.
PS: I'm using Ubuntu 16.04 and Linux kernel 4.4.0-62
Building gcc-4.8.4 : Unpack mpfr-3.1.3.tar.xz, gmp-6.1.0.tar.xz, mpc-1.0.3.tar.gz into gcc-4.8.4/. Rename to have gcc-4.8.4/{mpfr/, gmp/, mpc/}.
gcc requires a build directory outside gcc-4.8.4/ : mkdir build-gcc
! If you configured inside gcc-4.8.4/, you will have to delete gcc-4.8.4/, and start from scratch.
cd build-gcc/
../gcc-4.8.4/configure --prefix=/usr/local/gcc484 --program-suffix=484 --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-multilib --disable-libstdcxx-pch --with-mpfr-include=$(pwd)/../gcc-4.8.4/mpfr/src --with-mpfr-lib=$(pwd)/mpfr/src/.libs
make
gcc-4.8.4 can be built with Ubuntu 14.04, not 16.04 . Result: gcc48-c++_4.8.4-2ubuntu14_amd64.deb (24.4MB) https://drive.google.com/file/d/0B7S255p3kFXNeWI3N1E2MXdrVm8/view?usp=sharing
Ubuntu 16.04 : gcc48, g++48 were tested with some applications, one has 400 c++ files : OK.
No dependencies, install with sudo dpkg -i gcc48-c++_4.8.4-2ubuntu14_amd64.deb Provides /usr/local/bin/{ gcc48, g++48 }

Cross compiling gcc 6.2 for QNX

I'm trying to cross compile GCC or clang for qnx and I am not able to find any good set of instructions that explain cross compiling to other operating systems. I already have access to qnx and a GCC compiler version 4.7 for the target.
I've tried reading http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/ and wasn't successful. I keep running into this error:
checking dynamic linker characteristics... ldqnx.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
Makefile:11454: recipe for target 'configure-target-libstdc++-v3' failed
make[1]: *** [configure-target-libstdc++-v3] Error 1
I want to compile the latest stable GCC. The host machine is an x86_64 linux. The target is i486-pc-nto-qnx6.6.0. Any ideas?

GCC keeps saying -mfpu=neon is an unrecognoized command

I am compiling code to run on an arm neon and the make files have the following command line included.
-mcpu=cortex-a9 -march=armv7 -mfpu=neon -DARM_NEON
The details of GCC version are as follows:
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
However when I try to compile, gcc keeps throwing the following error:
gcc: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
gcc: error: unrecognized command line option '-mfpu=neon'
I am pretty sure that the code could be compiled previously. Though a long time ago. Could it be changes in version of GCC? or is it do with 32 bit and 64 bit compilers?
I was trying to cross compile for an arm processor on my intel x86_64 Ubuntu machine. I needed to add the configuration for the host in the makefiles and use arm-linux-gnueabihf-gcc instead of gcc.

configure test with static lib

I am trying to cross compile libpng for RaspberryPi on Ubuntu 14.04 (x_64) with zlib
but configure fails with
configure:11400: arm-linux-gnueabihf-gcc -o conftest -g -O2 -I/home/user/RPI_DEV/lib/include conftest.c -lz -lm >&5
/home/user/RPI_DEV/xtools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
configure:11400: $? = 1
configure: failed program was:
....
Because I am using toolchain for arm, arm-ld cant find zlib.
Is there any option for configure not to compile with shared lib but to try with static lib (eg. -static -lz).
Command is
./configure --enable-static=true --enable-shared=false --with-zlib-include="/home/user/RPI_DEV/lib/include" --with-zlib-lib="/home/user/RPI_DEV/lib/lib" LDFLGS="-L/home/user/RPI_DEV/lib/lib" CPPFLAGS="-I/home/user/RPI_DEV/lib/include" -enable-static --host=arm-linux-gnueabihf --prefix=/home/user/RPI_DEV/lib --exec-prefix=/home/user/RPI_DEV/lib
You need to cross build and install zlib into your toolchain before trying to use it in another project.
What you are doing might work but only if you spell LDFLAGS correctly:
LDFLGS="-L/home/user/RPI_DEV/lib/lib"
Note the missing 'A'. I don't know why your second attempt worked, given you had the same misspelling; possibly you had a correct LDFLAGS in your environment?
Anyway there should be a Ubuntu cross-development guide somewhere that explains how to do this. It's slightly off topic but for Gentoo you use 'crossdev' to install the toolchain then a crossdev specific version of the normal package installation mechanism ([host]-emerge) to install zlib into the toolchain.
Also, the arguments --with-zlib-include and --with-zlib-lib are not supported by any current version of libpng I can find. If you are cross-compiling libpng for an RPi (or, indeed, any ARM system) you should be using the latest version of 1.6 that you can find.
Unless someone solves this the RIGHT way, this is hack I've done.
Open configure.ac file
Find and comment out line
AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
Configure will pass wihout check for zlib and then add zlib by hand
LDFLGS="-L/home/user/RPI_DEV/lib/lib -L/home/user/RPI_DEV/lib/lib/libz.a"
Run autoconf
Run ./configure ...

Compiling Bochs 2.4.6 under Cygwin

Could anyone tell me a version of Cygwin that can compile successfully Bochs 2.4.6? I've tried with the latest version of Cygwin (1.7.9(0.237/5/3)) but I ran into a bunch of errors.
In specific, I initially got a C compiler cannot create executables error when trying to ./configure Bochs:
...
...
checking if you are configuring for another platform... no
checking for standard CFLAGS on this platform... -mno-cygwin -DWIN32
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/usr/bochs-2.4.6':
configure: error: C compiler cannot create executables
See `config.log' for more details
I solved this by switching my default gcc to version 3.x by using /usr/bin/set-gcc-default-3.sh. However, although the progress of the build was going great, I finally got a DEPRECATED error:
configure: error: DEPRECATED - moved to .bochsrc options
Now, I don't know how to overcome the last error so I am stucked.
Any help will be appreciated.
Thanks a lot.

Resources