[fpc-devel] Building the Android branch
Sven Barth
pascaldragon at googlemail.com
Mon Dec 17 21:45:20 CET 2012
Hello together!
I'm currently testing the Android branch and I've already reached a
problem when trying to build it. I've downloaded the current Android NDK
r8c and then tried to run the following command line:
make all OS_TARGET=android CPU_TARGET=arm
CROSSBINDIR=/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin
BINUTILSPREFIX=arm-linux-androideabi- OPT=-dFPC_ARMEL CROSSOPT="-CpARMv6
-Cfsoft"
This works until the process reaches the CHM package where it wants to
compile chmls. The compiler then returns with a linker error when
executing the following command (reported by fpmake):
/mnt/data/source/fpc/fpc-android/compiler/ppcrossarm -Tandroid
-FEchm/bin/arm-android -FUchm/units/arm-android
-Fu/mnt/data/source/fpc/fpc-android/rtl/units/arm-android
-Fu/mnt/data/source/fpc/fpc-android/packages/fcl-xml/units/arm-android
-Fu/mnt/data/source/fpc/fpc-android/packages/fcl-base/units/arm-android
-Tandroid -Parm -XParm-linux-androideabi- -Xr -Ur -Xs -O2 -n
-Fu/mnt/data/source/fpc/fpc-android/rtl/units/arm-android
-FD/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin
-dFPC_ARMEL -darm -dRELEASE -CpARMv6 -Cfsoft -viq chm/src/chmls.lpr
When I run that command manually from within the packages directory I
get the following output:
=== output begin ===
(1002) Target OS: Android for ARMEL
(3104) Compiling chm/src/chmls.lpr
(9009) Assembling chmls
(9015) Linking chm/bin/arm-android/chmls
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
warning: chm/bin/arm-android/link.res:1:22: ignoring SEARCH_DIR;
SEARCH_DIR is only valid for scripts specified via -T/--script
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
warning: chm/bin/arm-android/link.res:2:67: ignoring SEARCH_DIR;
SEARCH_DIR is only valid for scripts specified via -T/--script
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
warning: chm/bin/arm-android/link.res:3:40: ignoring SEARCH_DIR;
SEARCH_DIR is only valid for scripts specified via -T/--script
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
warning: chm/bin/arm-android/link.res:4:41: ignoring SEARCH_DIR;
SEARCH_DIR is only valid for scripts specified via -T/--script
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
warning: chm/bin/arm-android/link.res:5:54: ignoring SEARCH_DIR;
SEARCH_DIR is only valid for scripts specified via -T/--script
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
warning: chm/bin/arm-android/link.res:47:13: ignoring command OPTION;
OPTION is only valid for scripts specified via -T/--script
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
warning: chm/bin/arm-android/link.res:52:29: ignoring SEARCH_DIR;
SEARCH_DIR is only valid for scripts specified via -T/--script
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
warning: chm/bin/arm-android/link.res:52:50: ignoring SEARCH_DIR;
SEARCH_DIR is only valid for scripts specified via -T/--script
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
warning: chm/bin/arm-android/link.res:52:75: ignoring SEARCH_DIR;
SEARCH_DIR is only valid for scripts specified via -T/--script
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/chmls.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/chmreader.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/chmbase.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/chmsitemap.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-base/units/arm-android/contnrs.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/paslzx.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/chmfiftimain.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/htmlindexer.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/fasthtmlparser.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-base/units/arm-android/avl_tree.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/htmlutil.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find chm/units/arm-android/chmtypes.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-xml/units/arm-android/xmlcfg.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-xml/units/arm-android/dom.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-xml/units/arm-android/xmlread.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-xml/units/arm-android/xmlwrite.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-xml/units/arm-android/xmlutils.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-xml/units/arm-android/dtdmodel.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-base/units/arm-android/uriparser.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-xml/units/arm-android/xmlreader.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
error: cannot find ./fcl-xml/units/arm-android/xmltextreader.o
/mnt/data/downloads/dev/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ld:
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/prt0.o:(.text+0x40):
error: undefined reference to 'PASCALMAIN'
chmls.lpr(629) Error: (9013) Error while linking
chmls.lpr(629) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
=== output end ===
The files mentioned in the output as "not found" do indeed exist.
Just in case the beginning of the generated link.res file looks like this:
=== link.res begin ===
SEARCH_DIR(./chm/src/)
SEARCH_DIR(/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/)
SEARCH_DIR(./fcl-xml/units/arm-android/)
SEARCH_DIR(./fcl-base/units/arm-android/)
SEARCH_DIR(/mnt/data/source/fpc/fpc-android/compiler/)
INPUT(
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/prt0.o
chm/units/arm-android/chmls.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/system.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/objpas.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/classes.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/getopts.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/sysutils.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/types.o
chm/units/arm-android/chmreader.o
chm/units/arm-android/chmbase.o
chm/units/arm-android/chmsitemap.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/typinfo.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/rtlconsts.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/unix.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/errors.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/sysconst.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/unixtype.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/baseunix.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/unixutil.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/syscall.o
./fcl-base/units/arm-android/contnrs.o
chm/units/arm-android/paslzx.o
chm/units/arm-android/chmfiftimain.o
chm/units/arm-android/htmlindexer.o
chm/units/arm-android/fasthtmlparser.o
./fcl-base/units/arm-android/avl_tree.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/math.o
chm/units/arm-android/htmlutil.o
/mnt/data/source/fpc/fpc-android/rtl/units/arm-android/strutils.o
chm/units/arm-android/chmtypes.o
./fcl-xml/units/arm-android/xmlcfg.o
./fcl-xml/units/arm-android/dom.o
./fcl-xml/units/arm-android/xmlread.o
./fcl-xml/units/arm-android/xmlwrite.o
./fcl-xml/units/arm-android/xmlutils.o
./fcl-xml/units/arm-android/dtdmodel.o
./fcl-base/units/arm-android/uriparser.o
./fcl-xml/units/arm-android/xmlreader.o
./fcl-xml/units/arm-android/xmltextreader.o
)
ENTRY(_start)
/* Script for -z combreloc: combine and sort reloc sections */
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm")
OUTPUT_ARCH(arm)
SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
SECTIONS
{
...
=== link.res end ===
Am I doing something wrong here or is the compiler the culprit?
Regards,
Sven
More information about the fpc-devel
mailing list