Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-02

FPC for Scratchbox-ARM (compiling with errors)

15 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jose Pascual

Hi EveryOne,

I'm tryng to compiling fpc compiler and units under scratchbox for ARM

I have crosscompile, with fpcarm in linux i386, fpcmake and pp for ARM, I have copy to scratchbox system

and I have used both program to generate a complete build in scratchbox using

# export FPC=pp
# make CPU_TARGET=arm OS_TARGET=linux build

but it's fail in math.pp compiling (division by zero error)

.
.
.
/trabajo/temp/pp -Ur -Ur -Xs -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/trabajo/fpcbuild_2.0.4_exp/fpcsrc/rtl/units/arm-linux -darm -dRELEASE -Sg ../objpas/typinfo.pp
/trabajo/temp/pp -Ur -Ur -Xs -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/trabajo/fpcbuild_2.0.4_exp/fpcsrc/rtl/units/arm-linux -darm -dRELEASE ../objpas/math.pp
math.pp(125,22) Fatal: Compilation aborted
An unhandled exception occurred at $B7F0DC04 :
EInvalidOp : Invalid floating point operation
$B7F0DC04
$00087A00
$00087BAC
$0013E458
$0014BF1C
$0014C4C0
$000FBD4C
$000F5F14
$000781A4
$00032BC8
$00008368

make[8]: *** [math.ppu] Error 217
.
.
.

any suggestion to resolve it?

Jose Pascual

Reply by email

Daniël Mantione
to Jose Pascual

Op Tue, 20 Feb 2007, schreef Jose Pascual:

Show quoted text 14 lines
Hi EveryOne, I'm tryng to compiling fpc compiler and units under scratchbox for ARM I have crosscompile, with fpcarm in linux i386, fpcmake and pp for ARM, I have copy to scratchbox system and I have used both program to generate a complete build in scratchbox using # export FPC=pp # make CPU_TARGET=arm OS_TARGET=linux build but it's fail in math.pp compiling (division by zero error)

Is /trabajo/temp/pp still an i386 compiler? What compiler version is it?

