[Pkg-pascal-devel] fpc libtar unit to fp-units-base

Michalis Kamburelis michalis.kambi at gmail.com
Fri Feb 5 09:21:38 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Abou Al Montacir wrote:
> Side question: I tried the following program and it worked well.
> 
> **program test;
> 
> uses fpmkunit;
> 
> begin
> 
> WriteLn('hello');
> 
> end.
> 
> $fpc -va test.pas | grep libtar
> 
> /usr/bin/ld.bfd: warning: link.res contains output sections; did
> you forget -T?
> 
> $
> 
> 
> I'd say there is no direct dependency between fpmkunit and libtar,
> so maybe we need to goo more deeper in why libtar is needed. Then
> maybe we do not need any change in FPC. Maybe we can follow your 
> proposal and change CGE if no time to understand why libtar is
> needed.
> 

Looking into the sources (packages/fpmkunit/src/fpmkunit.pp), FpMkUnit
simply uses the LibTar unit.

Doing your test

  fpc -va test.pas | grep libtar

shows quite a few lines for me. libtar.ppu is searched and used
(remember "grep -i libtar" to have all the hits, case is ignored:).
Although I tested this on FPC 3.0.0 from upstream freepascal.org (not
from Debian package).

The dependency is conditional --- only when UNIX, and only when
NO_TAR_SUPPORT is not defined. Looking at
packages/fppkg/src/pkgglobals.pp , it seems FPC >= 2.7.1 is required
for this, otherwise NO_TAR_SUPPORT is defined (if compiling FPC
packages using the fpmake/fppkg system itself, then
packages/fppkg/src/pkgglobals.pp may define NO_TAR_SUPPORT, it seems).

Sidenote: it uses LibTar only if HAS_TAR_SUPPORT. If need be, you can
also solve the issue of this thread by making HAS_TAR_SUPPORT
undefined for the Debian package, this would be 1-line change to
packages/fpmkunit/src/fpmkunit.pp . fpmkunit will then build without
depending on libtar. It woul mean a (small) loss of the functionality
though (the "zipinstall" command would then make "zip" on Unix, while
the idea is that it can make "tar" or "tar.gz" on Unix).

Regards,
Michalis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAla0aaIACgkQ/3SNE7JAcR8l/ACfWS5rQrJSlrMgX8DhVRhRLhLu
PdwAnRYm2atVl2hRXiGDcl5/symwvS33
=T+IN
-----END PGP SIGNATURE-----



More information about the Pkg-pascal-devel mailing list