cross compiling with autoconf - c

I was trying to cross compile with autoconf.
I had tried from these helps :
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html
https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifying-Target-Triplets.html
https://github.com/jedisct1/libsodium/issues/274
Cross Compiling For ARM With Autoconf
And did -
./configure --build=x86_64-linux-gnu --host=/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf --target=/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf --disable-shared --disable-documentation
But after autoconf tool checking for the gcc and other things necessary for compilation it doesn't find these. Although they are already present in the directory.
So the log is :
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
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 whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-ar... no
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-lib... no
checking for /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-link... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... x86_64-pc-linux-gnu
checking host system type... Invalid configuration `/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf': machine `/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm' not recognized
configure: error: /bin/bash ./config.sub /opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf failed
This is the directory for all arm toolchain bin
host#ubuntu:/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin$ ls
arm-linux-gnueabihf-addr2line arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gfortran arm-linux-gnueabihf-readelf
arm-linux-gnueabihf-ar arm-linux-gnueabihf-gcc-5.4.1 arm-linux-gnueabihf-gprof arm-linux-gnueabihf-size
arm-linux-gnueabihf-as arm-linux-gnueabihf-gcc-ar arm-linux-gnueabihf-ld arm-linux-gnueabihf-strings
arm-linux-gnueabihf-c++ arm-linux-gnueabihf-gcc-nm arm-linux-gnueabihf-ld.bfd arm-linux-gnueabihf-strip
arm-linux-gnueabihf-c++filt arm-linux-gnueabihf-gcc-ranlib arm-linux-gnueabihf-nm gdbserver
arm-linux-gnueabihf-cpp arm-linux-gnueabihf-gcov arm-linux-gnueabihf-objcopy runtest
arm-linux-gnueabihf-elfedit arm-linux-gnueabihf-gcov-tool arm-linux-gnueabihf-objdump
arm-linux-gnueabihf-g++ arm-linux-gnueabihf-gdb arm-linux-gnueabihf-ranlib
Any suggestion?
EDIT
I tried the solution suggested by Chrono. It was able to find arm toolchain. But another problem arised :
error adding symbols: File format not recognized
libtool: link: arm-linux-gnueabihf-gcc -shared -fPIC -DPIC src/.libs/libcoap_1_la-address.o src/.libs/libcoap_1_la-async.o src/.libs/libcoap_1_la-block.o src/.libs/libcoap_1_la-coap_dtls.o src/.libs/libcoap_1_la-coap_event.o src/.libs/libcoap_1_la-coap_keystore.o src/.libs/libcoap_1_la-coap_time.o src/.libs/libcoap_1_la-debug.o src/.libs/libcoap_1_la-encode.o src/.libs/libcoap_1_la-hashkey.o src/.libs/libcoap_1_la-mem.o src/.libs/libcoap_1_la-net.o src/.libs/libcoap_1_la-option.o src/.libs/libcoap_1_la-pdu.o src/.libs/libcoap_1_la-resource.o src/.libs/libcoap_1_la-str.o src/.libs/libcoap_1_la-subscribe.o src/.libs/libcoap_1_la-uri.o src/platform/posix/.libs/libcoap_1_la-coap_io.o src/platform/posix/.libs/libcoap_1_la-prng.o src/platform/posix/.libs/libcoap_1_la-run.o -L./ext/tinydtls -ltinydtls -g -O2 -Wl,--version-script=./libcoap-1.map -Wl,-soname -Wl,libcoap-1.so.0 -o .libs/libcoap-1.so.0.0.0
For this line of compilation the error is :
./ext/tinydtls/libtinydtls.a: error adding symbols: File format not recognized
EDIT 2:
The problem was with the library it is not passing the cross compiler params to the autoconf properly, hence the issue.

Ensure the directory containing your toolchain's binaries is in your $PATH:
export OLDPATH=$PATH
export PATH=$OLDPATH:/opt/toolchains/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin
You should only need to do that once, unless you log out or otherwise exit that terminal session.
With that done, you can configure properly:
./configure \
--build=x86_64-linux-gnu \
--host=arm-linux-gnueabihf \
--target=arm-linux-gnueabihf \
--disable-shared \
--disable-documentation

