[fpc-pascal] a few installation issues (trunc on freebsd)

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Nov 3 19:10:21 CET 2008


On 03 Nov 2008, at 16:03, Martin Friebe wrote:

> I have a few question, regarding my attempts to install fpc from trunc

Small aside: it's trunk (as in "trunk of a tree", compared to  
"branches"), not trunc (as in "truncate").

> * First problem: I found if I simply go to the parent (svn) directory,
> and do a "gmake all PP=/data/fpc_trunc/svn/compiler/ppc386" there, it
> will do some clean out, and stop because halfway through it will have
> deleted this compiler.

That's correct.

> So instead (which is not mentioned in the buildfaq?), I have installed
> the compiler and rtl at this stage:
>  gmake install  INSTALL_PREFIX=/data/fpc_trunc/inst/
>  cd ../rtl
>  gmake install  INSTALL_PREFIX=/data/fpc_trunc/inst/

You don't have to install the compiler/rtl. You only have to copy the  
compiler binary someplace safe. In face, you don't need the cycle at  
all, you can immediately do a "gmake all".

> * Second Problem: when using fpc (instead of ppc), it will always find
> the ppc386 in the default installation. The only way I can change this
> is "fpc -Xp/path/to/my/ppc386". (Which I found no documentation for. I
> got that from looking through the source) However, if I want to use  
> fpc
> from lazarus, I may not be able to pass that (convenient) on the  
> command
> line.

Does lazarus call fpc or ppcXXX?

> Is there any INI file?

No.

> (fpc.cfg did not help here, at least not the
> fpc.cfg in the same path as fpc exe).
> Or is it save to substitute fpc, with ppc386 everywhere it is called?

Yes, that's safe.

> any way I then go and create my fpc.cfg:
> cd ../../inst
> ./bin/fpcmkcfg -d basepath=/data/fpc_trunc/inst/lib/fpc/2.2.2 >
> bin/fpc.cfg

I'm not sure how well maintained fpcmkcfg is. For the (*nix) releases  
we use the samplecfg script (from compiler/utils) to generate  
configurations. But you shouldn't need a new configuration file, afaik  
samplecfg is identical in fixes and trunk (and in 2.2.2).

> * 3rd problem, it uses the same prefix for the units (-Fu) and the bin
> (-FD), so the above creates correct -Fu config, but I must change the
> -FD conf. Any solution to this ?
> -Fu will be correct:
> -Fu/data/fpc_trunc/inst/lib/fpc/2.2.2/units/$FPCTARGET/rtl
> but -FD will *NOT* be (which I think it should?, or am I wrong?)
> -FD/data/fpc_trunc/inst/bin

-FD is used to find utilities like as and ld. Unless you have special  
binutils versions which you only want to use with this particular  
version of the compiler, you should not use and -FD parameter.

> * 4th Problem the compilation aborted (Sorry I don't remember where)
> because it tried to access the x11 package
> => I did solve that by going int packages/x11, did the make there, and
> did install it (with the install prefix)

Without the actual error message, there's not much to add.

> * 5th problem packages/graph stops, because it tries to use x86. (This
> exists in the sources rtl/unix/x86.pp) Somehow all the above has not
> installed this (not on my FreeBSD), the package is missing int he
> inst/lib.... directory

I thought there were people who regularly compile the FreeBSD version,  
but it seems that is not the case if such errors exist.

> And last not least, having checked out trunc (or being under the
> impression to have done so), why has the "make install" in the rtl
> installed something with 2.2.2 in the path? (If I run the ppc386 that
> was installed it will say 2.3.1.

You have to install using

make FPC=/path/to/newly/compiled/ppc386 install INSTALL_PREFIX=...


Jonas




More information about the fpc-pascal mailing list