Use configure file to generate makefile - c++

I use ./configure command to generate a makefile. My compiler is arm-fsl-linux-gnueabi toochain. When I ran ./configure, I got the following problem:
tl#tl-virtual-machine:~/Desktop/mvux_camera/demo/sampli_save_demo$ ./configure --host=/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-g++... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-c++... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-gpp... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-aCC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-CC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-cxx... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-cc++... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-cl.exe... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-FCC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-KCC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-RCC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-xlC_r... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-xlC... no
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in '/home/tl/Desktop/mvux_camera/demo/sampli_save_demo':
configure: error: C++ compiler cannot create executables
See 'config.log' for more details
My toolchain was sourced, when typing arm-fsl-linux-gnueabi-gcc -v, the command line shows it works.
tl#tl-virtual-machine:~/Desktop/mvux_camera/demo/sampli_save_demo$ arm-fsl-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-fsl-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/../libexec/gcc/arm-fsl-linux-gnueabi/4.6.2/lto-wrapper
Target: arm-fsl-linux-gnueabi
Configured with: /work/build/.build/src/gcc-linaro-4.6-2011.06-0/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-fsl-linux-gnueabi --prefix=/work/fsl-linaro-toolchain-2.13 --with-sysroot=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --enable-languages=c,c++ --with-pkgversion='Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpfr=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpc=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-ppl=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-cloog=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-libelf=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/work/build/.build/arm-fsl-linux-gnueabi/build/static/lib -lpwl' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-multilib --with-local-prefix=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --disable-nls --enable-c99 --enable-long-long --with-system-zlib
Thread model: posix
gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20)

Look at the output of ./configure --help, especially:
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
HOST should be the identity of the system on which you want your cross-compiled
program to run. But you have set it to the absolute filename of your C++ compiler:
./configure --host=/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++
which results in your ./configure script attempting and failing to locate a cross-compiler
with such nonsense names as:
/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-g++
/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-c++
Look at the output of arm-fsl-linux-gnueabi-gcc -v, specifically:
Target: arm-fsl-linux-gnueabi
This tells you that your cross-compiler was built to cross-compile programs
for arm-fsl-linux-gnueabi systems. Therefore, when you want to ./configure
a project to use that cross-compiler, HOST = arm-fsl-linux-gnueabi

Related

install gcc 4.9 under suse10, "checking whether to enable maintainer-specific portions of Makefiles... no"

