[fpc-devel] Generics in FPC have many problems

Sven Barth pascaldragon at googlemail.com
Tue Aug 30 09:46:07 CEST 2011

Am 30.08.2011 03:06, schrieb Anthony Walter:
> Tonight I tried to "make all" from your branch and wasn't able to build.
> This is a the output I got:
> http://pastebin.com/GQh5XA2w
> I am guessing your build requires a working version of your fpc binary
> to build itself.

The errors you see are already when compiling the RTL with the newly 
compiled compiler. As I said: compiling fgl is currently broken.
I'd suggest you to do the following:
Replace fgl.pp in rtl/objpas/ with an empty unit of the same name (empty 
here means containing "unit fgl; interface implementation end."). You 
can't use the basic generic classes then, but for tests they aren't 
necessary. ^^
Then issue the following commands (I assume you start in the base 
directory of the checkout):

=== commands begin ===
cd compiler
make cycle
cd ../rtl
make clean all
=== commands end ===

You'll have a new compiler as compiler/ppc386 (assuming you're on a x86 
system; it will be named approbiately for other systems) and a compiled 
RTL in rtl/units/PLATFORM-OS (e.g. rtl/units/i386-linux). You can then 
compile programs with the following command (I assume FPCDIR to be set 
to the checkout's base directory, and the current platform to be 
i386-linux ):

=== command begin ===

$FPCDIR/compiler/ppc386 -n -Fu$FPCDIR/rtl/units/i386-linux 
[OTHER-OPTIONS] yourtest.pas

=== command end ===

> Also, I wrote a few of pretty clean test cases in Delphi 2010 Today when
> I had some downtime from my other work. I'd be interested in integrating
> them "cleanly" into your tests and helping the fpc community any way I can.

If you write them in a way that they adhere to the same basic pattern as 
other tests in FPC then they can easily be integrated (just take a look 
at the existing generic tests to see what I mean). I you have questions 
regarding this, please feel free to ask :)

> Finally, I think I looked at your change log. I guess the last check in
> you did was on July 16? I I reading that right?

The SVN branch is a bit behind of my local GIT one, but not that much. I 
didn't have much time the last few weeks (and the coming weeks as well) 
as I'm working on my bachelor thesis :)


More information about the fpc-devel mailing list