[fpc-devel] Library and unit search paths under MacOSX with fpc 2.0.0?
Marco van de Voort
marcov at stack.nl
Thu Jun 16 08:47:26 CEST 2005
> with fpc, I need to add the following command-line options
>
> -Fl/sw/lib -Fl/usr/X11R6/lib
>
> as well as
>
> -Fu/usr/local/lib/fpc/2.0.0/units/powerpc-darwin/gtk
>
> The first two caught me by surprise, but some tracking resolved this.
> However, under Linux, I don't need to specify further library locations.
> How come?
LD has some default paths (like /lib and /usr/lib) hardcoded. On some
systems, the linker is modified to add non standard paths (/opt/lib /sw/lib
/usr/local/lib, /usr/X11R6/lib) to these default paths, and some systems
don't do this. BSD typically doesn't. (and requires /usr/local/lib to
be included) Darwin, as a BSD derivative, seems to follow this.
I can only guess about the reasons, but two good ones are:
- running contributed software unmodified (GPL is considered non-free from
BSD perspective and "dangerous"). Unlikely since they do other mods,
but maybe good enough to be a historical one. There was a lot of
opposition to switching to the GNU toolchain in the past.
- (the better IMHO) Non-core directories could be writable to a wider
audience, leading to all kinds of trojan security dangers. This
is also the reason why BSD separates /usr/lib and /usr/local/lib
> Is there any documentation where this can be found? Is there a place
> where I can put this info in the FPCWiki?
More buildfaq work I think. But it is standard on *BSD and Unix in general
(Solaris also has a few added paths, since the GNU toolchain is not globally
installed). When I added this on my mac-mini I didn't even give a second
thought.
(-Fu issues)
Odd. Do the Lazarus makefiles maybe disable fpc.cfg ? Try building with
-OPT='-vt' or va and examine the (huge) output.
More information about the fpc-devel
mailing list