Bug in RTL for arm

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in RTL for arm

Koenraad Lelong-2
Hi,
Today I did an update via svn. When I compiled for arm (in the hope that
the bug I encountered a while ago would have disappeared) I found a bug
in rtl/linux/arm/sysnr.inc :
Const
  syscall_nr_base = syscall_nr_base;
I modified this to :
Const
  syscall_nr_base = $900000;
which is similar to fpc 2.0.2. When I compiled this I got my ususal error :
/home/koenraad/fpc-devel/fpc/compiler/ppcrossarm -Ur -XParm-linux- -Xc
-Xr -Ur -Xs  -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE.
-FU/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux -darm -dRELEASE  -Us
-Sg system.pp
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s: Assembler
messages:
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51368: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51376: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51383: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51390: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51398: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51406: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51414: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51422: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51430: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51438: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51446: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51454: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51462: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51470: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51478: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51624: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51632: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51640: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51648: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51655: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51662: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51669: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51676: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51683: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51690: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51697: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51704: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51711: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51718: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51725: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51732: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51739: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51746: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51753: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51760: Error:
unrecognized symbol type ""
/home/koenraad/fpc-devel/fpc/rtl/units/arm-linux/system.s:51767: Error:
unrecognized symbol type ""
threadvr.inc(30,25) Error: Error while assembling exitcode 1
threadvr.inc(30,25) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
make[5]: *** [system.ppu] Fout 1
make[5]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl/linux'
make[4]: *** [linux_all] Fout 2
make[4]: Leaving directory `/home/koenraad/fpc-devel/fpc/rtl'
make[3]: *** [rtl] Fout 2
make[3]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler'
make[2]: *** [cycle] Fout 2
make[2]: Leaving directory `/home/koenraad/fpc-devel/fpc/compiler'
make[1]: *** [compiler_cycle] Fout 2
make[1]: Leaving directory `/home/koenraad/fpc-devel/fpc'
make: *** [build-stamp.arm-linux] Fout 2

Regards,
Koenraad Lelong.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Bug in RTL for arm

Martin Schreiber
On Sunday 19 February 2006 19.04, Koenraad Lelong wrote:

> Hi,
> Today I did an update via svn. When I compiled for arm (in the hope that
> the bug I encountered a while ago would have disappeared) I found a bug
> in rtl/linux/arm/sysnr.inc :
> Const
>   syscall_nr_base = syscall_nr_base;
> I modified this to :
> Const
>   syscall_nr_base = $900000;
> which is similar to fpc 2.0.2. When I compiled this I got my ususal error :
....
Do you have compiler option -e/usr/local/arm-linux/bin or similar?
With fixes_2_0 rev. 2644 and attached MSEide project (adjust
'Project'-'Options'-'Macros'-'MSEDIR' and 'FPCDIR') I can compile until next
compiler AV:

Free Pascal Compiler version 2.0.3 [2006/02/20] for arm
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for ARM
Compiling demo.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msegui.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msegraphics.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msegui.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msepointer.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msetimer.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msegui.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msepointer.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msegui.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msebitmap.pas
Compiling /home/mse/proj/msegui/branches/fixes_0_8/lib/common/kernel/msegui.pas
msegui.pas(8004,2) Note: Local variable "window" is assigned but never used
msegui.pas(4,74) Fatal: Compilation aborted
An unhandled exception occurred at $0809BF4E :
EAccessViolation : Access violation
  $0809BF4E  TCGARM__A_LOAD_CONST_REG,  line 578 of ./arm/cgcpu.pas
  $0809B9F5  TCGARM__A_OP_CONST_REG_REG_CHECKOVERFLOW,  line 436
of ./arm/cgcpu.pas
  $0809B593  TCGARM__A_OP_CONST_REG_REG,  line 323 of ./arm/cgcpu.pas
  $0809B43D  TCGARM__A_OP_CONST_REG,  line 287 of ./arm/cgcpu.pas
  $080CE4DF  TCG__G_ADJUST_SELF_VALUE,  line 2065 of cgobj.pas
  $0809DFA1  TCGARM__G_INTF_WRAPPER,  line 1479 of ./arm/cgcpu.pas
  $0811F36C  GEN_INTF_WRAPPER,  line 2370 of ncgutil.pas
  $0811F3DF  GEN_INTF_WRAPPERS,  line 2386 of ncgutil.pas
  $080E20A9  PROC_UNIT,  line 1303 of pmodules.pas
  $080904BA  COMPILE,  line 532 of parser.pas
  $080D8531  TPPUMODULE__LOADPPU,  line 1509 of fppu.pas
  $080D7E8F  TPPUMODULE__LOAD_USEDUNITS,  line 1244 of fppu.pas
  $080D8435  TPPUMODULE__LOADPPU,  line 1471 of fppu.pas
  $080E0BD6  LOADUNITS,  line 622 of pmodules.pas
  $080E1371  PARSE_IMPLEMENTATION_USES,  line 840 of pmodules.pas
  $080E1D3C  PROC_UNIT,  line 1185 of pmodules.pas
  $080904BA  COMPILE,  line 532 of parser.pas

Martin

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

demoarm.prj.zip (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bug in RTL for arm

Koenraad Lelong-3
Martin Schreiber schreef:

> On Sunday 19 February 2006 19.04, Koenraad Lelong wrote:
>
>>Hi,
>>Today I did an update via svn. When I compiled for arm (in the hope that
>>the bug I encountered a while ago would have disappeared) I found a bug
>>in rtl/linux/arm/sysnr.inc :
>>Const
>>  syscall_nr_base = syscall_nr_base;
>>I modified this to :
>>Const
>>  syscall_nr_base = $900000;
>>which is similar to fpc 2.0.2. When I compiled this I got my ususal error :
>
> ....
> Do you have compiler option -e/usr/local/arm-linux/bin or similar?
> With fixes_2_0 rev. 2644 and attached MSEide project (adjust
> 'Project'-'Options'-'Macros'-'MSEDIR' and 'FPCDIR') I can compile until next
> compiler AV:
>
I'm getting a similar result, although I can't use your prj-file. I just
modified ${COMPILER} to ppcrossarm (was ppc386) and ${TARGET} to
arm-linux (was i386-linux} if "Settings/Configure MSEide". In
"Project/Options" I added some "Make options" : -Xr -Xd.
I didn't know what Macros can be used for, so I didn't look at that.
I'm going to try a debug-compile for the compiler and look with gdb when
I have time.
Regards,
Koenraad Lelong.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Bug in RTL for arm

Koenraad Lelong-3
In reply to this post by Martin Schreiber
Martin Schreiber schreef:

> On Sunday 19 February 2006 19.04, Koenraad Lelong wrote:
>
>>Hi,
>>Today I did an update via svn. When I compiled for arm (in the hope that
>>the bug I encountered a while ago would have disappeared) I found a bug
>>in rtl/linux/arm/sysnr.inc :
>>Const
>>  syscall_nr_base = syscall_nr_base;
>>I modified this to :
>>Const
>>  syscall_nr_base = $900000;
>>which is similar to fpc 2.0.2.
...
I seem to have forgotten to add this to my previous mail :
Last time I checked SVN this seems solved (is it ? I modified my
source-file which didn't get updated, so I renamed my source-file and
then a new file appeared which contained the fix), but in 2.0.3 (of feb.
24) it is not.
With 2.0.3 that error I mentioned does not appear, so I'm trying with that.
Regards,
Koenraad Lelong.
P.S. Is it possible that libc for arm-linux has been removed from the
makefiles of 2.0.3 ? First time I tried to compile MSEgui for arm-linux
I got an error about this, so I added it again in the makefile in
packages/base. I know I'm not supposed to do that but I don't know where
I should modify the Makefile.fpc.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Bug in RTL for arm

Marco van de Voort
> Last time I checked SVN this seems solved (is it ? I modified my
> source-file which didn't get updated, so I renamed my source-file and
> then a new file appeared which contained the fix), but in 2.0.3 (of feb.
> 24) it is not.
> With 2.0.3 that error I mentioned does not appear, so I'm trying with that.
> Regards,
> Koenraad Lelong.
> P.S. Is it possible that libc for arm-linux has been removed from the
> makefiles of 2.0.3 ? First time I tried to compile MSEgui for arm-linux
> I got an error about this, so I added it again in the makefile in
> packages/base. I know I'm not supposed to do that but I don't know where
> I should modify the Makefile.fpc.

Unit libc is linux/x86 only afaik, since it is a Kylix unit, which x86 only.
It might get ported to linux/amd64, but that is about it.

Use baseunix et all, which is the portable way to do Unix interfacing.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Bug in RTL for arm

Koenraad Lelong-2
In reply to this post by Koenraad Lelong-3
Koenraad Lelong schreef:

> Martin Schreiber schreef:
>
>> On Sunday 19 February 2006 19.04, Koenraad Lelong wrote:
>>
>>> Hi,
>>> Today I did an update via svn. When I compiled for arm (in the hope that
>>> the bug I encountered a while ago would have disappeared) I found a bug
>>> in rtl/linux/arm/sysnr.inc :
>>> Const
>>>  syscall_nr_base = syscall_nr_base;
>>> I modified this to :
>>> Const
>>>  syscall_nr_base = $900000;
>>> which is similar to fpc 2.0.2.
>
> ...
> I seem to have forgotten to add this to my previous mail :
> Last time I checked SVN this seems solved (is it ? I modified my
> source-file which didn't get updated, so I renamed my source-file and
> then a new file appeared which contained the fix), but in 2.0.3 (of feb.
> 24) it is not.
Could this patch be applied on the 2.0.3 tree (I made it from the
fpcbuild-archive) ? If it's not right, could you please post
instructions how to do it right ?
Thanks,
Koenraad Lelong.

--- fpcsrc/rtl/linux/arm/sysnr.inc-org 2006-02-15 08:19:27.000000000 +0100
+++ fpcsrc/rtl/linux/arm/sysnr.inc 2006-03-06 13:25:33.000000000 +0100
@@ -21,7 +21,7 @@
 }
 
 Const
-  syscall_nr_base = syscall_nr_base;
+  syscall_nr_base = $900000;
 
   syscall_nr_exit                       =  syscall_nr_base+ 1;
   syscall_nr_fork                       =  syscall_nr_base+ 2;

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal