Sign in Join

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

Mailing lists / fpc-devel / 2009-10

ncurses example on arm linux uclibc

18 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

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 to `__aeabi_i2d' __strtofpmax.c:(.text+0x200): undefined reference to `__aeabi_ddiv' __strtofpmax.c:(.text+0x36c): undefined reference to `__aeabi_dcmpeq' __strtofpmax.c:(.text+0x3a4): undefined reference to `__aeabi_ddiv' __strtofpmax.c:(.text+0x3ac): undefined reference to `__aeabi_dmul' __strtofpmax.c:(.text+0x3c8): undefined reference to `__aeabi_dmul' __strtofpmax.c:(.text+0x3f0): undefined reference to `__aeabi_dmul' __strtofpmax.c:(.text+0x404): undefined reference to `__aeabi_dcmpeq' /usr/br-git-rf/usr/lib//libncursesw.so: undefined reference to `__aeabi_f2d' 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

Reply by email

Jonas Maebe
to Nataraj S Narayan
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?

Show quoted text 12 lines
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.

Show quoted text 7 lines
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.

Show quoted text 6 lines
/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

Reply by email

Nataraj S Narayan
to Jonas Maebe

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

Jonas Maebe wrote 63 lines
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 - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to Nataraj S Narayan
Nataraj S Narayan wrote 15 lines
-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

Reply by email

Nataraj S Narayan
to Jonas Maebe

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/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-image/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fpmkunit/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/tcl/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/gdbint/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rsvg/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/regexpr/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/graph/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/svgalib/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/cdrom/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/httpd13/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/mysql/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/fcl-base/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/gtk1/) SEARCH_DIR(/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/unzip/) SEARCH_DIR(/usr/local/lib/fpc/2.5.1/units/arm-linux/rtl/) SEARCH_DIR(/home/nataraj/software/fpc-uclibc/lib/fpc/2.5.1/) INPUT(
/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/ucprt0.o firework.o
/software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/system.o /software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/lineinfo.o /software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/exeinfo.o /software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/strings.o /software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/rtl/objpas.o /software/fpc-uclibc/lib/fpc/2.5.1/units/arm-linux/ncurses/ncurses.o )
INPUT(
-lgcc
-lncursesw
)
GROUP(
-lc
)
ENTRY(_start)
/* Script for -z combreloc: combine and sort reloc sections */ OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SECTIONS
{
/* Read-only sections, merged into text segment: */

  PROVIDE (__executable_start = 0x8000); . = 0x8000 + SIZEOF_HEADERS;
  .interp         : { *(.interp) }
  .note.gnu.build-id : { *(.note.gnu.build-id) }
  .hash           : { *(.hash) }
  .gnu.hash       : { *(.gnu.hash) }
  .dynsym         : { *(.dynsym) }
  .dynstr         : { *(.dynstr) }
  .gnu.version    : { *(.gnu.version) }
  .gnu.version_d  : { *(.gnu.version_d) }
  .gnu.version_r  : { *(.gnu.version_r) }
  .rel.dyn        :
    {
      *(.rel.init)
      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
      *(.rel.fini)
      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
      *(.rel.ctors)
      *(.rel.dtors)
      *(.rel.got)
      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
    }
  .rela.dyn       :
    {
      *(.rela.init)
      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
      *(.rela.fini)
      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
      *(.rela.ctors)
      *(.rela.dtors)
      *(.rela.got)
      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
    }
  .rel.plt        : { *(.rel.plt) }
  .rela.plt       : { *(.rela.plt) }
  .init           :
  {
    KEEP (*(.init))
  } =0
  .plt            : { *(.plt) }
  .text           :
  {
    *(.text .stub .text.* .gnu.linkonce.t.*)
    KEEP (*(.text.*personality*))
    /* .gnu.warning sections are handled specially by elf32.em.  */
    *(.gnu.warning)
    *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
  } =0
  .fini           :
  {
    KEEP (*(.fini))
  } =0
  PROVIDE (__etext = .);
  PROVIDE (_etext = .);
  PROVIDE (etext = .);
  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
  .rodata1        : { *(.rodata1) }
  .ARM.extab   : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
   __exidx_start = .;
  .ARM.exidx   : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
   __exidx_end = .;
  .eh_frame_hdr : { *(.eh_frame_hdr) }
  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
  /* Adjust the address for the data segment.  We want to adjust up to
     the same address within the page on the next page up.  */
  . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1));
  /* Exception handling  */
  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
  /* Thread Local Storage sections  */
  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  .preinit_array     :
  {
    PROVIDE_HIDDEN (__preinit_array_start = .);
    KEEP (*(.preinit_array))
    PROVIDE_HIDDEN (__preinit_array_end = .);
  }
  .init_array     :
  {
     PROVIDE_HIDDEN (__init_array_start = .);
     KEEP (*(SORT(.init_array.*)))
     KEEP (*(.init_array))
     PROVIDE_HIDDEN (__init_array_end = .);
  }
  .fini_array     :
  {
    PROVIDE_HIDDEN (__fini_array_start = .);
    KEEP (*(.fini_array))
    KEEP (*(SORT(.fini_array.*)))
    PROVIDE_HIDDEN (__fini_array_end = .);
  }
  .ctors          :
  {
    /* gcc uses crtbegin.o to find the start of
       the constructors, so we make sure it is
       first.  Because this is a wildcard, it
       doesn't matter if the user does not
       actually link against crtbegin.o; the
       linker won't look for a file to match a
       wildcard.  The wildcard also means that it
       doesn't matter which directory crtbegin.o
       is in.  */
    KEEP (*crtbegin.o(.ctors))
    KEEP (*crtbegin?.o(.ctors))
    /* We don't want to include the .ctor section from
       the crtend.o file until after the sorted ctors.
       The .ctor section from the crtend file contains the
       end of ctors marker and it must be last */
    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
    KEEP (*(SORT(.ctors.*)))
    KEEP (*(.ctors))
  }
  .dtors          :
  {
    KEEP (*crtbegin.o(.dtors))
    KEEP (*crtbegin?.o(.dtors))
    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
    KEEP (*(SORT(.dtors.*)))
    KEEP (*(.dtors))
  }
  .jcr            : { KEEP (*(.jcr)) }
  .data.rel.ro : { *(.data.rel.ro.local*

.gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro*
.gnu.linkonce.d.rel.ro.*) }
.dynamic : { *(.dynamic) }
.got : { *(.got.plt) *(.got) }
.data :
{

    __data_start = . ;
    *(.data .data.* .gnu.linkonce.d.*)
    KEEP (*(.fpc .fpc.n_version .fpc.n_links))
    KEEP (*(.gnu.linkonce.d.*personality*))
    SORT(CONSTRUCTORS)
  }
  .data1          : { *(.data1) }
  _edata = .; PROVIDE (edata = .);
  __bss_start = .;
  __bss_start__ = .;
  .bss            :
  {
   *(.dynbss)
   *(.bss .bss.* .gnu.linkonce.b.*)
   *(COMMON)
   /* Align here to ensure that the .bss section occupies space up to
      _end.  Align after .bss to ensure correct alignment even if the
      .bss section disappears because there are no input sections.
      FIXME: Why do we need it? When there is no .bss section, we don't
      pad the .data section.  */
   . = ALIGN(. != 0 ? 32 / 8 : 1);
  }
  _bss_end__ = . ; __bss_end__ = . ;
  . = ALIGN(32 / 8);
  . = ALIGN(32 / 8);
  __end__ = . ;
  _end = .; PROVIDE (end = .);
  /* Stabs debugging sections.  */
  .stab          0 : { *(.stab) }
  .stabstr       0 : { *(.stabstr) }
  .stab.excl     0 : { *(.stab.excl) }
  .stab.exclstr  0 : { *(.stab.exclstr) }
  .stab.index    0 : { *(.stab.index) }
  .stab.indexstr 0 : { *(.stab.indexstr) }
  .comment       0 : { *(.comment) }
  /* DWARF debug sections.
     Symbols in the DWARF debugging sections are relative to the beginning
     of the section so we begin them at 0.  */
  /* DWARF 1 */
  .debug          0 : { *(.debug) }
  .line           0 : { *(.line) }
  /* GNU DWARF 1 extensions */
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
  .debug_sfnames  0 : { *(.debug_sfnames) }
  /* DWARF 1.1 and DWARF 2 */
  .debug_aranges  0 : { *(.debug_aranges) }
  .debug_pubnames 0 : { *(.debug_pubnames) }
  /* DWARF 2 */
  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
  .debug_abbrev   0 : { *(.debug_abbrev) }
  .debug_line     0 : { *(.debug_line) }
  .debug_frame    0 : { *(.debug_frame) }
  .debug_str      0 : { *(.debug_str) }
  .debug_loc      0 : { *(.debug_loc) }
  .debug_macinfo  0 : { *(.debug_macinfo) }
  /* SGI/MIPS DWARF 2 extensions */
  .debug_weaknames 0 : { *(.debug_weaknames) }
  .debug_funcnames 0 : { *(.debug_funcnames) }
  .debug_typenames 0 : { *(.debug_typenames) }
  .debug_varnames  0 : { *(.debug_varnames) }
  /* DWARF 3 */
  .debug_pubtypes 0 : { *(.debug_pubtypes) }
  .debug_ranges   0 : { *(.debug_ranges) }
    .stack         0x80000 :
  {
    _stack = .;
    *(.stack)
  }
  .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
  .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }

}

Jonas Maebe wrote 26 lines
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 - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to Nataraj S Narayan
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

Reply by email

Nataraj S Narayan
to Jonas Maebe

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

Jonas Maebe wrote 20 lines
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 - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to Nataraj S Narayan
Nataraj S Narayan wrote 17 lines
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

Reply by email

Jonas Maebe
to Micha Nelissen
Micha Nelissen wrote 6 lines
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

Reply by email

Micha Nelissen
to Jonas Maebe
Jonas Maebe wrote 6 lines
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

Reply by email

Nataraj S Narayan
to Jonas Maebe: You'll have to find out in which library this symbol is defined. It's probably libgcc or…

hi Jonas

In /usr/br-git-rf/usr/lib 'arm-linux-nm' gives

libstdc++.so.6 U __aeabi_unwind_cpp_pr1@@GCC_3.5
libstdc++.so.6.0.10 U __aeabi_unwind_cpp_pr1@@GCC_3.5

in

/usr/br-git-rf/lib it is in

libgcc_s.so.1000086bc W __aeabi_unwind_cpp_pr1

regards

Nataraj

libgcc_s.so.1000086bc W __aeabi_unwind_cpp_pr1

Jonas Maebe wrote 31 lines
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 - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to Nataraj S Narayan

Nataraj S Narayan wrote on Sat, 24 Oct 2009:

Show quoted text 12 lines
hi Jonas In /usr/br-git-rf/usr/lib 'arm-linux-nm' gives libstdc++.so.6 U __aeabi_unwind_cpp_pr1@@GCC_3.5 libstdc++.so.6.0.10 U __aeabi_unwind_cpp_pr1@@GCC_3.5 in /usr/br-git-rf/lib it is in libgcc_s.so.1000086bc W __aeabi_unwind_cpp_pr1

You need a T. "U" = undefined, i.e., that library uses that symbol, but does not contain it. I guess "W" = weak reference (i.e., the library uses that symbol, but it can also be loaded even if the symbol is not available, and the code will check whether the symbol is available before using it).

Jonas

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

Reply by email

Nataraj S Narayan
to Jonas Maebe

Hi Jonas

This is the gist of a Freenode chat on #uclibc

<nataraj> /usr/br-git-rf/usr/lib/libc.a(sigrestorer.os):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'
<nataraj> which lib is __aeabi_unwind_cpp_pr1, defined? <nataraj> got this while trying to compile an app using freepascal arm compiler built with arm-linux-uclibcgnueabi tool chain <nataraj> jacmet,blindvt` ?
<gustavoz> nataraj: that's libgcc
<nataraj> http://pastebin.com/m4f18da1
<nataraj> gustavoz, means fpc dint use uclibc?
<gustavoz> nataraj: libgcc != glibc/uclibc
<nataraj> sorry, got it wrong
<nataraj> ok, where does it leave me and fpc on uclib? <gustavoz> did you build/include libgcc in br?
<nataraj> Build/install a shared libgcc? yep
<nataraj> BR2_GCC_SHARED_LIBGCC=y
<gustavoz> it's likely fpc is failing at linking runtime libraries needed by the toolchain
<nataraj> i can run plain hello world pascal programs <nataraj> using writeln('hello world');
<nataraj> so it is a problem of fpc not br?
<gustavoz> very likely
<gustavoz> you've got that symbol in libgcc so fpc is failing to link it in <gustavoz> you may need a command line switch for fpc to open it, it's been ages since i've used fpc so i don't recall
<gustavoz> you may be able to set things right in fpc.cfg too

Any help?

regards

Nataraj

Jonas Maebe wrote 30 lines
Nataraj S Narayan wrote on Sat, 24 Oct 2009: > hi Jonas > > In /usr/br-git-rf/usr/lib 'arm-linux-nm' gives > > libstdc++.so.6 U __aeabi_unwind_cpp_pr1@@GCC_3.5 > libstdc++.so.6.0.10 U __aeabi_unwind_cpp_pr1@@GCC_3.5 > > in > > /usr/br-git-rf/lib it is in > > libgcc_s.so.1000086bc W __aeabi_unwind_cpp_pr1 You need a T. "U" = undefined, i.e., that library uses that symbol, but does not contain it. I guess "W" = weak reference (i.e., the library uses that symbol, but it can also be loaded even if the symbol is not available, and the code will check whether the symbol is available before using it). Jonas ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jonas Maebe
to Nataraj S Narayan
Nataraj S Narayan wrote 7 lines
<gustavoz> you've got that symbol in libgcc so fpc is failing to link it in <gustavoz> you may need a command line switch for fpc to open it, it's been ages since i've used fpc so i don't recall <gustavoz> you may be able to set things right in fpc.cfg too Any help?

As I said in my very first reply to you in this thread: "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."

When using --sysroot, you may have to cut the sysroot form the/path/ libgcc though.

Jonas

Reply by email

Nataraj S Narayan
to Jonas Maebe

Jonas

These are the ones.

/usr/br-git-rf/lib/libgcc_s.so
/usr/br-git-rf/lib/libgcc_s.so.1
/usr/br-git-rf/usr/lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc.a /usr/br-git-rf/usr/lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc_eh.a /usr/br-git-rf/usr/lib/libgcc_s.so
/usr/br-git-rf/usr/lib/libgcc_s.so.1

regs

Nataraj

Jonas Maebe wrote 24 lines
On 26 Oct 2009, at 16:01, Nataraj S Narayan wrote: > <gustavoz> you've got that symbol in libgcc so fpc is failing to link it > in > <gustavoz> you may need a command line switch for fpc to open it, it's > been ages since i've used fpc so i don't recall > <gustavoz> you may be able to set things right in fpc.cfg too > > Any help? As I said in my very first reply to you in this thread: "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." When using --sysroot, you may have to cut the sysroot form the/path/libgcc though. Jonas _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Nataraj S Narayan
to Nataraj S Narayan

Jonas

Got it linked with : after adding {$linklib gcc_s} to program.

# /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 -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/ -Fl/usr/br-git-rf/lib -Fl/usr/br-git-rf/usr/lib
-k"--sysroot=/usr/br-git-rf"

But dont execute on target:
# ./firework
-sh: ./firework: not found

# ldd firework
checking sub-depends for '/lib/libgcc_s.so.1'
checking sub-depends for '/usr/lib/libncurses.so.5' checking sub-depends for '/lib/libc.so.0'
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0x00000000) libc.so.0 => /lib/libc.so.0 (0x00000000)
/lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000) # ls -l /lib/libgcc_s.so.1
-rw-r--r-- 1 root root 170833 Oct 21 2009 /lib/libgcc_s.so.1 # ls -l /lib/libc.so.0
lrwxrwxrwx 1 root root 21 Oct 22 2009 /lib/libc.so.0 -> libuClibc-0.9.30.1.so

any clues

regards

Nataraj

Nataraj S Narayan wrote 41 lines
Jonas These are the ones. /usr/br-git-rf/lib/libgcc_s.so /usr/br-git-rf/lib/libgcc_s.so.1 /usr/br-git-rf/usr/lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc.a /usr/br-git-rf/usr/lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc_eh.a /usr/br-git-rf/usr/lib/libgcc_s.so /usr/br-git-rf/usr/lib/libgcc_s.so.1 regs Nataraj On Mon, Oct 26, 2009 at 8:38 PM, Jonas Maebe wrote: > > On 26 Oct 2009, at 16:01, Nataraj S Narayan wrote: > >> <gustavoz> you've got that symbol in libgcc so fpc is failing to link it >> in >> <gustavoz> you may need a command line switch for fpc to open it, it's >> been ages since i've used fpc so i don't recall >> <gustavoz> you may be able to set things right in fpc.cfg too >> >> Any help? > > As I said in my very first reply to you in this thread: "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." > > When using --sysroot, you may have to cut the sysroot form the/path/libgcc > though. > > > Jonas > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel >

Reply by email

Nataraj S Narayan
to Nataraj S Narayan

Yah! Jonas

Got it working this time!

# strings firework|grep ld
/usr/br-git-rf/lib/ld-uClibc.so.0
No child processes
Interrupted system call should be restarted
#

had to

# mkdir -p /usr/br-git-rf/lib/ and

cp /lib/ld-uClibc.so.0 /usr/br-git-rf/lib/

regards & thanks

Nataraj

Nataraj S Narayan wrote 81 lines
Jonas Got it linked with : after adding {$linklib gcc_s} to program. # /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 -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/ -Fl/usr/br-git-rf/lib -Fl/usr/br-git-rf/usr/lib -k"--sysroot=/usr/br-git-rf" But dont execute on target: # ./firework -sh: ./firework: not found # ldd firework checking sub-depends for '/lib/libgcc_s.so.1' checking sub-depends for '/usr/lib/libncurses.so.5' checking sub-depends for '/lib/libc.so.0' libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000) libncurses.so.5 => /usr/lib/libncurses.so.5 (0x00000000) libc.so.0 => /lib/libc.so.0 (0x00000000) /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000) # ls -l /lib/libgcc_s.so.1 -rw-r--r-- 1 root root 170833 Oct 21 2009 /lib/libgcc_s.so.1 # ls -l /lib/libc.so.0 lrwxrwxrwx 1 root root 21 Oct 22 2009 /lib/libc.so.0 -> libuClibc-0.9.30.1.so any clues regards Nataraj On Mon, Oct 26, 2009 at 8:44 PM, Nataraj S Narayan wrote: > Jonas > > These are the ones. > > /usr/br-git-rf/lib/libgcc_s.so > /usr/br-git-rf/lib/libgcc_s.so.1 > /usr/br-git-rf/usr/lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc.a > /usr/br-git-rf/usr/lib/gcc/arm-linux-uclibcgnueabi/4.3.4/libgcc_eh.a > /usr/br-git-rf/usr/lib/libgcc_s.so > /usr/br-git-rf/usr/lib/libgcc_s.so.1 > > regs > > Nataraj > > On Mon, Oct 26, 2009 at 8:38 PM, Jonas Maebe wrote: >> >> On 26 Oct 2009, at 16:01, Nataraj S Narayan wrote: >> >>> <gustavoz> you've got that symbol in libgcc so fpc is failing to link it >>> in >>> <gustavoz> you may need a command line switch for fpc to open it, it's >>> been ages since i've used fpc so i don't recall >>> <gustavoz> you may be able to set things right in fpc.cfg too >>> >>> Any help? >> >> As I said in my very first reply to you in this thread: "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." >> >> When using --sysroot, you may have to cut the sysroot form the/path/libgcc >> though. >> >> >> Jonas >> _______________________________________________ >> fpc-devel maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-devel >> >

Reply by email