[Home]

Summary:ASTERISK-08399: asterisk fails to cross compile for arm
Reporter:Ovidiu Sas (ovi)Labels:
Date Opened:2006-12-19 22:56:52.000-0600Date Closed:2007-06-30 09:19:58
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 8637.patch
( 1) asterisk14.ko.log.gz
( 2) asterisk14.ok.log.gz
( 3) config.log.gz
( 4) editline-config.log.gz
( 5) pg_config.log.gz
Description:here's the configure:
       AR=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ar AS=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-as LD=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ld NM=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-nm CC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CPP="/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -E" GCC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CXX=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ RANLIB=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ranlib STRIP=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-strip \
       CPPFLAGS="-O2   -pipe  -I/home/admin/slug-optware-dev/optware/staging/opt/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include" \
       LDFLAGS=" -L/home/admin/slug-optware-dev/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/admin/slug-optware-dev/optware/staging/opt/lib " \
       PATH="/home/admin/slug-optware-dev/optware/staging/opt/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" \
       ./configure \
       --build=i386-pc-linux-gnu \
       --host=armv5b-softfloat-linux \
       --target=armv5b-softfloat-linux \
       --prefix=/opt \
       --disable-nls \
       --disable-static \
       --without-pwlib \
       --with-ssl=/home/admin/slug-optware-dev/optware/staging/opt \
       --with-z=/home/admin/slug-optware-dev/optware/staging/opt \
       --with-termcap=/home/admin/slug-optware-dev/optware/staging/opt \
       --with-curl=/home/admin/slug-optware-dev/optware/staging/opt \
       --without-popt \
       --without-ogg \
       --without-popt \
       --without-tds \
       --with-sqlite=/home/admin/slug-optware-dev/optware/staging/opt \
       --without-postgres \
       --localstatedir=/opt/var \
       --sysconfdir=/opt/etc


