I'm trying to cross compile aMule 2.2.6 for ARMEL architecture to use aMule in my
GuruPlug Server+. I'm using
OpenEmbedded (OE) for the dirty work, as it helps automating the compilation process, but I faced several problems:
1.- Libcrypto++ wasn't available for OE. I solved it creating my own recipe to add this library to OE.
2.- OE builds wxbase libs by default without unicode support. Solved editing wxbase config flags in wxbase recipe.
3.- Autotools fails creating the configure script. This is the error OE spits out:
| checking for a BSD-compatible install... /home/doragasu/src/oe/stuff/build/tmp/sysroots/x86_64-linux/usr/bin/install -c
| checking whether build environment is sane... yes
| checking for arm-angstrom-linux-gnueabi-strip... arm-angstrom-linux-gnueabi-strip
| checking for a thread-safe mkdir -p... /home/doragasu/src/oe/stuff/build/tmp/sysroots/x86_64-linux/usr/bin/mkdir -p
| checking for gawk... gawk
| checking whether make sets $(MAKE)... yes
| checking whether to enable maintainer-specific portions of Makefiles... no
| checking build system type... x86_64-pc-linux-gnu
| checking host system type... arm-angstrom-linux-gnueabi
| checking if this is a FreeBSD 4 or earlier system... no
| 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-angstrom-linux-gnueabi-g++ -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb accepts -g... yes
| checking for style of include used by make... GNU
| checking dependency style of arm-angstrom-linux-gnueabi-g++ -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb... gcc3
| checking how to run the C++ preprocessor... arm-angstrom-linux-gnueabi-g++ -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb -E
| checking for arm-angstrom-linux-gnueabi-gcc... arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb
| checking whether we are using the GNU C compiler... yes
| checking whether arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb accepts -g... yes
| checking for arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb option to accept ISO C89... none needed
| checking dependency style of arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb... gcc3
| checking how to run the C preprocessor... arm-angstrom-linux-gnueabi-gcc -E
| checking for x86_64-linux-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 gawk... (cached) gawk
| checking for grep that handles long lines and -e... /bin/grep
| checking for egrep... /bin/grep -E
| checking whether make sets $(MAKE)... (cached) yes
| checking for flex... flex
| checking lex output file root... lex.yy
| checking lex library... -lfl
| checking whether yytext is a pointer... yes
| checking for arm-angstrom-linux-gnueabi-ranlib... arm-angstrom-linux-gnueabi-ranlib
| checking for bison... bison -y
| checking for arm-angstrom-linux-gnueabi-ranlib... (cached) arm-angstrom-linux-gnueabi-ranlib
| checking for arm-angstrom-linux-gnueabi-strip... (cached) arm-angstrom-linux-gnueabi-strip
| checking for arm-angstrom-linux-gnueabi-ar... arm-angstrom-linux-gnueabi-ar
| checking for arm-angstrom-linux-gnueabi-ld... arm-angstrom-linux-gnueabi-ld
| checking for zlib >= 1.1.4... yes (version 1.2.3)
| 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 File::Copy... ok
| checking whether we need the GUI... no
| checking for the --with-toolkit option... will be automatically detected
| checking for the --with-wxshared option... will be automatically detected
| checking for the --with-wxdebug option... will be automatically detected
| checking for the --with-wxversion option... will be automatically detected
| checking for wx-config... /home/doragasu/src/oe/stuff/build/tmp/sysroots/x86_64-linux/usr/bin/armv5te-angstrom-linux-gnueabi/wx-config
| checking for wxWidgets version >= 2.8.0 (--unicode=yes)... yes (version 2.8.9)
| checking for wxWidgets static library... no
| checking if wxWidgets was built in DEBUG mode... no
| checking if wxWidgets was built in STATIC mode... no
| checking which wxWidgets toolkit was selected... base
| checking for arm-angstrom-linux-gnueabi-pkg-config... no
| checking for pkg-config... /home/doragasu/src/oe/stuff/build/tmp/sysroots/x86_64-linux/usr/bin/pkg-config
| configure: WARNING: using cross tools not prefixed with host triplet
| checking pkg-config is at least version 0.9.0... yes
| /home/doragasu/src/oe/stuff/build/tmp/work/armv5te-angstrom-linux-gnueabi/amule-2.2.6-r0/aMule-2.2.6/configure: line 8538: syntax error near unexpected token `{'
| /home/doragasu/src/oe/stuff/build/tmp/work/armv5te-angstrom-linux-gnueabi/amule-2.2.6-r0/aMule-2.2.6/configure: line 8538: `fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result$resultstr" >&5'
| FATAL: oe_runconf failed
NOTE: Task failed: /home/doragasu/src/oe/stuff/build/tmp/work/armv5te-angstrom-linux-gnueabi/amule-2.2.6-r0/temp/log.do_configure.4299
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/doragasu/src/oe/stuff/bbcollections/recipes/amule/amule_2.2.6.bb do_configure failed
ERROR: Task 7 (/home/doragasu/src/oe/stuff/bbcollections/recipes/amule/amule_2.2.6.bb, do_configure) failed
NOTE: Tasks Summary: Attempted 566 tasks of which 566 didn't need to be rerun and 1 failed.
ERROR: '/home/doragasu/src/oe/stuff/bbcollections/recipes/amule/amule_2.2.6.bb' failed
I don't know why but configure script isn't generated properly. I suspect there must be a problem with autotools scripts (the .in files), but as I'm completely noob to autotools I don't know how to fix it. The line in the middle is the one that has the syntax error:
resultstr=" (pkg-config not found)"
fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result$resultstr" >&5
$as_echo "$result$resultstr" >&6; }
libupnp_error="libupnp >= 1.6.6 not found$resultstr"
If I seek that piece of code in the configure script BEFORE autotools are applied by OE, this is how it looks:
resultstr=" (pkg-config not found)"
fi
echo "$as_me:$LINENO: result: $result$resultstr" >&5
echo "${ECHO_T}$result$resultstr" >&6
libupnp_error="libupnp >= 1.6.6 not found$resultstr"
I think I could easily fix this error adding a ';' or a new line before the 'fi', but due to the way OE works, I need the process to be entirely done without interruption, so I need to fix the autotools scripts instead of fixing the created configure script.
Are there any autotools gurus here that can shed some light on this?
Thanks in advance!