Related

CPP fails sanity check on Mac

I’ve searched everywhere and can’t find how to solve this compile problem on my Mac:
C preprocessor "/lib/cpp" fails sanity check
Update: I'm trying to compile psqlodbc with ./configure I get the following:
configure: error: C preprocessor "/lib/cpp" fails sanity check
Would someone be so kind as to tell me what to check to begin sorting out what could be wrong? I have read that the problem is usually caused by multiple versions of the compiler and XCode. But, I have no idea how to even begin. Thanks!
Here is my output:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/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 make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking -Wall is a valid compile option... yes
./configure: line 4392: /usr/local/iODBC: is a directory
./configure: line 4395: /usr/local/iODBC: is a directory
configure: using
checking last argument to SQLColAttribute is SQLLEN *... no
checking for pg_config... no
checking for prove... prove
checking build system type... x86_64-apple-darwin17.5.0
checking host system type... x86_64-apple-darwin17.5.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin17.5.0 file names to x86_64-apple-darwin17.5.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin17.5.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... failed
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... no
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... no
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/Users/tedhtl/Downloads/psqlodbc-10.01.0000':
configure: error: C preprocessor "/lib/cpp" fails sanity check
go to http://developer.apple.com/xcode and click on the blue "Download" button in the upper right corner. After you log into the website, scroll to the bottom of the page and you'll see a "See More Downloads" link.
Look for "Command Line Tools" in the list of dmg files. It should look like this:
Get that DMG and then double click on the installer. It installs tools (like /usr/bin/cpp) that you can access from your command line (or Terminal.app).
I had the same question while compiling the odb lib for odb sqlite.
After looking at the answer from #Michael Dautermann, I ran the command "/usr/bin/cpp -v" to get the include path
#include <...> // search starts here:
/usr/local/include
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include
Updated the CPPFLAGS with include info from the above command.
It worked after re-configuring, as shown below, with the updated CPPFLAGS
/configure --disable-threads --disable-static CXX=/usr/local/bin/g++-5 CPPFLAGS=-I/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include LDFLAGS=-L/usr/local/lib/gcc/5 CFLAGS=-O3 CXXFLAGS=-O3
I hope this will help you or others

configure tries to test-run a cross compiled program