and here's the failure:
cd editline && test -f config.h || CFLAGS="-I/home/admin/slug-optware-dev/optware/builds/asterisk14/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3   -O6" ./configure --build=i386-pc-linux-gnu --host=armv5b-softfloat-linux-gnu
creating cache ./config.cache
....
checking for tgetent in -lncurses... no
configure: error: termcap support not found
make[2]: *** [editline/libedit.a] Error 1
make[1]: *** [main] Error 2
make[1]: Leaving directory `/home/admin/slug-optware-dev/optware/builds/asterisk14'
make: *** [/home/admin/slug-optware-dev/optware/builds/asterisk14/.built] Error 2
Comments:By: Russell Bryant (russell) 2006-12-19 23:02:08.000-0600

Here is a patch to attempt to fix this issue.

The problem is that main/Makefile manually runs the editline configure script.  It passes in the right information for --build and --host, but it does not account for any other options.  This patch has the main Asterisk configure script run the editline configure script so that all options are passed to it correctly.

By: Ovidiu Sas (ovi) 2006-12-20 00:04:49.000-0600

After applying the patch I got this error on ./bootstrap.sh
$ ./bootstrap.sh
Generating the configure script ...
configure.ac:4: error: Autoconf version 2.60 or higher is required
configure.ac:4: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
configure.ac:4: error: Autoconf version 2.60 or higher is required
configure.ac:4: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
autoheader: /usr/bin/autom4te failed with exit status: 63


Here's the autoconf version:
# autoconf -V
autoconf (GNU Autoconf) 2.59
Written by David J. MacKenzie and Akim Demaille.

Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The build machine is a debian one.

By: Russell Bryant (russell) 2006-12-20 09:56:16.000-0600

At the top of configure.ac, change 2.60 to be 2.59.  Then, try bootstrap.sh again.

By: Ovidiu Sas (ovi) 2006-12-20 10:03:48.000-0600

Here's the new error after patching configure.ac:
$ ./bootstrap.sh
Generating the configure script ...
configure:3795: error: possibly undefined macro: _AC_PATH_PROG_FEATURE_CHECK
     If this token and others are legitimate, please use m4_pattern_allow.
     See the Autoconf documentation.
configure:3796: error: possibly undefined macro: _AC_FEATURE_CHECK_LENGTH

By: Ovidiu Sas (ovi) 2006-12-21 13:57:41.000-0600

after applying the patch and running the bootstrap.sh on a debian testing box, I have the following error during the configure stage:

=== configuring in main/editline (/home/admin/slug-optware-dev/optware/builds/asterisk14/main/editline)
configure: running /bin/sh ./configure --prefix=/opt  '--build=i386-pc-linux-gnu' '--host=armv5b-softfloat-linux' '--target=armv5b-softfloat-linux' '--disable-nls' '--disable-static' '--without-pwlib' '--with-ssl=/home/admin/slug-optware-dev/optware/staging/opt' '--with-z=/home/admin/slug-optware-dev/optware/staging/opt' '--with-termcap=/home/admin/slug-optware-dev/optware/staging/opt' '--with-curl=/home/admin/slug-optware-dev/optware/staging/opt' '--without-ogg' '--without-popt' '--without-tds' '--with-sqlite=/home/admin/slug-optware-dev/optware/staging/opt' '--without-postgres' '--localstatedir=/opt/var' '--sysconfdir=/opt/etc' 'build_alias=i386-pc-linux-gnu' 'host_alias=armv5b-softfloat-linux' 'target_alias=armv5b-softfloat-linux' 'CC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc' 'LDFLAGS= -L/home/admin/slug-optware-dev/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/admin/slug-optware-dev/optware/staging/opt/lib ' 'CPPFLAGS=-O2   -pipe  -I/home/admin/slug-optware-dev/optware/staging/opt/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include' 'CXX=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-g++' 'CPP=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -E' --cache-file=/dev/null --srcdir=.
configure: warning: build_alias=i386-pc-linux-gnu: invalid host type
configure: warning: host_alias=armv5b-softfloat-linux: invalid host type
configure: error: can only configure for one host and one target at a time
configure: error: ./configure failed for main/editline
make: *** [/home/admin/slug-optware-dev/optware/builds/asterisk14/.configured] Error 1

By: Russell Bryant (russell) 2007-01-03 13:35:21.000-0600

Alright, I'm going to try to update the editline configure script.  It was generated a longgggggg time ago with autoconf version 2.13.  Autoconf is up to 2.61 now, so maybe that will fix it.  I'm setting up a branch for this issue and I'll report back with progress .....

By: Ovidiu Sas (ovi) 2007-01-03 13:46:46.000-0600

here's a link to the asterisk 1.4 makefile used for cross compilation:
http://svn.nslu2-linux.org/svnroot/optware/trunk/make/asterisk14.mk

pls. note the configure section

By: Russell Bryant (russell) 2007-01-18 14:39:53.000-0600

Please try the latest code in the following branch to see if I have resolved this for you:

svn co http://svn.digium.com/svn/asterisk/team/russell/issue_8637

By: Russell Bryant (russell) 2007-01-18 15:58:54.000-0600

I have merged the fixes from my branch into the 1.4 branch and trunk in revisions 51262 and 51263.  Please let me know if you still have any problems.  Thanks!

By: Ovidiu Sas (ovi) 2007-01-18 22:03:47.000-0600

still doesn't work :(
I will attach the logs for a successful build (using the 1.4.0 tarball) and logs from an unsuccessful build from the branch that you posted.

By: Ovidiu Sas (ovi) 2007-01-18 22:07:03.000-0600

unsuccessful build of http://svn.digium.com/svn/asterisk/team/russell/issue_8637
- asterisk14.ko.log.gz

successful build of 1.4.0 tarball
- asterisk14.ok.log.gz

By: Russell Bryant (russell) 2007-01-19 13:02:00.000-0600

Ok, this is something else.  We need to exclude the optimizations in codecs/gsm/Makefile for your platform.  Could you tell me what the PROC variable is set to?

You can find out by adding the line

$(error PROC is $(PROC))

somewhere in the top of codecs/gsm/Makefile ...

By: Russell Bryant (russell) 2007-01-19 13:31:59.000-0600

I updated codecs/gsm/Makefile in 1.4 and trunk in revisions 51331 and 51332.  I'm nearly positive this will fix the problem for you.  Let me know if it doesn't, though.  :)

By: Ovidiu Sas (ovi) 2007-01-19 14:21:22.000-0600

The gsm issue was fixed :), but I have a new issue with editline:

Here's the configure:
=====================
(cd /home/admin/slug-optware-dev/optware/builds/asterisk14; \
AR=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ar AS=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-as LD=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ld NM=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-nm CC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CPP="/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -E" GCC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CXX=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ RANLIB=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ranlib STRIP=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-strip \
CPPFLAGS="-O2   -pipe  -I/home/admin/slug-optware-dev/optware/staging/opt/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include" \
LDFLAGS=" -L/home/admin/slug-optware-dev/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/admin/slug-optware-dev/optware/staging/opt/lib " \
PATH="/home/admin/slug-optware-dev/optware/staging/opt/bin:/home/admin/slug-3.10/releases/slugos-3.10-beta/bitbake/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" \
./configure \
--build=i386-pc-linux-gnu \
--host=armv5b-softfloat-linux \
--target=armv5b-softfloat-linux \
--prefix=/opt \
--disable-nls \
--disable-static \
--without-pwlib \
--with-ssl=/home/admin/slug-optware-dev/optware/staging/opt \
--with-z=/home/admin/slug-optware-dev/optware/staging/opt \
--with-termcap=/home/admin/slug-optware-dev/optware/staging/opt \
--with-curl=/home/admin/slug-optware-dev/optware/staging/opt \
--without-popt \
--without-ogg \
--without-popt \
--without-tds \
--with-sqlite=/home/admin/slug-optware-dev/optware/staging/opt \
--without-postgres \
--localstatedir=/opt/var \
--sysconfdir=/opt/etc \
)


Here's the failure:
===================
cd editline && test -f config.h || CFLAGS="-pthread -I/home/admin/slug-optware-dev/optware/builds/asterisk14/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -include /home/admin/slug-optware-dev/optware/builds/asterisk14/include/asterisk/autoconfig.h   -O6" ./configure --build=i386-pc-linux-gnu --host=armv5b-softfloat-linux-gnu --with-ncurses= --with-curses= --with-termcap=/home/admin/slug-optware-dev/optware/staging/opt --with-tinfo=
creating cache ./config.cache
checking for gcc... /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc
checking whether the C compiler (/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -pthread -I/home/admin/slug-optware-dev/optware/builds/asterisk14/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -include /home/admin/slug-optware-dev/optware/builds/asterisk14/include/asterisk/autoconfig.h   -O6 ) works... yes
checking whether the C compiler (/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -pthread -I/home/admin/slug-optware-dev/optware/builds/asterisk14/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -include /home/admin/slug-optware-dev/optware/builds/asterisk14/include/asterisk/autoconfig.h   -O6 ) is a cross-compiler... yes
checking whether we are using GNU C... yes
checking whether /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc accepts -g... yes
checking how to run the C preprocessor... /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -E
checking host system type... armv5b-softfloat-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ranlib
checking for ar... /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ar
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
configure: error: termcap support not found
make[2]: *** [editline/libedit.a] Error 1
make[1]: *** [main] Error 2
make[1]: Leaving directory `/home/admin/slug-optware-dev/optware/builds/asterisk14'
make: *** [/home/admin/slug-optware-dev/optware/builds/asterisk14/.built] Error 2



