[Pkg-pascal-devel] Lazarus packaging model

Abou Al Montacir abou.almontacir at sfr.fr
Tue May 6 21:00:52 UTC 2014


On Tue, 2014-05-06 at 22:14 +0200, Abou Al Montacir wrote:
> On Tue, 2014-05-06 at 21:23 +0200, Paul Gevers wrote:
> > On 06-05-14 21:12, Abou Al Montacir wrote:
...
> >  This makes it very hard to distribute
> > multiple source packages with units (like we see now with
> > castle-game-engine). It means that ALL unit packages must migrate
> > together from unstable to testing, making this a pain if more unit
> > packages are packaged. In the c world only the API of the library itself
> > matters.
> As I told to you, there is -Ur flag:
>       -Ur        Generate release unit files (never automatically recompiled)
> Maybe we need to investigate more, but I think if there is no change in
> the unit generator code in the compiler, there should be way to
> workaround this. However if a unit was compiled with a given version of
> rtl and that the interface of that rtl (API) changed, then you need to
> recompile anyway.
I have tried the following experiments:

$ppc386-2.6.2 -Ur aunit.pas 
Free Pascal Compiler version 2.6.2-9 [2014/01/27] for i386
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling aunit.pas
14 lines compiled, 0.0 sec 

$ppc386-2.6.4 aprog.pas -Fu/usr/lib/fpc/2.6.2/units/i386-linux/rtl/
Free Pascal Compiler version 2.6.4-1 [2014/04/03] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling aprog.pas
Linking aprog
/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?
14 lines compiled, 0.1 sec 

$./aprog 
Program was compiled by 2.6.4
Unit was compiled by 2.6.2

$mv aunit.pas bunit.pas

$ppc386-2.6.4 aprog.pas 
Free Pascal Compiler version 2.6.4-1 [2014/04/03] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling aprog.pas
PPU Loading aunit.ppu
Recompiling aunit, checksum changed for System
aprog.pas(4,3) Fatal: Can't find unit aunit used by aprog
Fatal: Compilation aborted

The above prouves what I was assuming, one can keep units compiled by
older compiler provided he has access to the old RTL. In this sense, the
RTL is kind of libc for fpc. However as with new compilers we have new
versions of RTL, then it makes little sense to keep old RTL but not the
compiler. I don't know how to handle this with sonames as in this case
we don't have separate sources for RTL and for the compiler.

I found it a pity that Debian drops old packages from archive when
upgrading sources to a new version, even if other packages depend on
them. Otherwise, this could be solved easily. The version-named RTL
packages will stay in the archive until all the dependencies are gone.
This means that a package should stay in the archive as long as it
belongs to the last source version or it is in dependency or build
dependency of another package in that archive. But I don't want to write
this to dd list at least before I can figure out what are the impacts.

Cheers,
Abou Al Montacir,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: aunit.pas
Type: text/x-pascal
Size: 197 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20140506/b6ace967/attachment-0002.pas>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aprog.pas
Type: text/x-pascal
Size: 218 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20140506/b6ace967/attachment-0003.pas>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20140506/b6ace967/attachment-0001.sig>


More information about the Pkg-pascal-devel mailing list