I install gcc 4.9 by the following step
wget ftp://mirrors.kernel.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz
tar -zxvf gcc-4.9.0.tar.gz
cd gcc-4.9.0
./contrib/download_prerequisites
cd ..
mkdir gcc-build-4.9.0
cd gcc-build-4.9.0
../gcc-4.9.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
when I run the last command, it show the error message and stop
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
configure: WARNING: using in-tree ISL, disabling version check
configure: WARNING: using in-tree CLooG, disabling version check
*** This configuration is not supported in the following subdirectories:
gnattools target-libada target-libgfortran target-libgo target-libffi target-libbacktrace target-zlib target-libjava target-libobjc target-boehm-gc
(Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for readelf... readelf
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... gfortran
checking for gccgo... no
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for ranlib... ranlib
checking for readelf... no
checking for readelf... readelf
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target gccgo... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile
the error is "checking whether to enable maintainer-specific portions of Makefiles... no"
any idea?
As a comment already mentioned, there is no error. The next step is to actually start building the compiler, and then install it. E.g. something like
# How many cpu's to use
NCPUS=4
make -j $NCPUS && make install
Note that as you haven't specified a prefix for your configure command, the default will be /usr/local, which might not be what you want. So I'd recommend rerunning configure, and adding something like --prefix=/home/sleepworm/gcc-install-4.9.0
Also, why are you building 4.9.0 when 4.9.2 with some bugfixes has already been released?
FWIW, the "checking whether to enable maintainer-specific portions of Makefiles... no" thing can be changed by passing --enable-maintainer-mode to configure. It does enable some extra things, such as regeneration of some files etc., which are of interest only if you wish to develop gcc, rather than develop with gcc.

Basemap installation on Mac laptop

I know there are several questions about this topic, but I cannot find a clear answer.
I'm trying to install Basemap in my laptop (Mac OS X, v 10.6.8). I'm running Python 2.7.8 |Anaconda 2.0.1.
Python is installed in the following folder: users/myname/anaconda
I've downloaded basemap-1.0.7 into the same folder (users/myname/anaconda), then I follow the instructions from http://matplotlib.org/basemap/users/installing.html:
To install the GEOS library I open up a terminal and type:
cd anaconda/basemap-1.0.7/geos-3.3.3/
export GEOS_DIR=/user/myname/anaconda
./configure --prefix=$GEOS_DIR
Then I get the following error:
checking host system type... i386-apple-darwin10.8.0
checking target system type... i386-apple-darwin10.8.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/myname/anaconda/basemap-1.0.7/geos-3.3.3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Then, when I try to run make; make install I get the error:
-bash: make: command not found
Can someone explain what I'm doing wrong?
The problem is that Basemap needs to compile GEOS, which is a C library, so you need a C compiler.
Alternatively, just download and install from the Mac OSX binaries provided here: http://trac.osgeo.org/geos/

Not able to install gdb 7.5

I am trying to install gdb 7.5
My OS env is : Linux ddkhost 2.6.18-53.el5PAE #1 SMP Wed Oct 10 16:48:18 EDT 2007 i686 i686 i386 GNU/Linux
I am following these steps:
./configure
make
now it is running recursively endless.
configure: creating ./config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating Makefile
make: Warning: File `Makefile.in' has modification time 1.9e+08 s in the future
CONFIG_SHELL="/bin/sh" /bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --no-create --no-recursion
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for PWL_handle_timeout in -lpwl... no
checking for version 0.11 (revision 0 or later) of PPL... no
checking for default BUILD_CONFIG...
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for windres... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... host tool
checking where to find the target c++... host tool
checking where to find the target c++ for libstdc++... host tool
checking where to find the target dlltool... host tool
checking where to find the target gcc... host tool
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target gccgo... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating Makefile
make: Warning: File `Makefile.in' has modification time 1.9e+08 s in the future
CONFIG_SHELL="/bin/sh" /bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --no-create --no-recursion
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
and so on.......
What is the reason?
From:
make: Warning: File `Makefile.in' has modification time 1.9e+08 s in the future
it indeed seems like your system clock is not synced up with your NFS server like #drank0 commented. Assuming you have root, try setting the time via NTP first:
ntpdate -s ntp.pool.org
If that doesn't work, just set the date like:
date -s 'May 23, 2013'

how to compile fftw3 on iOS

Nowdays I just want to use FFTW3 on iOS, since I've compiled it successfully into i386 version which is used by the iOS simulator, the rest work is to compile it into armv6(or v7) version and lipo these two versions together,below is my incorrect configure:
./configure
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1
LD=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld
CCFLAGS="-I
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/lib/gcc/arm-apple-darwin10/4.2.1/include/
-I /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/
-miphoneos-version-min=2.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk"
LDFLAGS="-arch armv6 -isysroot
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk"
--enable-float --host=arm-apple-darwin --build=arm-apple-darwin10 --disable-fortran
when use this to build fftw3,I always get this:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... arm-apple-darwin10
checking host system type... arm-apple-darwin
checking for arm-apple-darwin-gcc... /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1
checking whether the C compiler works... no
configure: error: in /Users/chencyz/Desktop/Development/Misc/fftw3/fftw-3.3':
configure: error: C compiler cannot create executables
Seeconfig.log' for more details
I'm not so clear about the problem(C compiler not works?),could anyone give me some guides,thanks very much !
According to ./configure --help:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
So the key is to pass --host=arm-apple-darwin10, and execute configure with the correct alterations to PATH, CFLAGS, LDFLAGS, etc.
This seems to work:
PATH=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:$PATH \
../configure --host=arm-apple-darwin10 CFLAGS="-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/include -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk" \
CC=arm-apple-darwin10-gcc-4.2.1 \
CPP=cpp \
LDFLAGS="-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk" \
--enable-single
Good luck.
I had a similar issue when trying to get cute compiled for iOS. Looking at the configure script, it didn't seem to use the $LDFLAGS variable, but if it did I think you could add the following to the configure line:
./configure CC=... CFLAGS="-arch armv7 -isysroot $SDKROOT" CXXFLAGS="$CFLAGS" LDFLAGS="$CFLAGS -Wl,-syslibroot $SDKROOT"
Where $SDKROOT is /Developer/Platforms/iPhone.platform/Developer/SDKs/iPhone5.0.sdk by default (with the iOS 5.0 SDK).
I never got cute compiled as I couldn't figure out how to correct the C-compiler invocation, however, your mileage may vary.

Cannot created executables installing IT++, ACML

I want to install IT++ with ACML
I first installed ACML and then did:
export LDFLAGS=$LDFLAGS:"-L/opt/acml4.4.0/ifort32/lib"
export CPPFLAGS=$CPPFLAGS:"-I/opt/acml4.4.0/ifort32/include"
So that IT++ can find it when it configures itself.
NExt I went to the IT++ directory and typed "./configure"
then I get the following error:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for g++... g++
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.
I went to the config.log and the interesting lines are given below:
lib conftest.cpp >&5
g++: :-I/opt/acml4.4.0/ifort32_mp/include: No such file or directory
g++: :-L/opt/acml4.4.0/ifort32_mp/lib: No such file or directory
configure:2836: $? = 1
Why is it doing this?