I try to compile something for IBM Blue Gene/Q with GCC 4.9. As a dependency I need the gmp (GNU Multi Precision) library, I use version 6.1.1. This comes with GNU Autotools.
Strangely, is has worked with LLVM before. And yesterday it did not work at noon but again in the evening and not any more today. I am thoroughly confused, honestly.
On Blue Gene/Q, you compile on an IBM PowerPC 740 and let it run on an IBM PowerPC A2 processor. Therefore you need to use the cross compiler. My configure is the following:
/homec/hbn28/hbn28e/Sources/gmp-6.1.1/configure \
--prefix=/homec/hbn28/hbn28e/local-juqueen \
--host=powerpc64-bgq-linux \
--build=powerpc64-unknown-linux-gnu \
--disable-shared \
--enable-static \
CC=/bgsys/local/gcc/4.9.3/bin/mpigcc \
CXX=/bgsys/local/gcc/4.9.3/bin/mpig++ \
'CFLAGS=-O2 \
-finline-limit=50000 \
-Wall \
-Wpedantic \
-fmax-errors=1 \
-fdiagnostics-color=auto \
-Drestrict=__restrict__ \
--std=gnu99'
Error regarding CC_FOR_BUILD
The first issue has been this error.
/usr/include/stdio.h:34:21: error: stddef.h: No such file or directory
The generated Makefile has used CC for a few files but then called itself recurively using CC=$(CC_FOR_BUILD). And that is just set to cc by default, the frontend compiler which does not do any good on the compute backend. So I have added CC_FOR_BUILD=/bgsys/local/gcc/4.9.3/bin/mpigcc to the configure flags. That fixed that error.
Testing cross compiled binary
Then the configure script runs a bit further:
checking build system type... powerpc64-unknown-linux-gnu
checking host system type... powerpc64-bgq-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for powerpc64-bgq-linux-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=mode64
checking whether /bgsys/local/gcc/4.9.3/bin/mpigcc is gcc... yes
checking compiler /bgsys/local/gcc/4.9.3/bin/mpigcc -O2 -finline-limit=50000 -Wall -Wpedantic -fmax-errors=1 -fdiagnostics-color=auto -Drestrict=__restrict__ --std=gnu99 ... yes
checking compiler /bgsys/local/gcc/4.9.3/bin/mpigcc -O2 -finline-limit=50000 -Wall -Wpedantic -fmax-errors=1 -fdiagnostics-color=auto -Drestrict=__restrict__ --std=gnu99 has sizeof(long)==8... yes
checking for powerpc64-bgq-linux-gcc... /bgsys/local/gcc/4.9.3/bin/mpigcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /bgsys/local/gcc/4.9.3/bin/mpigcc accepts -g... yes
checking for /bgsys/local/gcc/4.9.3/bin/mpigcc option to accept ISO C89... none needed
checking whether /bgsys/local/gcc/4.9.3/bin/mpigcc understands -c and -o together... yes
checking for /bgsys/local/gcc/4.9.3/bin/mpigcc option to accept ISO C99... none needed
checking for /bgsys/local/gcc/4.9.3/bin/mpigcc option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... /bgsys/local/gcc/4.9.3/bin/mpigcc -E
checking build system compiler /bgsys/local/gcc/4.9.3/bin/mpigcc... no
configure: error: Specified CC_FOR_BUILD doesn't seem to work
Looking at config.log, it says
configure:9899: checking build system compiler /bgsys/local/gcc/4.9.3/bin/mpigcc
configure:9912: /bgsys/local/gcc/4.9.3/bin/mpigcc conftest.c
configure:9915: $? = 0
/bgsys/source/srcV1R2M4.29840/comm/sys/buildtools/pami/common/bgq/BgqPersonality.h:102:
/bgsys/source/srcV1R2M4.29840/comm/sys/buildtools/pami/common/bgq/BgqPersonality.h<102>
/homec/hbn28/hbn28e/Sources/gmp-6.1.1/configure: line 10000: 26929 Aborted (core dumped) ./a.out
/homec/hbn28/hbn28e/Sources/gmp-6.1.1/configure: line 9917: ./b.out: No such file or directory
/homec/hbn28/hbn28e/Sources/gmp-6.1.1/configure: line 9917: ./a.exe: No such file or directory
/homec/hbn28/hbn28e/Sources/gmp-6.1.1/configure: line 9917: ./a_out.exe: No such file or directory
/homec/hbn28/hbn28e/Sources/gmp-6.1.1/configure: line 9917: ./conftest: No such file or directory
configure:9922: result: no
configure:9927: error: Specified CC_FOR_BUILD doesn't seem to work
It seems to use the correct compiler. When running the program on the frontend (where I compile), it fails since the BgqPersonality.h has special information about the compute backend, the program just cannot run on the frontend.
configure assumes that the compiler is broken (which it arguably is for the frontend) and stops building. Previously I had neither error with LLVM, the cross compilation has just worked fine. configure even says checking whether we are cross compiling... yes so it must be aware of the situation. Perhaps the CC_FOR_BUILD is meant for the frontend whereas CC is for the compute backend. Without CC_FOR_BUILD I cannot compile as written above.
Is there some way to get this cross compiled properly?
CC_FOR_BUILD is supposed to be a compiler that can compile tools for the current system, rather than the one you want to build the binaries for. The name comes from the fact that CBUILD is the name to reference the system the build happens on.
I wrote a blog post some time ago that explains the nomenclature of these systems and how they are supposed to be used.

Pango build error (GTK+3 build)