Here's the config that works:
=============================
(cd /home/admin/slug-optware-dev/optware/builds/asterisk14/main/editline; \
AR=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ar AS=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-as LD=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ld NM=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-nm CC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CPP="/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -E" GCC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CXX=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ RANLIB=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ranlib STRIP=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-strip \
CPPFLAGS="-O2   -pipe  -I/home/admin/slug-optware-dev/optware/staging/opt/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include" \
LDFLAGS=" -L/home/admin/slug-optware-dev/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/admin/slug-optware-dev/optware/staging/opt/lib " \
./configure \
--build=i386-pc-linux-gnu \
--host=armv5b-softfloat-linux \
--target=armv5b-softfloat-linux \
--prefix=/opt \
--disable-nls \
--disable-static \
--localstatedir=/opt/var \
--sysconfdir=/opt/etc \
)


If you want, we can track this into a separate bug.

By: Ovidiu Sas (ovi) 2007-01-19 14:28:40.000-0600

Here's the output from the working editline config:
===================================================
(cd /home/admin/slug-optware-dev/optware/builds/asterisk14/main/editline; \
AR=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ar AS=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-as LD=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ld NM=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-nm CC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CPP="/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -E" GCC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CXX=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ RANLIB=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ranlib STRIP=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-strip \
CPPFLAGS="-O2   -pipe  -I/home/admin/slug-optware-dev/optware/staging/opt/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include" \
LDFLAGS=" -L/home/admin/slug-optware-dev/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/admin/slug-optware-dev/optware/staging/opt/lib " \
./configure \
--build=i386-pc-linux-gnu \
--host=armv5b-softfloat-linux \
--target=armv5b-softfloat-linux \
--prefix=/opt \
--disable-nls \
--disable-static \
--localstatedir=/opt/var \
--sysconfdir=/opt/etc \
)
creating cache ./config.cache
checking for gcc... /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc
checking whether the C compiler (/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc   -L/home/admin/slug-optware-dev/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/admin/slug-optware-dev/optware/staging/opt/lib ) works... yes
checking whether the C compiler (/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc   -L/home/admin/slug-optware-dev/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/admin/slug-optware-dev/optware/staging/opt/lib ) is a cross-compiler... yes
checking whether we are using GNU C... yes
checking whether /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc accepts -g... yes
checking how to run the C preprocessor... /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -E
checking host system type... armv5b-softfloat-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ranlib
checking for ar... /home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ar
checking for tgetent in -ltermcap... yes
checking for termcap.h... yes
checking for sys/cdefs.h... yes
checking for vis.h... no
checking for issetugid... no
checking for strlcat... no
checking for strlcpy... no
checking for fgetln... no
checking for strvis... no
checking for strunvis... no
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h

