[maemo-developers] Survey about Maemo porting problems

From: tz thomas at mich.com
Date: Fri Nov 28 03:15:37 EET 2008
On Thu, Nov 20, 2008 at 9:30 AM, Eero Tamminen <eero.tamminen at nokia.com> wrote:
> Hi,
>
> ext tz wrote:
> ...
>
>> Something wrong in pkgconfig hard to diagnose
>>
>> Cross compiling hopelessly broken (does the gcc produce i386
>> executables?  No, well use --host,
>
> Scratchbox should handle fine packages that can be built only natively.

It doesn't, at least not the version I have to install with unaltered
./configure scripts which insist on testing if "gcc -o x x.c" will
produce something that runs as "x".  This is not uncommon!  It is
probably why ubuntu has a big set of ARM computers to build things
instead of using scratchbox.  There are less common (and probably
erroneous) tests for specific versions or library features, but I
don't expect them to be handled and I can usually work around them.
The ./configure may be broken in not picking up the --host from the
gcc specs, but that is unfortunately common when they do a "can I run
executables" test.  This might be another point where Nokia/maemo
could work with Ubuntu and Debian to upstream fixes to ./configure
scripts which prevent cross compiling.  I think I mentioned in my
original note I had to run a native gcc on my sharp zaurus to build a
lot of things!

>From libvnc 0.9.3 (which I managed to neuter enough to get a working
dpkg-buildpackage buildable x11vnc in extras-devel now):

[sbox-DIABLO_ARMEL: ~/alistdev/libv.tz] > ./configure
checking for a BSD-compatible install... /scratchbox/tools/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... found
checking for working autoheader... found
checking for working makeinfo... missing
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run
C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

Here is the relevant section from config.log:

configure:2170: gcc -v </dev/null >&5
Reading specs from
/scratchbox/compilers/cs2005q3.2-glibc2.5-arm/bin/../lib/gcc/arm-none-linux-gnueabi/3.4.4/specs
Reading specs from /scratchbox/compilers/cs2005q3.2-glibc2.5-arm/gcc.specs
rename spec cpp to old_cpp
Configured with:
/home/kl/cs2005q3-2_toolchain/gcc/glibc/work/gcc-2005q3-2/configure
--build=i386-linux --host=i386-linux --target=arm-none-linux-gnueabi
--prefix=/scratchbox/compilers/cs2005q3.2-g
libc-arm --with-headers=/scratchbox/compilers/cs2005q3.2-glibc-arm/usr/include
--enable-languages=c,c++ --enable-shared --enable-threads
--disable-checking --enable-symvers=gnu --program-prefix=arm
-linux- --with-gnu-ld --enable-__cxa_atexit --disable-libssp
--disable-libstdcxx-pch --with-cpu= --enable-interwork
Thread model: posix
gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)
configure:2173: $? = 0
configure:2175: gcc -V </dev/null >&5
sbox-arm-linux-gcc: `-V' must come at the start of the command line
configure:2178: $? = 1
configure:2201: checking for C compiler default output file name
configure:2204: gcc    conftest.c  >&5
configure:2207: $? = 0
configure:2253: result: a.out
configure:2258: checking whether the C compiler works
configure:2264: ./a.out
./configure: line 1: ./a.out: cannot execute binary file
configure:2267: $? = 126
configure:2276: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

More information about the maemo-developers mailing list