I am building GTK+3 (3.16.6) latest version on my Elementary OS desktop (Ubuntu 12.04) following these installation instructions at GTK website.
I have successfully built and installed the following packages in "/opt/gtk" following the previous link:
Glib-2.44.1
GdkPixBuf-2.31
GOObject-1.44
But when I try to :
./configure --prefix=/opt/gtk
the output is :
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
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 whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for native Win32... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for c++... c++
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking for sysconf... yes
checking for getpagesize... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... c++ -E
checking for ld used by c++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking for c++ option to produce PIC... -fPIC -DPIC
checking if c++ PIC flag -fPIC -DPIC works... yes
checking if c++ static flag -static works... yes
checking if c++ supports -c -o file.o... yes
checking if c++ supports -c -o file.o... (cached) yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.lt
config.lt: creating libtool
checking for some Win32 platform... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for HARFBUZZ... no
checking for CoreText availability... no
checking for CAIRO... no
configure: error: *** Could not enable any backends.
*** Must have at least one backend to build Pango.
But I have libcairo2-dev and libcairo2 installed through apt-get. I read somewhere that the CoreText and HarfBuzz are available through gnome-core-devel. When I tried to install the package, i got the following error :
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
gnome-core-devel : Depends: gnome-platform-devel (= 1:3.0+6ubuntu3) but it is not going to be installed
Depends: libwnck-3-dev (>= 3.0) but it is not going to be installed
Depends: libmutter-dev (>= 3.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Please help me resolve this problem. Thanks in advance.

Valgrind in ARM Cortex-A8 Issue "configure: error: Unsupported host architecture"

I have found in my actual program for ARM CortexA8 with linux a following issue:
´*** glibc detected *** ./PRUssExternal: double free or corruption (top): 0x00024fe8 ***´
I`m searching for that in the web and I found that the most usefull program to manage this is issue is Valgrind.
How to track down a double free or corruption error in C++ with gdb
Then I try to compile to my system in a cross compilation, with the following options in the configuration. I´m using Valgrind 3.8.1
#-virtual-machine:~/valgrind-3.8.1$
CC=arm-cortexa8-linux-gnueabi-gcc CFLAGS="-pipe -Os -mtune=cortex-a8
-march=armv7-a -mabi=aapcs-linux -msoft-float -I/opt/OSELAS.Toolchain-2011.11.3/arm-cortexa8-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitez/sysroot-arm-cortexa8-linux-gnueabi/usr/include" LDFLAGS="-L/opt/OSELAS.Toolchain-2011.11.3/arm-cortexa8-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitez/sysroot-arm-cortexa8-linux-gnueabi/usr/lib" ./configure -prefix=/opt/valgrid -host=arm-cortexa8-linux-gnueabi
-target=arm-none-linux-gnueabi -build=x86_64-ubuntu-linux
And the output of this configuration is:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-cortexa8-linux-gnueabi-strip... arm-cortexa8-linux-gnueabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether ln -s works... yes
checking for arm-cortexa8-linux-gnueabi-gcc... arm-cortexa8-linux-gnueabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-cortexa8-linux-gnueabi-gcc accepts -g... yes
checking for arm-cortexa8-linux-gnueabi-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of arm-cortexa8-linux-gnueabi-gcc... gcc3
checking whether arm-cortexa8-linux-gnueabi-gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... arm-cortexa8-linux-gnueabi-gcc -E
checking for arm-cortexa8-linux-gnueabi-g++... arm-cortexa8-linux-gnueabi-g++
checking whether we are using the GNU C++ compiler... yes
checking whether arm-cortexa8-linux-gnueabi-g++ accepts -g... yes
checking dependency style of arm-cortexa8-linux-gnueabi-g++... gcc3
checking for arm-cortexa8-linux-gnueabi-ranlib... arm-cortexa8-linux-gnueabi-ranlib
checking for a sed that does not truncate output... /bin/sed
checking for ar... /usr/bin/ar
checking for perl... /usr/bin/perl
checking for gdb... /usr/bin/gdb
checking dependency style of arm-cortexa8-linux-gnueabi-gcc... gcc3
checking for diff -u... yes
checking for a supported version of gcc... ok (4.6.2)
checking build system type... x86_64-ubuntu-linux-gnu
checking host system type... arm-cortexa8-linux-gnueabi
checking for a supported CPU... no (arm)
configure: error: Unsupported host architecture. Sorry
In the last line of this output, My Issue is appeared although I looked for some information and the Cortexa8 it is one of the supported plattaforms.
valgrind on the ARM9?
For that reason my question is whether my board is not supported because the libraries that I use are not compatible or it could be other reason. Or in other hand I could compile the valgrind without fear and jump this checking.
Thanks for your time
-Regards
Breci01010...
You should edit configure file. Find a line "armv7*" and change it to "arm*" - this would be enough.

How do I compile and test a c program with vala code in it?

I am working on a specialized version of the Gnome Cheese app for a photo-booth. At the moment though I am simply trying to get rid of unnecessary code and simply the app before I add the features I want. This has the added benefit of letting me get comfy with vala which I have never used before, as well as a project like this which I have also never worked on.
The problem I am running into is I see no easy way to go about testing it, and despite having cheese already installed on my computer (so I know all required apps are installed), I am still getting errors in there.
/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
testing autoconf2.50... not found.
testing autoconf... found 2.69
checking for automake >= 1.9...
testing automake-1.12... not found.
testing automake-1.11... found 1.11.6
checking for libtool >= 1.5...
testing libtoolize... found 2.4.2
checking for intltool >= 0.30...
testing intltoolize... found 0.50.2
checking for pkg-config >= 0.14.0...
testing pkg-config... found 0.26
checking for gtk-doc >= 1.0...
testing gtkdocize... found 1.18
Checking for required M4 macros...
Checking for forbidden M4 macros...
**Warning**: I am going to run `configure' with no arguments.
If you wish to pass any to it, please specify them on the
`./autogen.sh' command line.
Processing ./configure.ac
Running libtoolize...
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running intltoolize...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-maintainer-mode ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
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 whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for valac... /usr/bin/valac
checking /usr/bin/valac is at least version 0.18.0... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.24... yes
checking whether gcc understands -Wno-sign-compare... yes
checking what warning flags to pass to the C compiler... -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare
checking what language compliance flags to pass to the C compiler...
checking whether NLS is requested... yes
checking for intltool >= 0.50.0... 0.50.2 found
checking for intltool-update... /usr/bin/intltool-update
checking for intltool-merge... /usr/bin/intltool-merge
checking for intltool-extract... /usr/bin/intltool-extract
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.14.2
checking for XML::Parser... ok
checking host operating system... Linux
checking for gudev-1.0... found
checking sys/videoio.h usability... no
checking sys/videoio.h presence... no
checking for sys/videoio.h... no
checking X11/extensions/XTest.h usability... no
checking X11/extensions/XTest.h presence... no
checking for X11/extensions/XTest.h... no
checking for CHEESE... no
configure: error: Package requirements (glib-2.0 >= 2.28.0
gio-2.0 >= 2.32.0
x11
gobject-2.0 >= 2.28.0
gdk-pixbuf-2.0
gstreamer-plugins-base-1.0 >= 0.11.0 gstreamer-1.0 >= 0.11.0 gstreamer-pbutils-1.0 >= 0.11.0
gstreamer-plugins-bad-1.0 >= 0.11.0
gnome-desktop-3.0 >= 2.91.6
cairo >= 1.10.0
pangocairo >= 1.28.0
clutter-1.0 >= 1.12.0
clutter-gst-2.0 >= 1.9.0
gudev-1.0) were not met:
No package 'gstreamer-plugins-base-1.0' found
No package 'gstreamer-1.0' found
No package 'gstreamer-pbutils-1.0' found
No package 'gstreamer-plugins-bad-1.0' found
No package 'gnome-desktop-3.0' found
No package 'clutter-1.0' found
No package 'clutter-gst-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables CHEESE_CFLAGS
and CHEESE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
That is what I get when I do sh autogen.sh.
I feel there has got to be a better way and I was wondering if anyone had any ideas or solutions to make this work.
Thanks, my code can be found: here
having cheese already installed on my computer (so I know all required apps are installed)
You might have all the required libs installed as binaries, but apparently you do not have the corresponding headers installed.
To run a dynamically linked application, you need to have the .so files of the dependencies installed. To compile an application, you also need to have the dependencies' header (and, in case of libraries that work with pkg-config, .pc) files installed, which, according to the error message, you don't.
Most package management systems are set up, so that a libraries' header and .pc files (and generally all files that are only relevant when compiling an application that uses the library - not when running it) are contained in -dev packages. So you need to install clutter-dev and so on.

Resources