By: Russell Bryant (russell) 2007-01-24 18:34:16.000-0600

Would you mind posting config.log from the editline directory?  That way, I can see exactly why it is still failing.

By: Ovidiu Sas (ovi) 2007-01-24 20:21:05.000-0600

config file attached

By: Russell Bryant (russell) 2007-01-26 18:52:36.000-0600

It looks like you may have given me the log from the successful run.  The log shows that libtermcap was found successfully.  I need the one from the failed version.  :)

By: Ovidiu Sas (ovi) 2007-01-26 19:59:45.000-0600

sorry ... the previous one was the config.log from the top directory.
now you have the right one.

By: Russell Bryant (russell) 2007-01-30 17:34:27.000-0600

I committed a patch the other day to make sure that the LDFLAGS made it to the editline configure script.  Judging by the config.log, this may have fixed your problem.  Please try again when you a chance and let me know how it goes!

By: Ovidiu Sas (ovi) 2007-01-30 19:30:31.000-0600

yes.
it is fixed now (tested ok on r53032).
next: addons ;-)


thx a lot for your effort,
-ovi

By: Ovidiu Sas (ovi) 2007-01-30 19:35:55.000-0600

the only remaining patch that I still need to apply is here:
http://svn.nslu2-linux.org/svnroot/optware/trunk/sources/asterisk14/main-db1-ast-Makefile.patch

By: Russell Bryant (russell) 2007-01-31 10:50:18.000-0600

Well, while we're at it, we might as well fix everything!  Why does this patch need to be applied?  Could you show me the errors you get without it?

By: Ovidiu Sas (ovi) 2007-01-31 11:20:16.000-0600

