Re: [fpc-pascal] missing functions in libc

2008-08-22 Thread Marc Santhoff
Am Freitag, den 22.08.2008, 08:56 +0200 schrieb Marco van de Voort:
> In our previous episode, Marc Santhoff said:

[...]

> > What going on here? How can I repair it?
> 
> Eliminate use of the libc unit, using mostly baseunix, dynlibs and the like
> (the above url has a longer list). Replace -64 functions by their plain
> equivalents. (FreeBSD 4+ already has 64-bit off_t)
> 
> And hope that they didn't use too exotic functions from unit libc. If so,
> report here. In 2.2.2 some routines to access users/passwords were added,
> maybe you can take the sources from there (packages/users), and try to get
> it running under 2.0.4

Thanks, that made it clear and I found there is only one unit using
libc.

The other question is if I want to put a lot of time into that one, I
only wanted to see if it works - according to the source it must have
been working with fpc once.

I'll see if the author is still working on this or the successor of it
and decide after that.

Thanks again,
Marc

For anyone interested:

http://lptk.sourceforge.net/index.php
http://pasgf.sourceforge.net/index.php


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] missing functions in libc

2008-08-21 Thread Marco van de Voort
In our previous episode, Marc Santhoff said:
> At first the compiler does not find librt and libdl. I know these exist
> only on Linux and don't know, why they are tried to be pulled in.

libdl is mostly uses for dynamically loading dynamic libraries. Probably
that packages declares its own loadlibrary (dlload) equivalents somewhere.
 
> When I delete the -ldl an -lrt from the link.res and start ppas.sh, the
> compiler struggles on finding unit libc.

That's a Kylix legacy unit. It means that this package was never fully
converted to FPC. It only exists for linux/x86 with a glibc.

See here : http://wiki.freepascal.org/libc_unit

> If I add an extra -Fu... to the path where it is found, some functions
> are missing. Some of those are 64bit file system functions like stat64,
> so I assumed they where newer and tried the libc.pp from fpc 2.0.2, but
> the same thing happens (see below). Using "man" there where no such
> functions found, although the man pages on freebsd are generally very
> good and complete.

That's because they are temporary workarounds for the older linux
architectures when they made a 32-bit -> 64-bit off_t transition. They are
not even universal on Linux iirc.
 
> This never happened to me, I have written some programs using plain gtk1
> or functions from foreign libraries (including libc IIRC), but I never
> had any problem. So I'm stuck.
> 
> What going on here? How can I repair it?

Eliminate use of the libc unit, using mostly baseunix, dynlibs and the like
(the above url has a longer list). Replace -64 functions by their plain
equivalents. (FreeBSD 4+ already has 64-bit off_t)

And hope that they didn't use too exotic functions from unit libc. If so,
report here. In 2.2.2 some routines to access users/passwords were added,
maybe you can take the sources from there (packages/users), and try to get
it running under 2.0.4
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] missing functions in libc

2008-08-21 Thread Michael Van Canneyt


On Fri, 22 Aug 2008, Marc Santhoff wrote:

> Hi,
> 
> I'm trying to compile LPTK 0.9.0 on FreeBSD 4 using a working fpc 2.0.4.
> I use this compiler for a long time now and never had the symptoms as
> following:
> 
> At first the compiler does not find librt and libdl. I know these exist
> only on Linux and don't know, why they are tried to be pulled in.
> 
> When I delete the -ldl an -lrt from the link.res and start ppas.sh, the
> compiler struggles on finding unit libc.

the libc is only for gnu libc, so the errors are normal. You should try
to find out why unit libc is used.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal