Re: [fpc-devel] ncurses example on arm linux uclibc
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 On Sat, Oct 24, 2009 at 5:27 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: 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.186bc 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 - 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
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 - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] ncurses example on arm linux uclibc
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 jonas.ma...@elis.ugent.be 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 - 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
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 (0x) libncurses.so.5 = /usr/lib/libncurses.so.5 (0x) libc.so.0 = /lib/libc.so.0 (0x) /lib/ld-uClibc.so.0 = /lib/ld-uClibc.so.0 (0x) # 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 lrwxrwxrwx1 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 natara...@gmail.com 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 jonas.ma...@elis.ugent.be 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 - 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
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.186bc W __aeabi_unwind_cpp_pr1 regards Nataraj libgcc_s.so.186bc W __aeabi_unwind_cpp_pr1 On Fri, Oct 23, 2009 at 8:44 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: 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 ___ 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
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.186bc 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 - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] ncurses example on arm linux uclibc
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
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] ncurses example on arm linux uclibc
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
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
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
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
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
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
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
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
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