Here's the output of the build for svn-r53032 without the patch:
================================================================
/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -o hash/ndbm.o -c hash/ndbm.c -pthread -I/home/admin/slug-optware-dev/optware/builds/asterisk14/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -include /home/admin/slug-optware-dev/optware/builds/asterisk14/include/asterisk/autoconfig.h   -O6 -O6 -Wall -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude -Ihash -Ibtree -Irecno
In file included from hash/ndbm.c:52:
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:47: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:49: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:51: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:53: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:55: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:57: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:59: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:61: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:67: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:69: warning: function declaration isn't a prototype
/home/admin/slug-optware-dev/optware/staging/opt/include/ndbm.h:71: warning: function declaration isn't a prototype
hash/ndbm.c:62: warning: function declaration isn't a prototype
hash/ndbm.c: In function `dbm_open':
hash/ndbm.c:66: error: `HASHINFO' undeclared (first use in this function)
hash/ndbm.c:66: error: (Each undeclared identifier is reported only once
hash/ndbm.c:66: error: for each function it appears in.)
hash/ndbm.c:66: error: parse error before "info"
hash/ndbm.c:67: error: `DBM_SUFFIX' undeclared (first use in this function)
hash/ndbm.c:76: error: `info' undeclared (first use in this function)
hash/ndbm.c:84: warning: implicit declaration of function `__hash_open'
hash/ndbm.c: At top level:
hash/ndbm.c:93: warning: function declaration isn't a prototype
hash/ndbm.c: In function `dbm_close':
hash/ndbm.c:95: error: structure has no member named `close'
hash/ndbm.c: At top level:
hash/ndbm.c:105: warning: function declaration isn't a prototype
hash/ndbm.c: In function `dbm_fetch':
hash/ndbm.c:110: error: `DBT' undeclared (first use in this function)
hash/ndbm.c:110: error: parse error before "dbtkey"
hash/ndbm.c:112: error: `dbtkey' undeclared (first use in this function)
hash/ndbm.c:114: error: structure has no member named `get'
hash/ndbm.c:114: error: `dbtretdata' undeclared (first use in this function)
hash/ndbm.c: At top level:
hash/ndbm.c:131: warning: function declaration isn't a prototype
hash/ndbm.c: In function `dbm_firstkey':
hash/ndbm.c:135: error: `DBT' undeclared (first use in this function)
hash/ndbm.c:135: error: parse error before "dbtretkey"
hash/ndbm.c:137: error: structure has no member named `seq'
hash/ndbm.c:137: error: `dbtretkey' undeclared (first use in this function)
hash/ndbm.c:137: error: `dbtretdata' undeclared (first use in this function)
hash/ndbm.c:137: error: `R_FIRST' undeclared (first use in this function)
hash/ndbm.c: At top level:
hash/ndbm.c:152: warning: function declaration isn't a prototype
hash/ndbm.c: In function `dbm_nextkey':
hash/ndbm.c:156: error: `DBT' undeclared (first use in this function)
hash/ndbm.c:156: error: parse error before "dbtretkey"
hash/ndbm.c:158: error: structure has no member named `seq'
hash/ndbm.c:158: error: `dbtretkey' undeclared (first use in this function)
hash/ndbm.c:158: error: `dbtretdata' undeclared (first use in this function)
hash/ndbm.c:158: error: `R_NEXT' undeclared (first use in this function)
hash/ndbm.c: At top level:
hash/ndbm.c:172: warning: function declaration isn't a prototype
hash/ndbm.c: In function `dbm_delete':
hash/ndbm.c:176: error: `DBT' undeclared (first use in this function)
hash/ndbm.c:176: error: parse error before "dbtkey"
hash/ndbm.c:178: error: `dbtkey' undeclared (first use in this function)
hash/ndbm.c:180: error: structure has no member named `del'
hash/ndbm.c: At top level:
hash/ndbm.c:195: warning: function declaration isn't a prototype
hash/ndbm.c: In function `dbm_store':
hash/ndbm.c:199: error: `DBT' undeclared (first use in this function)
hash/ndbm.c:199: error: parse error before "dbtkey"
hash/ndbm.c:201: error: `dbtkey' undeclared (first use in this function)
hash/ndbm.c:203: error: `dbtdata' undeclared (first use in this function)
hash/ndbm.c:205: error: structure has no member named `put'
hash/ndbm.c:206: error: `R_NOOVERWRITE' undeclared (first use in this function)
hash/ndbm.c: At top level:
hash/ndbm.c:210: error: parse error before numeric constant
hash/ndbm.c:215: warning: type defaults to `int' in declaration of `hp'
hash/ndbm.c:215: error: `db' undeclared here (not in a function)
hash/ndbm.c:215: warning: data definition has no type or storage class
hash/ndbm.c:216: error: parse error before "return"
hash/ndbm.c:221: error: parse error before '*' token
hash/ndbm.c:221: warning: type defaults to `int' in declaration of `db'
hash/ndbm.c:221: warning: data definition has no type or storage class
hash/ndbm.c:222: error: parse error before '{' token
hash/ndbm.c:225: warning: type defaults to `int' in declaration of `hp'
hash/ndbm.c:225: error: redefinition of `hp'
hash/ndbm.c:215: error: `hp' previously defined here
hash/ndbm.c:225: error: request for member `internal' in something not a structure or union
hash/ndbm.c:225: warning: data definition has no type or storage class
hash/ndbm.c:226: error: parse error before '->' token
hash/ndbm.c:232: warning: function declaration isn't a prototype
hash/ndbm.c: In function `dbm_dirfno':
hash/ndbm.c:234: error: structure has no member named `internal'
{standard input}: Assembler messages:
{standard input}:3333: Error: symbol `hp' is already defined
make[3]: *** [hash/ndbm.o] Error 1
make[2]: *** [db1-ast/libdb1.a] Error 2
make[1]: *** [main] Error 2
make[1]: Leaving directory `/home/admin/slug-optware-dev/optware/builds/asterisk14'
make: *** [/home/admin/slug-optware-dev/optware/builds/asterisk14/.built] Error 2

By: Russell Bryant (russell) 2007-02-07 17:57:36.000-0600

This has been fixed in 1.4 and trunk in 53497 and 53498.  I really hope you can cleanly build Asterisk without any patches now.  If not, feel free to let me know.  :)

By: Ovidiu Sas (ovi) 2007-02-08 14:33:23.000-0600

Thank you very much for fixing all this issue :-)

There is one more issue with respect to pgsql database.
If you have time to take a look at it, I would greatly appreciate it.

Here's the output of the compilation (1.4 branch - r53634) when pgsql is enabled:

(cd /home/admin/slug-optware-dev/optware/builds/asterisk14; \
AR=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ar AS=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-as LD=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ld NM=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-nm CC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CPP="/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -E" GCC=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc CXX=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-g++ RANLIB=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-ranlib STRIP=/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-strip \
CPPFLAGS="-O2   -pipe  -I/home/admin/slug-optware-dev/optware/staging/opt/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include" \
LDFLAGS=" -L/home/admin/slug-optware-dev/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/admin/slug-optware-dev/optware/staging/opt/lib " \
PATH="/home/admin/slug-optware-dev/optware/staging/opt/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" \
./configure \
--build=i386-pc-linux-gnu \
--host=armv5b-softfloat-linux \
--target=armv5b-softfloat-linux \
--prefix=/opt \
--disable-nls \
--disable-static \
--without-pwlib \
--with-ssl=/home/admin/slug-optware-dev/optware/staging/opt \
--with-z=/home/admin/slug-optware-dev/optware/staging/opt \
--with-termcap=/home/admin/slug-optware-dev/optware/staging/opt \
--with-curl=/home/admin/slug-optware-dev/optware/staging/opt \
--with-ogg=/home/admin/slug-optware-dev/optware/staging/opt \
--with-popt=/home/admin/slug-optware-dev/optware/staging/opt \
--with-tds=/home/admin/slug-optware-dev/optware/staging/opt \
--with-sqlite=/home/admin/slug-optware-dev/optware/staging/opt \
--with-postgres=/home/admin/slug-optware-dev/optware/staging/opt \
--with-iksemel=/home/admin/slug-optware-dev/optware/staging/opt \
--with-gnutls=/home/admin/slug-optware-dev/optware/staging/opt \
--with-radius=/home/admin/slug-optware-dev/optware/staging/opt \
--with-odbc=/home/admin/slug-optware-dev/optware/staging/opt \
--with-netsnmp=/home/admin/slug-optware-dev/optware/staging/opt \
--without-imap \
--localstatedir=/opt/var \
--sysconfdir=/opt/etc \
)

...
checking for armv5b-softfloat-linux-pg_config... no
checking for pg_config... /home/admin/slug-optware-dev/optware/staging/opt/bin/pg_config
./configure: line 1: /home/admin/slug-optware-dev/optware/staging/opt/bin/pg_config: cannot execute binary file
./configure: line 1: /home/admin/slug-optware-dev/optware/staging/opt/bin/pg_config: cannot execute binary file
checking for PQexec in -lpq... yes
...

/home/admin/slug-optware-dev/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc -o res_config_pgsql.o -c res_config_pgsql.c -pthread -I/home/admin/slug-optware-dev/optware/builds/asterisk14/include -fsigned-char -I/home/admin/slug-optware-dev/optware/staging/opt/include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -include /home/admin/slug-optware-dev/optware/builds/asterisk14/include/asterisk/autoconfig.h   -O6 -fPIC -DAST_MODULE=\"res_config_pgsql\"  -I
armv5b-softfloat-linux-gcc: argument to `-I' is missing
make[2]: *** [res_config_pgsql.o] Error 1
make[1]: *** [res] Error 2
make[1]: Leaving directory `/home/admin/slug-optware-dev/optware/builds/asterisk14'
make: *** [/home/admin/slug-optware-dev/optware/builds/asterisk14/.built] Error 2


I will upload shortly the config.log file ...


Once again,
Thank you for your effort

By: Ovidiu Sas (ovi) 2007-02-10 11:56:37.000-0600

also, the following patch should be applied for the GSM codec (cross compiling for  powerpc):

$ diff -Naurp asterisk-1.4.0svn-r53634/codecs/gsm/Makefile asterisk14/codecs/gsm/Makefile
--- asterisk-1.4.0svn-r53634/codecs/gsm/Makefile        2007-02-08 15:18:55.000000000 -0500
+++ asterisk14/codecs/gsm/Makefile      2007-02-10 12:50:51.000000000 -0500
@@ -209,7 +209,7 @@ GSM_SOURCES =       $(SRC)/add.c            \
# XXX should merge with GSM_OBJECTS
ifeq ($(OSARCH),linux-gnu)
ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 ))
-ifeq (,$(findstring $(PROC) , arm armv5b armeb ia64 s390 bfin mipsel ))
+ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 s390 bfin mipsel ))
GSM_SOURCES+= $(SRC)/k6opt.s
endif
endif
@@ -261,7 +261,7 @@ GSM_OBJECTS =       $(SRC)/add.o            \

ifeq ($(OSARCH),linux-gnu)
ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
-ifeq (,$(findstring $(PROC) , arm armv5b armeb ia64 bfin mipsel ))
+ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 bfin mipsel ))
GSM_OBJECTS+= $(SRC)/k6opt.o
endif
endif

By: Russell Bryant (russell) 2007-02-16 18:32:20.000-0600

I merged the change to codecs/gsm/Makefile in rev 55050 and 55051.

By: Russell Bryant (russell) 2007-02-16 18:43:08.000-0600

And now, I have fixed the configure script to not act like it found postgres support if there is a problem executing the pg_config application.

By: Ovidiu Sas (ovi) 2007-02-16 22:30:46.000-0600

Hmm ... If we cross compile, we don't want to run the pg_config application b/c it will fail.  While cross compiling we need to check that pg_config is there and skip the execution.

...
checking for linux/soundcard.h... yes
checking for armv5b-softfloat-linux-pg_config... no
checking for pg_config... /home/admin/slug-optware-dev/optware/staging/opt/bin/pg_config
./configure: line 1: /home/admin/slug-optware-dev/optware/staging/opt/bin/pg_config: cannot execute binary file
./configure: line 1: /home/admin/slug-optware-dev/optware/staging/opt/bin/pg_config: cannot execute binary file
configure: ***
configure: *** The PostgreSQL installation on this system appears to be broken.
configure: *** Either correct the installation, or run configure
configure: *** including --without-postgres
make: *** [/home/admin/slug-optware-dev/optware/builds/asterisk14/.configured] Error 1

By: Russell Bryant (russell) 2007-02-17 00:18:55.000-0600

Perhaps you misunderstood the purpose of the pg_config application.  Its purpose in life is to provide information about the installed version of the postgres library so that you can build other applications against it.  A version of pg_config that is not built against for the host system is useless.  The information it provides has to be available at compile time.