[lazarus] Clean build from nothing

Marco van de Voort marcov at stack.nl
Tue Jun 24 06:00:09 EDT 2003


> I'm thinking about creating an ebuild for the gentoo linux distrubution. This 
> (for those who don't know) is a distro which builds everything from source. 
> An Ebuild automates this process. (in short it will add a number of users 
> (and hopefully developers)).
> 
> I've looked over the doc's and the faq and the downloads, and I've followed 
> the mailing list. In short I'm rather confused as to what is needed. 
> Do I need FPC Version 1.07 as in the downloads, or 1.08 as in the the mailing 
> list, or 1.1 as in the downloads. Where is the best place to download it 
> from?

I've thought this over for FreeBSD. Effectively, you need:

- a file with all sources, or two (fpc and lazarus)
    (1) e.g. for fpc  ftp://ftp.freepascal.org/fpc/dist/Linux/separate/sources.tar
     preferably an export (no CVS/ dirs). The above file misses this       
    (2) Lazarus source snapshot. Not available on the net (?)
- _any_ starting compiler from the 1.0 branch) You can do a check by parsing
	the output of ppc386 -i   if it is 1.0.6 .. 1.0.8 it is ok.
- dependant packages. (for FreeBSD that is gtk12, glib12 and gdk_pixbuf and
  GNU make, iconv and gettext)  


FPC build:

(1) (fetch)   necessary files (FPC source, starting compiler)
(2) (extract) Then de-tgz in work directory, 
(3  (build)   enter work/fpc/  and run 

	make all OPT='-gl -O3p3'  PP=/path/to/startingcompiler-name-ppc386

	(/path/to/ can be omitted when ppc386 is in the path)

(4) (install) then, again in work/fpc, run
	make install PP=compiler/ppc386 PREFIX=$THEPREFIX

	(THEPREFIX= usually is /usr/lcoal, but e.g. on NetBSD it is /usr/pkg
		for ports)


     Create a symlink 
	ln -s $THEPREFIX/lib/fpc/1.0.8/ppc386 $THEPREFIX/bin/ppc386

     install sourceinstall PREFIX=$THEPREFIX

(5) (configure) run compiler/utils/samplecfg  $THEPREFIX/lib/fpc/1.0.8 $ETCDIR
(6) (optional, test), see if ppc386 -i gives output, else give a warning
                 that user need to add $PREFIX/bin to his current path.
	Try to compiler a program with -viwn, and see if that gives errors.


Notes:
- If you need package lists, you need to generate or supply them yourself,
  (in the port, or in an extra archive)
  either way, 
  do a dummy install to /tmp/pack and determine the files installed with find . >ll

- $THEPREFIX and $ETCDIR should be user configurable. Otherwise local installs
	aren't possible.
- BSDHIER=1 on all make commands forces BSD hierarchy conventions, test
	what is closer to Gentoo defaults, with or without.
- make a user with very limited rights (e.g. by not making him member of 
	"users"), and try if he can install in his local dir without errors.

- Binutils and some other utils needed during built are in base in FreeBSD,
	so I don't check/know these dependancies.
        Easiest is to try the port on a minimal Gentoo install with lots of
	verbosity options, and see if it works.
 
> How about the Lazarus. It looks like it is in heavy development right now 
> (which I feel is good), am I better grabbing source from the cvs or from the 
> download section?

Lazarus is easier I think. 
Make sure the proper source snapshot (so a lazarus cvs checkout), and
all needed libraries.

Then repeat the build and install steps for lazarus/
 
> Should I hold off until 1.08 fpc is officially released? 

Yes and no. 

Yes, for submitting anything final, wait for the final sources.
No, you can start experimenting now.

> Is there a document somewhere that explains exactly how to install from 
> source? (I'm not interested in binaries). 

There is a make cycle faq, but that's for a more ackward era. The makefiles
have improved a lot, and basically it is calling make all and make install
with the appropriate modifiers.  The releases are roughly prepared in
a similar way.






More information about the Lazarus mailing list