A possible solution could be to cycle an i386 compiler first (include debug info with -g in case it'll have the same problem), and use that as bootstrap compiler.

Daniël

Show quoted text 38 lines
/trabajo/temp/pp -Ur -Ur -Xs -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/trabajo/fpcbuild_2.0.4_exp/fpcsrc/rtl/units/arm-linux -darm -dRELEASE -Sg ../objpas/typinfo.pp /trabajo/temp/pp -Ur -Ur -Xs -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/trabajo/fpcbuild_2.0.4_exp/fpcsrc/rtl/units/arm-linux -darm -dRELEASE ../objpas/math.pp math.pp(125,22) Fatal: Compilation aborted An unhandled exception occurred at $B7F0DC04 : EInvalidOp : Invalid floating point operation $B7F0DC04 $00087A00 $00087BAC $0013E458 $0014BF1C $0014C4C0 $000FBD4C $000F5F14 $000781A4 $00032BC8 $00008368 make[8]: *** [math.ppu] Error 217 . . . any suggestion to resolve it? Jose Pascual _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Jose Pascual
to Daniël Mantione
Show quoted text 18 lines
> Hi EveryOne, > > I'm tryng to compiling fpc compiler and units under scratchbox for ARM > > I have crosscompile, with fpcarm in linux i386, fpcmake and pp for > ARM, I have copy to scratchbox system > > and I have used both program to generate a complete build in > scratchbox using > > # export FPC=pp > # make CPU_TARGET=arm OS_TARGET=linux build > > but it's fail in math.pp compiling (division by zero error) Is /trabajo/temp/pp still an i386 compiler? What compiler version is it?

/trabajo/temp/pp is a ARM binary. version is 2.0.4

#/trabajo/temp/pp
Free Pascal Compiler version 2.0.4 [2007/02/19] for arm Copyright (c) 1993-2006 by Florian Klaempfl
.
.
.

#readelf -h /trabajo/temp/pp
ELF Header:
Magic: 7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00 Class: ELF32
Data: 2's complement, little endian Version: 1 (current)
OS/ABI: ARM
ABI Version: 0
Type: EXEC (Executable file) Machine: ARM
Version: 0x1
Entry point address: 0x80c0
Start of program headers: 52 (bytes into file) Start of section headers: 1880176 (bytes into file) Flags: 0x2, has entry point, GNU EABI Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 3
Size of section headers: 40 (bytes)
Number of section headers: 7
Section header string table index: 6

A possible solution could be to cycle an i386 compiler first (include debug info with -g in case it'll have the same problem), and use that as bootstrap compiler.

But I'm going to geneate i386 binary compiler and tools so I can't to execute in scratchbox.

I think your suggestion is useful to generate precompiled units in i386 linux, but I'd like to build all fpc
inside sratchbox using arm binary compiler and tools, a arm not-crosscompiling fpc system.

Jose Pascual.

Show quoted text 47 lines
Daniël > /trabajo/temp/pp -Ur -Ur -Xs -n -Fi../inc -Fi../arm -Fi../unix - Fiarm -FE. > -FU/trabajo/fpcbuild_2.0.4_exp/fpcsrc/rtl/units/arm-linux -darm > -dRELEASE -Sg ../objpas/typinfo.pp /trabajo/temp/pp -Ur -Ur -Xs -n > -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. > -FU/trabajo/fpcbuild_2.0.4_exp/fpcsrc/rtl/units/arm-linux -darm > -dRELEASE ../objpas/math.pp > math.pp(125,22) Fatal: Compilation aborted An unhandled exception > occurred at $B7F0DC04 : > EInvalidOp : Invalid floating point operation > $B7F0DC04 > $00087A00 > $00087BAC > $0013E458 > $0014BF1C > $0014C4C0 > $000FBD4C > $000F5F14 > $000781A4 > $00032BC8 > $00008368 > > make[8]: *** [math.ppu] Error 217 > . > . > . > > > any suggestion to resolve it? > > > Jose Pascual > > > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > __________ Información de NOD32, revisión 2071 (20070220) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email

Daniël Mantione
to Jose Pascual

Op Tue, 20 Feb 2007, schreef Jose Pascual:

Show quoted text 6 lines
/trabajo/temp/pp is a ARM binary. version is 2.0.4 #/trabajo/temp/pp Free Pascal Compiler version 2.0.4 [2007/02/19] for arm Copyright (c) 1993-2006 by Florian Klaempfl .

That is then the problem. You cannot cycle on ARM with a 2.0 compiler. With recent 2.1 this is possible.

Show quoted text 11 lines
> A possible solution could be to cycle an i386 compiler first (include > debug info with -g in case it'll have the same problem), and use that > as bootstrap compiler. But I'm going to geneate i386 binary compiler and tools so I can't to execute in scratchbox. I think your suggestion is useful to generate precompiled units in i386 linux, but I'd like to build all fpc inside sratchbox using arm binary compiler and tools, a arm not-crosscompiling fpc system.

I recommend 2.1 for that, 2.0 is not realiable enough on ARM for that. Just to be clear: 2.1 needs to be bootstrapped with a 2.0 compiler, so you need to start with a 2.0, then bootstrap a 2.1 crosscompiler for ARM, and use that to bootstrap a native ARM compiler.

Daniël

Reply by email

Florian Klaempfl
to Daniël Mantione
Show quoted text 28 lines
Op Tue, 20 Feb 2007, schreef Jose Pascual: > /trabajo/temp/pp is a ARM binary. version is 2.0.4 > > #/trabajo/temp/pp > Free Pascal Compiler version 2.0.4 [2007/02/19] for arm > Copyright (c) 1993-2006 by Florian Klaempfl > . That is then the problem. You cannot cycle on ARM with a 2.0 compiler. With recent 2.1 this is possible. >> A possible solution could be to cycle an i386 compiler first (include >> debug info with -g in case it'll have the same problem), and use that >> as bootstrap compiler. > But I'm going to geneate i386 binary compiler and tools so I can't to > execute in scratchbox. > > I think your suggestion is useful to generate precompiled units in i386 > linux, but I'd like to build all fpc > inside sratchbox using arm binary compiler and tools, a arm > not-crosscompiling fpc system. I recommend 2.1 for that, 2.0 is not realiable enough on ARM for that. Just to be clear: 2.1 needs to be bootstrapped with a 2.0 compiler, so you need to start with a 2.0, then bootstrap a 2.1 crosscompiler for ARM, and use that to bootstrap a native ARM compiler.

The 2.1.x compiler has also a problem:
make all doesn't work, only
make all OPT=-O- -Ooregvar

I tried to debug it for several hours but I didn't find what's wrong :(

Reply by email

Jose Pascual
to Florian Klaempfl
Show quoted text 48 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Florian Klaempfl Enviado el: martes, 20 de febrero de 2007 13:19 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] FPC for Scratchbox-ARM (compiling with errors) Daniël Mantione schrieb: > > Op Tue, 20 Feb 2007, schreef Jose Pascual: > >> /trabajo/temp/pp is a ARM binary. version is 2.0.4 >> >> #/trabajo/temp/pp >> Free Pascal Compiler version 2.0.4 [2007/02/19] for arm >> Copyright (c) 1993-2006 by Florian Klaempfl >> . > > That is then the problem. You cannot cycle on ARM with a 2.0 compiler. > With recent 2.1 this is possible. > >>> A possible solution could be to cycle an i386 compiler first (include >>> debug info with -g in case it'll have the same problem), and use that >>> as bootstrap compiler. >> But I'm going to geneate i386 binary compiler and tools so I can't to >> execute in scratchbox. >> >> I think your suggestion is useful to generate precompiled units in i386 >> linux, but I'd like to build all fpc >> inside sratchbox using arm binary compiler and tools, a arm >> not-crosscompiling fpc system. > > I recommend 2.1 for that, 2.0 is not realiable enough on ARM for that. > Just to be clear: 2.1 needs to be bootstrapped with a 2.0 compiler, so you > need to start with a 2.0, then bootstrap a 2.1 crosscompiler for ARM, and > use that to bootstrap a native ARM compiler. The 2.1.x compiler has also a problem: make all doesn't work, only make all OPT=-O- -Ooregvar

I have tried again in scratchbox for ARM, using ppcarm 2.1.1 native for ARM (generated in a crosscompiling in linux i386), using:

make CPU_TARGET=arm OS_TARGET=linux PP=/trabajo/temp/ppcarm OPT="-O- -Ooregvar" all

.
.
.
/trabajo/fpcbuild_2.1.1/fpcsrc/compiler/ppcarm -Ur -Xs -O2 -n -Fulnet -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/rtl/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/hash/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/paszlib/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/netdb/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/libasync/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/pthreads/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/fcl/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/fpmake -Fu/trabajo/fpcbuild_2.1.1/fpcsrc
-Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/pasjpeg/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/ibase/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/postgres/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/mysql/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/odbc/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/oracle/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/sqlite/units/arm-linux -Filnet/sys -FE. -FUunits/arm-linux
-Fl/scratchbox/compilers/arm-linux-ct401-2.3/bin/../lib/gcc/arm-unknown-linu x-gnu/4.0.1 -Fl/usr/local/lib -Fl/usr/X11R6/lib -Fl/usr/lib -Fl/lib -O- -Ooregvar -darm -dRELEASE pkglnet.pp
/trabajo/fpcbuild_2.1.1/fpcsrc/compiler/ppcarm -Ur -Xs -O2 -n -Fulnet -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/rtl/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/hash/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/paszlib/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/netdb/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/libasync/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/pthreads/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/fcl/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/fpmake -Fu/trabajo/fpcbuild_2.1.1/fpcsrc
-Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/pasjpeg/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/ibase/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/postgres/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/mysql/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/odbc/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/oracle/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/sqlite/units/arm-linux -Filnet/sys -FE. -FUunits/arm-linux
-Fl/scratchbox/compilers/arm-linux-ct401-2.3/bin/../lib/gcc/arm-unknown-linu x-gnu/4.0.1 -Fl/usr/local/lib -Fl/usr/X11R6/lib -Fl/usr/lib -Fl/lib -O- -Ooregvar -darm -dRELEASE pkglibcurl.pp
pkglibcurl.pp(19,64) Fatal: Can't find unit libcurl Fatal: Compilation aborted
make[4]: *** [pkglibcurl.ppu] Error 1
make[4]: Leaving directory `/trabajo/fpcbuild_2.1.1/fpcsrc/utils/fppkg' make[3]: *** [fppkg_all] Error 2
make[3]: Leaving directory `/trabajo/fpcbuild_2.1.1/fpcsrc/utils' make[2]: *** [utils_all] Error 2
make[2]: Leaving directory `/trabajo/fpcbuild_2.1.1/fpcsrc' make[1]: *** [build-stamp.arm-linux] Error 2
make[1]: Leaving directory `/trabajo/fpcbuild_2.1.1/fpcsrc' make: *** [fpcsrc/build-stamp.arm-linux] Error 2
.
.
.

I think in Makefile was missing to add
-Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/extra/libcurl/units/arm-linux/

and perhaps some other -Fu?

Show quoted text 9 lines
I tried to debug it for several hours but I didn't find what's wrong :( _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal __________ Información de NOD32, revisión 2072 (20070220) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email

Jose Pascual
to Jose Pascual
Show quoted text 87 lines
> > use that to bootstrap a native ARM compiler. > > The 2.1.x compiler has also a problem: > make all doesn't work, only > make all OPT=-O- -Ooregvar I have tried again in scratchbox for ARM, using ppcarm 2.1.1 native for ARM (generated in a crosscompiling in linux i386), using: make CPU_TARGET=arm OS_TARGET=linux PP=/trabajo/temp/ppcarm OPT="-O- -Ooregvar" all . . . /trabajo/fpcbuild_2.1.1/fpcsrc/compiler/ppcarm -Ur -Xs -O2 -n -Fulnet -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/rtl/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/hash/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/paszlib/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/netdb/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/libasync/units/arm- linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/pthreads/units/arm- linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/fcl/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/fpmake -Fu/trabajo/fpcbuild_2.1.1/fpcsrc -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/pasjpeg/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/ibase/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/postgres/units/arm- linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/mysql/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/odbc/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/oracle/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/sqlite/units/arm-linux -Filnet/sys -FE. -FUunits/arm-linux -Fl/scratchbox/compilers/arm-linux-ct401-2.3/bin/../lib/gcc/arm- unknown-linu x-gnu/4.0.1 -Fl/usr/local/lib -Fl/usr/X11R6/lib -Fl/usr/lib -Fl/lib -O- -Ooregvar -darm -dRELEASE pkglnet.pp /trabajo/fpcbuild_2.1.1/fpcsrc/compiler/ppcarm -Ur -Xs -O2 -n -Fulnet -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/rtl/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/hash/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/paszlib/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/netdb/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/libasync/units/arm- linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/pthreads/units/arm- linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/fcl/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/fpmake -Fu/trabajo/fpcbuild_2.1.1/fpcsrc -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/pasjpeg/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/ibase/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/postgres/units/arm- linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/mysql/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/odbc/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/oracle/units/arm-linux -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/base/sqlite/units/arm-linux -Filnet/sys -FE. -FUunits/arm-linux -Fl/scratchbox/compilers/arm-linux-ct401-2.3/bin/../lib/gcc/arm- unknown-linu x-gnu/4.0.1 -Fl/usr/local/lib -Fl/usr/X11R6/lib -Fl/usr/lib -Fl/lib -O- -Ooregvar -darm -dRELEASE pkglibcurl.pp pkglibcurl.pp(19,64) Fatal: Can't find unit libcurl Fatal: Compilation aborted make[4]: *** [pkglibcurl.ppu] Error 1 make[4]: Leaving directory `/trabajo/fpcbuild_2.1.1/fpcsrc/utils/fppkg' make[3]: *** [fppkg_all] Error 2 make[3]: Leaving directory `/trabajo/fpcbuild_2.1.1/fpcsrc/utils' make[2]: *** [utils_all] Error 2 make[2]: Leaving directory `/trabajo/fpcbuild_2.1.1/fpcsrc' make[1]: *** [build-stamp.arm-linux] Error 2 make[1]: Leaving directory `/trabajo/fpcbuild_2.1.1/fpcsrc' make: *** [fpcsrc/build-stamp.arm-linux] Error 2 . . . I think in Makefile was missing to add -Fu/trabajo/fpcbuild_2.1.1/fpcsrc/packages/extra/libcurl/units/arm- linux/ and perhaps some other -Fu?

I have made some change in Makefile and I CAN compiling fpc in scratchbox-ARM,

but trying my first example and It's has failed:
.
.
Assembling test1
Linking test1
/usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc':
: undefined reference to `_fini'
/usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc':
: undefined reference to `_init'
test1.pas(28) Error: Error while linking
test1.pas(28) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
.
.

what's wrong?

Assembling iaeibserver
Linking iaeibserver
/usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc':
: undefined reference to `_fini'
/usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc':
: undefined reference to `_init'
iaeibserver.dpr(28) Error: Error while linking
iaeibserver.dpr(28) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted

Show quoted text 20 lines
> I tried to debug it for several hours but I didn't find what's wrong :( > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > __________ Información de NOD32, revisión 2072 (20070220) __________ > > Este mensaje ha sido analizado con NOD32 antivirus system > http://www.nod32.com _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal __________ Información de NOD32, revisión 2072 (20070220) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email

Daniël Mantione
to Jose Pascual

Op Wed, 21 Feb 2007, schreef Jose Pascual:

Show quoted text 15 lines
Assembling test1 Linking test1 /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc': : undefined reference to `_fini' /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc': : undefined reference to `_init' test1.pas(28) Error: Error while linking test1.pas(28) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted . . what's wrong?

Libc. Your libc is different than what the cprt0 startup code expects. Try a pure Pascal program.

Daniël

Reply by email

Jose Pascual
to Daniël Mantione
Show quoted text 29 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Daniël Mantione Enviado el: miércoles, 21 de febrero de 2007 14:10 Para: FPC-Pascal users discussions Asunto: RE: [fpc-pascal] FPC for Scratchbox-ARM (compiling with errors) Op Wed, 21 Feb 2007, schreef Jose Pascual: > Assembling test1 > Linking test1 > /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function > `_haltproc': > : undefined reference to `_fini' > /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function > `_haltproc': > : undefined reference to `_init' > test1.pas(28) Error: Error while linking > test1.pas(28) Fatal: There were 1 errors compiling module, stopping > Fatal: Compilation aborted > . > . > > what's wrong? Libc. Your libc is different than what the cprt0 startup code expects. Try a pure Pascal program.

yes, pure pascal program build but how can I resolve with libc problem (i need libc)?

thanks

Show quoted text 6 lines
Daniël __________ Información de NOD32, revisión 2072 (20070220) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email

Daniël Mantione
to Jose Pascual

Op Wed, 21 Feb 2007, schreef Jose Pascual:

Show quoted text 32 lines
> -----Mensaje original----- > De: [mailto:fpc-pascal- > En nombre de Daniël Mantione > Enviado el: miércoles, 21 de febrero de 2007 14:10 > Para: FPC-Pascal users discussions > Asunto: RE: [fpc-pascal] FPC for Scratchbox-ARM (compiling with errors) > > > > Op Wed, 21 Feb 2007, schreef Jose Pascual: > > > Assembling test1 > > Linking test1 > > /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function > > `_haltproc': > > : undefined reference to `_fini' > > /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function > > `_haltproc': > > : undefined reference to `_init' > > test1.pas(28) Error: Error while linking > > test1.pas(28) Fatal: There were 1 errors compiling module, stopping > > Fatal: Compilation aborted > > . > > . > > > > what's wrong? > > Libc. Your libc is different than what the cprt0 startup code expects. > Try a pure Pascal program. yes, pure pascal program build but how can I resolve with libc problem (i need libc)?

What libc does scratchbox use? If it is uclibc you might need to modify cprt0

Daniël

Reply by email

Jose Pascual
to Daniël Mantione
Show quoted text 28 lines
> > > > > Assembling test1 > > > Linking test1 > > > /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function > > > `_haltproc': > > > : undefined reference to `_fini' > > > /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function > > > `_haltproc': > > > : undefined reference to `_init' > > > test1.pas(28) Error: Error while linking > > > test1.pas(28) Fatal: There were 1 errors compiling module, > > > stopping > > > Fatal: Compilation aborted > > > . > > > . > > > > > > what's wrong? > > > > Libc. Your libc is different than what the cprt0 startup code expects. > > Try a pure Pascal program. > > yes, pure pascal program build but how can I resolve with libc problem > (i need libc)? What libc does scratchbox use? If it is uclibc you might need to modify cprt0

I'm using glibc (v2.3.2), I have resolved problem I have a mistake in configuration for /etc/fpc.cfg

right now, I'm build more complex program with units and libc with fpc but it does not run,

I have debugged it with gdb in real ARM target and Program does not arrive to my first line of pascal (after begin).

this is the gdb message:

Program received signal SIGSEGV, Segmentation fault. 0x40094018 in _IO_file_xsputn () from /lib/libc.so.6

any idea about this problem? (perhaps 2.1.1 snapshot?)

regards
Jose Pascual

Show quoted text 6 lines
Daniël __________ Información de NOD32, revisión 2073 (20070221) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email

Jose Pascual
to Jose Pascual
Show quoted text 49 lines
> > > > > > > Assembling test1 > > > > Linking test1 > > > > /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function > > > > `_haltproc': > > > > : undefined reference to `_fini' > > > > /usr/local/lib/fpc/2.1.1/units/arm-linux/rtl/cprt0.o: In function > > > > `_haltproc': > > > > : undefined reference to `_init' > > > > test1.pas(28) Error: Error while linking > > > > test1.pas(28) Fatal: There were 1 errors compiling module, > > > > stopping > > > > Fatal: Compilation aborted > > > > . > > > > . > > > > > > > > what's wrong? > > > > > > Libc. Your libc is different than what the cprt0 startup code > expects. > > > Try a pure Pascal program. > > > > yes, pure pascal program build but how can I resolve with libc > problem > > (i need libc)? > > What libc does scratchbox use? If it is uclibc you might need to modify > cprt0 I'm using glibc (v2.3.2), I have resolved problem I have a mistake in configuration for /etc/fpc.cfg right now, I'm build more complex program with units and libc with fpc but it does not run, I have debugged it with gdb in real ARM target and Program does not arrive to my first line of pascal (after begin). this is the gdb message: Program received signal SIGSEGV, Segmentation fault. 0x40094018 in _IO_file_xsputn () from /lib/libc.so.6 any idea about this problem? (perhaps 2.1.1 snapshot?)

any idea or suggestion?

Show quoted text 20 lines
regards Jose Pascual > Daniël > > __________ Información de NOD32, revisión 2073 (20070221) __________ > > Este mensaje ha sido analizado con NOD32 antivirus system > http://www.nod32.com _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal __________ Información de NOD32, revisión 2073 (20070221) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email

Daniël Mantione
to Jose Pascual

Op Fri, 23 Feb 2007, schreef Jose Pascual:

Show quoted text 7 lines
> Program received signal SIGSEGV, Segmentation fault. > 0x40094018 in _IO_file_xsputn () from /lib/libc.so.6 > > any idea about this problem? (perhaps 2.1.1 snapshot?) any idea or suggestion?

Your C code crashes. That is not something we can help with, you have to debug it.

Daniël

Reply by email

Jose Pascual
to Daniël Mantione
Show quoted text 21 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Daniël Mantione Enviado el: viernes, 23 de febrero de 2007 9:51 Para: FPC-Pascal users discussions Asunto: RE: [fpc-pascal] FPC for Scratchbox-ARM (compiling with errors) Op Fri, 23 Feb 2007, schreef Jose Pascual: > > Program received signal SIGSEGV, Segmentation fault. > > 0x40094018 in _IO_file_xsputn () from /lib/libc.so.6 > > > > any idea about this problem? (perhaps 2.1.1 snapshot?) > > > any idea or suggestion? Your C code crashes. That is not something we can help with, you have to debug it.

but I have no C code in my test program only pascal. So It seems be something in startup c generate for fpc

Jose Pascual

Show quoted text 6 lines
Daniël __________ Información de NOD32, revisión 2076 (20070222) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com

Reply by email

Daniël Mantione
to Jose Pascual

Op Fri, 23 Feb 2007, schreef Jose Pascual:

Show quoted text 15 lines
> -----Mensaje original----- > De: [mailto:fpc-pascal- > En nombre de Daniël Mantione > Enviado el: viernes, 23 de febrero de 2007 9:51 > Para: FPC-Pascal users discussions > Asunto: RE: [fpc-pascal] FPC for Scratchbox-ARM (compiling with errors) > > > > Your C code crashes. That is not something we can help with, you have > to debug it. but I have no C code in my test program only pascal. So It seems be something in startup c generate for fpc

Well, xsputn writes characters to a file. We never use any C code to write data to files, let alone write during startup, so there must be some C code that gets called somewhere.

Perhaps the C library wants to write some message due to incorrect startup?

Daniël Mantione

Reply by email