[fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Nataraj S Narayan
Hi

While trying to compile 'firework.pp' under packages/ncurse, for
arm-linux-uclibcgnueabi-

Since my target SBC dont have libncursesw.so i did a symlink to
libncurses.so.5.6.

Target file system is uclibc based. ppcrossarm is compiled with
arm-linux-uclibcgnueabi-

I am  able to compile on host   execute on target a simple Helloworld.pas.

Using :-
/software/fpc-uclibc/lib/fpc/2.5.1/ppcrossarm  -n -MObjFPC -TLinux
-Parmv5 -gl -Xd -Xs -l -darm  -XParm-linux-uclibcgnueabi- -CfSOFT
-CaEABI -darm -gl -O- -CpARMV5 examples/firework.pp -uUSE_LOCALIZE
firework.pp  -Fu/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/*
-Fl/usr/br-git-rf/usr/lib -FL/usr/br-git-rf/lib/ld-uClibc.so.0


I get the following errors when compiling :-

Free Pascal Compiler version 2.5.1 [2009/10/23] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
/usr/bin/arm-linux-uclibcgnueabi-ld: warning: libc.so.0, needed by
/usr/br-git-rf/usr/lib//libncursesw.so, not found (try using -rpath or
-rpath-link)
/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/cprt0.o: In
function `_start':
(.text+0x4c): undefined reference to `__libc_start_main'
/usr/br-git-rf/usr/lib//libc.a(sigrestorer.os):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr1'
/usr/br-git-rf/usr/lib//libc.a(fread_unlocked.os): In function `fread_unlocked':
fread_unlocked.c:(.text+0x4c): undefined reference to `__aeabi_uidiv'
fread_unlocked.c:(.text+0x130): undefined reference to `__aeabi_uidiv'
/usr/br-git-rf/usr/lib//libc.a(fwrite_unlocked.os): In function
`fwrite_unlocked':
fwrite_unlocked.c:(.text+0x48): undefined reference to `__aeabi_uidiv'
fwrite_unlocked.c:(.text+0x68): undefined reference to `__aeabi_uidiv'
/usr/br-git-rf/usr/lib//libc.a(calloc.os): In function `calloc':
calloc.c:(.text+0x28): undefined reference to `__aeabi_uidiv'
/usr/br-git-rf/usr/lib//libc.a(free.os):(.text+0x2c): more undefined
references to `__aeabi_uidiv' follow
/usr/br-git-rf/usr/lib//libc.a(_stdlib_strto_l.os): In function
`_stdlib_strto_l':
_stdlib_strto_l.c:(.text+0xc8): undefined reference to `__aeabi_uidivmod'
_stdlib_strto_l.c:(.text+0xdc): undefined reference to `__aeabi_uidiv'
/usr/br-git-rf/usr/lib//libc.a(_uintmaxtostr.os): In function `_uintmaxtostr':
_uintmaxtostr.c:(.text+0x58): undefined reference to `__aeabi_uidiv'
_uintmaxtostr.c:(.text+0x68): undefined reference to `__aeabi_uidivmod'
_uintmaxtostr.c:(.text+0x98): undefined reference to `__aeabi_uidivmod'
_uintmaxtostr.c:(.text+0xa8): undefined reference to `__aeabi_uidiv'
_uintmaxtostr.c:(.text+0xb8): undefined reference to `__aeabi_uidivmod'
_uintmaxtostr.c:(.text+0xcc): undefined reference to `__aeabi_uidiv'
_uintmaxtostr.c:(.text+0xe0): undefined reference to `__aeabi_uidiv'
_uintmaxtostr.c:(.text+0xf0): undefined reference to `__aeabi_uidivmod'
_uintmaxtostr.c:(.text+0xfc): undefined reference to `__aeabi_uidivmod'
_uintmaxtostr.c:(.text+0x10c): undefined reference to `__aeabi_uidiv'
/usr/br-git-rf/usr/lib//libc.a(_fpmaxtostr.os): In function `_fpmaxtostr':
_fpmaxtostr.c:(.text+0xe4): undefined reference to `__aeabi_dcmpeq'
_fpmaxtostr.c:(.text+0x108): undefined reference to `__aeabi_dcmpeq'
_fpmaxtostr.c:(.text+0x124): undefined reference to `__aeabi_ddiv'
_fpmaxtostr.c:(.text+0x130): undefined reference to `__aeabi_dcmplt'
_fpmaxtostr.c:(.text+0x1c0): undefined reference to `__aeabi_dcmplt'
_fpmaxtostr.c:(.text+0x1e8): undefined reference to `__aeabi_dmul'
_fpmaxtostr.c:(.text+0x1fc): undefined reference to `__aeabi_dcmpeq'
_fpmaxtostr.c:(.text+0x320): undefined reference to `__aeabi_dcmplt'
_fpmaxtostr.c:(.text+0x350): undefined reference to `__aeabi_dmul'
_fpmaxtostr.c:(.text+0x364): undefined reference to `__aeabi_dcmplt'
_fpmaxtostr.c:(.text+0x384): undefined reference to `__aeabi_ddiv'
_fpmaxtostr.c:(.text+0x398): undefined reference to `__aeabi_dcmpge'
_fpmaxtostr.c:(.text+0x3d8): undefined reference to `__aeabi_dcmpge'
_fpmaxtostr.c:(.text+0x3f4): undefined reference to `__aeabi_ddiv'
_fpmaxtostr.c:(.text+0x414): undefined reference to `__aeabi_d2uiz'
_fpmaxtostr.c:(.text+0x41c): undefined reference to `__aeabi_ui2d'
_fpmaxtostr.c:(.text+0x430): undefined reference to `__aeabi_dsub'
_fpmaxtostr.c:(.text+0x43c): undefined reference to `__aeabi_dmul'
_fpmaxtostr.c:(.text+0x45c): undefined reference to `__aeabi_uidivmod'
_fpmaxtostr.c:(.text+0x478): undefined reference to `__aeabi_uidiv'
_fpmaxtostr.c:(.text+0x868): undefined reference to `__aeabi_idivmod'
_fpmaxtostr.c:(.text+0x87c): undefined reference to `__aeabi_idiv'
/usr/br-git-rf/usr/lib//libc.a(__psfs_do_numeric.os): In function
`__psfs_do_numeric':
__psfs_do_numeric.c:(.text+0x54c): undefined reference to `__aeabi_d2f'
/usr/br-git-rf/usr/lib//libc.a(__strtofpmax.os): In function `__strtofpmax':
__strtofpmax.c:(.text+0x134): undefined reference to `__aeabi_i2d'
__strtofpmax.c:(.text+0x150): undefined reference to `__aeabi_dmul'
__strtofpmax.c:(.text+0x15c): undefined reference to `__aeabi_dadd'
__strtofpmax.c:(.text+0x1f4): undefined reference 

Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Jonas Maebe


On 23 Oct 2009, at 15:55, Nataraj S Narayan wrote:


While trying to compile 'firework.pp' under packages/ncurse, for
arm-linux-uclibcgnueabi-


uclibc support has not been maintained for a long time, so if it works  
you're lucky.



Since my target SBC dont have libncursesw.so i did a symlink to
libncurses.so.5.6.


Is its functionality also in that library?


Target file system is uclibc based. ppcrossarm is compiled with
arm-linux-uclibcgnueabi-

I am  able to compile on host   execute on target a simple  
Helloworld.pas.


Using :-
/software/fpc-uclibc/lib/fpc/2.5.1/ppcrossarm  -n -MObjFPC -TLinux
-Parmv5 -gl -Xd -Xs -l -darm  -XParm-linux-uclibcgnueabi- -CfSOFT
-CaEABI -darm -gl -O- -CpARMV5 examples/firework.pp -uUSE_LOCALIZE
firework.pp  -Fu/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/*
-Fl/usr/br-git-rf/usr/lib -FL/usr/br-git-rf/lib/ld-uClibc.so.0


You should use -XR/usr/br-git-rf (note the uppercase R!) instead of  
the -Fl. That will set the root directory relative to which all  
libraries/object files are searched.



I get the following errors when compiling :-

Free Pascal Compiler version 2.5.1 [2009/10/23] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
/usr/bin/arm-linux-uclibcgnueabi-ld: warning: libc.so.0, needed by
/usr/br-git-rf/usr/lib//libncursesw.so, not found (try using -rpath or
-rpath-link)


That may be solved by the -XR


/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/cprt0.o: In
function `_start':
(.text+0x4c): undefined reference to `__libc_start_main'


That's because of the previous error.


/usr/br-git-rf/usr/lib//libc.a(sigrestorer.os):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr1'
/usr/br-git-rf/usr/lib//libc.a(fread_unlocked.os): In function  
`fread_unlocked':

fread_unlocked.c:(.text+0x4c): undefined reference to `__aeabi_uidiv'
fread_unlocked.c:(.text+0x130): undefined reference to `__aeabi_uidiv'


No idea whether these are part of libc or libgcc. You may also have to  
add {$linklib gcc} to your program and -Fl/path/to/libgcc to your  
command line.



Jonas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] GTK vs GTK2

2009-10-23 Thread Desmond Coertzen
More testing...

I think the problem here is not the speed at which i can splash stuff onto a
canvas (the difference between GTk1 vs GTk2 is very little), but rather the
rate at which the OnPaint events are called with the TCustomControl class
when using with GTk2

There seems to be a delay of at least 16ms between paint events (i measured
18.519ms).

I think the problem might be an indefinite sleep between each fetch from the
event queue, or, the fetch is on a timer and only one event is fetched on
each timer interval instead of flushing the entire queue on each timer
event.

I don't know how the GTK2 implementation in fpc works. I'm only guessing
here.

My FPC version is 2.2.4, target Linux for i386

I have not tried Qt yet.

Anyone with more advice?

On Mon, Oct 19, 2009 at 5:53 PM, Felipe Monteiro de Carvalho 
felipemonteiro.carva...@gmail.com wrote:

 You could try the Qt widgetset too.

 --
 Felipe Monteiro de Carvalho
 ___
 fpc-devel maillist  -  fpc-devel@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-devel

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Nataraj S Narayan
Hi Jonas

-XR dont work for me. Giving

debian:/software/fpc-svn/packages/ncurses/examples#
/software/fpc-uclibc/lib/fpc/2.5.1/ppcrossarm   -MObjFPC -TLinux
-Parmv5 -gl -Xd -Xs -l -darm  -XParm-linux-uclibcgnueabi- -CfSOFT
-CaEABI -darm -gl -O- -CpARMV5 examples/firework.pp -uUSE_LOCALIZE
firework.pp  -Fu/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/*
-FL/usr/br-git-rf/lib/ld-uClibc.so.0 -XR/usr/br-git-rf
Free Pascal Compiler version 2.5.1 [2009/10/23] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
/usr/bin/arm-linux-uclibcgnueabi-ld: cannot find -lncursesw
firework.pp(120,48) Error: Error while linking
firework.pp(120,48) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

regards

Nataraj

On Fri, Oct 23, 2009 at 7:53 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote:

 On 23 Oct 2009, at 15:55, Nataraj S Narayan wrote:

 While trying to compile 'firework.pp' under packages/ncurse, for
 arm-linux-uclibcgnueabi-

 uclibc support has not been maintained for a long time, so if it works
 you're lucky.

 Since my target SBC dont have libncursesw.so i did a symlink to
 libncurses.so.5.6.

 Is its functionality also in that library?

 Target file system is uclibc based. ppcrossarm is compiled with
 arm-linux-uclibcgnueabi-

 I am  able to compile on host   execute on target a simple
 Helloworld.pas.

 Using :-
 /software/fpc-uclibc/lib/fpc/2.5.1/ppcrossarm  -n -MObjFPC -TLinux
 -Parmv5 -gl -Xd -Xs -l -darm  -XParm-linux-uclibcgnueabi- -CfSOFT
 -CaEABI -darm -gl -O- -CpARMV5 examples/firework.pp -uUSE_LOCALIZE
 firework.pp  -Fu/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/*
 -Fl/usr/br-git-rf/usr/lib -FL/usr/br-git-rf/lib/ld-uClibc.so.0

 You should use -XR/usr/br-git-rf (note the uppercase R!) instead of the -Fl.
 That will set the root directory relative to which all libraries/object
 files are searched.

 I get the following errors when compiling :-

 Free Pascal Compiler version 2.5.1 [2009/10/23] for arm
 Copyright (c) 1993-2009 by Florian Klaempfl
 /usr/bin/arm-linux-uclibcgnueabi-ld: warning: libc.so.0, needed by
 /usr/br-git-rf/usr/lib//libncursesw.so, not found (try using -rpath or
 -rpath-link)

 That may be solved by the -XR

 /software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/cprt0.o: In
 function `_start':
 (.text+0x4c): undefined reference to `__libc_start_main'

 That's because of the previous error.

 /usr/br-git-rf/usr/lib//libc.a(sigrestorer.os):(.ARM.exidx+0x0):
 undefined reference to `__aeabi_unwind_cpp_pr1'
 /usr/br-git-rf/usr/lib//libc.a(fread_unlocked.os): In function
 `fread_unlocked':
 fread_unlocked.c:(.text+0x4c): undefined reference to `__aeabi_uidiv'
 fread_unlocked.c:(.text+0x130): undefined reference to `__aeabi_uidiv'

 No idea whether these are part of libc or libgcc. You may also have to add
 {$linklib gcc} to your program and -Fl/path/to/libgcc to your command line.


 Jonas
 ___
 fpc-devel maillist  -  fpc-devel@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-devel

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Jonas Maebe


On 23 Oct 2009, at 16:44, Nataraj S Narayan wrote:


-XR dont work for me. Giving

debian:/software/fpc-svn/packages/ncurses/examples#
/software/fpc-uclibc/lib/fpc/2.5.1/ppcrossarm   -MObjFPC -TLinux
-Parmv5 -gl -Xd -Xs -l -darm  -XParm-linux-uclibcgnueabi- -CfSOFT
-CaEABI -darm -gl -O- -CpARMV5 examples/firework.pp -uUSE_LOCALIZE
firework.pp  -Fu/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/*
-FL/usr/br-git-rf/lib/ld-uClibc.so.0 -XR/usr/br-git-rf
Free Pascal Compiler version 2.5.1 [2009/10/23] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
/usr/bin/arm-linux-uclibcgnueabi-ld: cannot find -lncursesw
firework.pp(120,48) Error: Error while linking
firework.pp(120,48) Fatal: There were 1 errors compiling module,  
stopping

Fatal: Compilation aborted


What does link.res look like if you add -Cn?


Jonas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Nataraj S Narayan
Hi Jonas

Content of link.res:-

SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-passrc/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/dts/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/dbus/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/x11/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-net/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/opengl/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fpgtk/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/modplug/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/utmp/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/mad/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/hash/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/proj4/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/symbolic/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/openssl/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/libxml2/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/httpd22/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-async/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-xml/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/openal/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/libcurl/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-process/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/gtk2/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/libpng/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-fpcunit/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/httpd20/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/oracle/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/aspell/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/sqlite/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/gnome1/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-json/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fv/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/odbc/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/gdbm/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/xforms/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/newt/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/imagemagick/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/pxlib/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fppkg/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/ldap/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/zlib/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/ncurses/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/oggvorbis/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/paszlib/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/users/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/cairo/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-res/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-web/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/pasjpeg/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/postgres/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/lexyacc/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fftw/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-registry/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/ggi/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/ibase/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/bfd/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/pthreads/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/numlib/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/iconvenc/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/sdl/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/uuid/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/pcap/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/libgd/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-extra/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fastcgi/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/imlib/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/syslog/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-db/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/chm/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/a52/)
SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/gmp/)

Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Jonas Maebe


On 23 Oct 2009, at 16:55, Nataraj S Narayan wrote:


Content of link.res:-


Can you try adding

-k--sysroot=usr/br-git-rf

That option will only work if your linker has been configured/compiler  
with --with-sysroot though, which is probably why the compiler doesn't  
specify it by default. It seems -XR support is somewhat incomplete on  
Linux due to this...



Jonas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Nataraj S Narayan
Hi

Getting better!

Yes, filesystem was built using 'buildroot' with toolchain with
--sysroot support.

# /software/fpc-uclibc/lib/fpc/2.5.1/ppcrossarm   -MObjFPC -TLinux
-Parmv5 -gl -Xd -Xs -l -darm  -XParm-linux-uclibcgnueabi- -CfSOFT
-CaEABI -darm -gl -O- -CpARMV5 examples/firework.pp -uUSE_LOCALIZE
firework.pp  -Fu/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/*
-FL/usr/br-git-rf/lib/ld-uClibc.so.0  -XR/usr/br-git-rf/
-k--sysroot=/usr/br-git-rf
Free Pascal Compiler version 2.5.1 [2009/10/23] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
/usr/br-git-rf/usr/lib/libc.a(sigrestorer.os):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr1'
firework.pp(118,48) Error: Error while linking
firework.pp(118,48) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted


regards

Nataraj

On Fri, Oct 23, 2009 at 8:32 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote:

 On 23 Oct 2009, at 16:55, Nataraj S Narayan wrote:

 Content of link.res:-

 Can you try adding

 -k--sysroot=usr/br-git-rf

 That option will only work if your linker has been configured/compiler with
 --with-sysroot though, which is probably why the compiler doesn't specify it
 by default. It seems -XR support is somewhat incomplete on Linux due to
 this...


 Jonas
 ___
 fpc-devel maillist  -  fpc-devel@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-devel

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Jonas Maebe


On 23 Oct 2009, at 17:10, Nataraj S Narayan wrote:


Yes, filesystem was built using 'buildroot' with toolchain with
--sysroot support.

# /software/fpc-uclibc/lib/fpc/2.5.1/ppcrossarm   -MObjFPC -TLinux
-Parmv5 -gl -Xd -Xs -l -darm  -XParm-linux-uclibcgnueabi- -CfSOFT
-CaEABI -darm -gl -O- -CpARMV5 examples/firework.pp -uUSE_LOCALIZE
firework.pp  -Fu/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/*
-FL/usr/br-git-rf/lib/ld-uClibc.so.0  -XR/usr/br-git-rf/
-k--sysroot=/usr/br-git-rf
Free Pascal Compiler version 2.5.1 [2009/10/23] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
/usr/br-git-rf/usr/lib/libc.a(sigrestorer.os):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr1'
firework.pp(118,48) Error: Error while linking
firework.pp(118,48) Fatal: There were 1 errors compiling module,  
stopping

Fatal: Compilation aborted


You'll have to find out in which library this symbol is defined. It's  
probably libgcc or libgcc_eh. In the worst case, you can just run nm  
on all your libraries and look for the one containing this symbol with  
a T in front of it.



Jonas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Micha Nelissen

Nataraj S Narayan wrote:

/usr/bin/arm-linux-uclibcgnueabi-ld: cannot find -lncursesw
firework.pp(120,48) Error: Error while linking


Add -Fl/usr/br-git-rf/lib, -Fl/usr/br-git-rf/usr/lib or whereever 
this library is located?


Micha
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Jonas Maebe


On 23 Oct 2009, at 17:19, Micha Nelissen wrote:


Nataraj S Narayan wrote:

/usr/bin/arm-linux-uclibcgnueabi-ld: cannot find -lncursesw
firework.pp(120,48) Error: Error while linking


Add -Fl/usr/br-git-rf/lib, -Fl/usr/br-git-rf/usr/lib or  
whereever this library is located?


No, -XR/usr/br-git-rf should cause those directories to be searched  
automatically (but apparently doesn't on Linux).



Jonas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ncurses example on arm linux uclibc

2009-10-23 Thread Micha Nelissen

Jonas Maebe wrote:

On 23 Oct 2009, at 17:19, Micha Nelissen wrote:
Add -Fl/usr/br-git-rf/lib, -Fl/usr/br-git-rf/usr/lib or whereever 
this library is located?


No, -XR/usr/br-git-rf should cause those directories to be searched 
automatically (but apparently doesn't on Linux).


I saw them missing in the link.res that's why I suggested it. I've been 
cross compiling to x86 uclibc myself successfully ... somehow ;-)


Micha
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] FPC 64bit and gdb on Linux

2009-10-23 Thread Martin Schreiber
Hi,
 x64 Suse 11.1, the program:

program gdbvarparam;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
uses
 sysutils;
 
procedure test(var par1: integer);
begin
end;

var
 int1: integer;
begin
 int1:= 123;
 test(int1);
end.

The debug session:

m...@linuxmse64:~/proj/testcase/mse/gdbvarparam 
/home/mse/packs/standard/svn/fp/fixes_2_4/compiler/ppcx64 -dsvnfixes_2_4 -gl -B 
-O- 
gdbvarparam.pas
Free Pascal Compiler version 2.3.1 [2009/10/23] for x86_64
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling gdbvarparam.pas
Linking gdbvarparam
16 lines compiled, 0.6 sec
m...@linuxmse64:~/proj/testcase/mse/gdbvarparam gdb ./gdbvarparam
GNU gdb (GDB; openSUSE 11.1) 6.8.50.20081120-cvs
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-suse-linux.
For bug reporting instructions, please see:
http://bugs.opensuse.org/...
(gdb) break test
Function test not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) break main
Breakpoint 1 at 0x4001f9: file gdbvarparam.pas, line 14.
(gdb) break gdbvarparam.pas:8
Breakpoint 2 at 0x4001ec: file gdbvarparam.pas, line 9.
(gdb) run
Starting program: /home/mse/proj/testcase/mse/gdbvarparam/gdbvarparam

Breakpoint 1, main () at gdbvarparam.pas:14
14   int1:= 123;
(gdb) c
Continuing.

Breakpoint 2, TEST (pa...@0x65cb70) at gdbvarparam.pas:9
9   end;
(gdb) print PAR1
$1 = (LONGINT) @0x65cb70
(gdb)
 

Why is it not possible to set a breakpoint to test?
Is it as designed that the displayed value of a var parameter is the address 
instead the value?

Martin
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] FPC 64bit and gdb on Linux

2009-10-23 Thread Jonas Maebe

Martin Schreiber wrote on Fri, 23 Oct 2009:


Why is it not possible to set a breakpoint to test?


You have to use TEST. This is the same for Stabs on 32 bit platforms,  
afaik: you always have to use the uppercase name for setting  
breakpoints on procedures/functions.



Is it as designed that the displayed value of a var parameter is the address
instead the value?


It's because nobody bothered to submit a patch to GDB yet to add  
support for var parameters in their DWARF parser, so we currently  
encode them as C++-style references. That's the way references are  
displayed by GDB.



Jonas


This message was sent using IMP, the Internet Messaging Program.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Want to remove AVL_Tree from DOM

2009-10-23 Thread Sergei Gorelkin

Hello,

I want to remove the avl_tree-related stuff from DOM unit. The reasons are:

1) It is targeted to optimize one particular type of documents, configs,
   that require all node names within a single parent to be unique (strictly
   speaking, this isn't xml, it is more like ini-files or Windows registry).

   For all other xml documents (which have repeating names) it simply doesn't 
work.

2) It is a severe performance and memory bottleneck. This maybe wasn't too 
noticeable
   in the past, but things had improved over time. Here are some numbers:

 - Speed:  here is the sample calltree of TDOMNode_WithChildren.InsertBefore
  (the main DOM tree building procedure):

  650,963  * 
DOM_TDOMNODE_WITHCHILDREN_$__INSERTBEFORE$TDOMNODE$TDOMNODE$$TDOMNODE
   25,890 DOM_TDOMNODE_WITHCHILDREN_$__GETFIRSTCHILD$$TDOMNODE (2589x)
7,671,657 DOM_TDOMNODE_WITHCHILDREN_$__ADDTOCHILDNODETREE$TDOMNODE (8471x)
   76,239 DOM_TDOMNODE_$__CHANGING (8471x)
8 DOM_TDOMDOCUMENT_$__GETNODETYPE$$LONGINT (1x)
   51,616 DOM_TDOMELEMENT_$__GETNODETYPE$$LONGINT (6452x)
   47,056 DOM_TDOMTEXT_$__GETNODETYPE$$LONGINT (5882x)
   36,856 DOM_TDOMATTR_$__GETNODETYPE$$LONGINT (4607x)

As one may see, the avl_tree consumes more than 90% of total CPU time.

 - Memory (numbers are for i386-linux):

TDOMAttr.InstanceSize = 56
TDOMElement.InstanceSize = 60
TDOMText.InstanceSize = 32

TAVLTree.InstanceSize = 20
TAVLTreeNode.InstanceSize = 24

Since each textnode has an associated TAVLTreeNode, and each Element/Attribute has both TAVLTreeNode 
and TAVLTree, the overall memory usage grows by about 75%.


3) It is known to have yet unresolved multithreading-related problems (Mantis 
12984).


Given the above, I see no sense in further keeping this feature. However, the 
configs likely
need some sort of optimization anyway. I see the following options:

1) Since all names in DOM document are now stored in a hashtable, it is easy to 
modify
   FindNode() so it compares pointers rather than strings.

2) The new xmlconf unit has the OpenKey/CloseKey methods which improve 
performance by limiting
   the search range to a specific element. Utilizing this feature, however, 
need modifications to
   the user code so it actually calls OpenKey/CloseKey (note that is works 
perfectly without the
   modifications, it's only the matter of performance).

3) It is possible to create even faster xmlconfig class, consisting of 
TXMLDocument + THashTable,
   offering O(1) access to any element. The problem is that it is somewhat 
mutually exclusive
   to the previous solution (OpenKey/CloseKey).

4) Finally, the xpath, being sufficiently mature, can supersede it all and 
provide
   a much more powerful solution.

Well... Thank you for reading this long message :-). I'd be happy to hear 
other's comment on it.


Regards,
Sergei
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel