[fpc-devel] The status of fpmake ?

Graeme Geldenhuys graemeg.lists at gmail.com
Wed May 21 17:04:08 CEST 2008


Peter Vreman wrote:
> If you don't have fpc installed in the default locations /usr/[local/]lib/fpc/<version> you need
> to set FPCDIR. There is no other way to detect the location.

I have it install in /opt/fpc/
See below for details...

> 
> The /etc/fpc.cfg and ~/.fpc.cfg are for the standalone compiler only and will not be used for
> package building. fpmake and fppkg have their own configuration files where optimizer/debug
> options will be passed to the compiler.

Then why does fpmake mention fpc.cfg in it's help output.
<snip>
Where options is one or more of the following:
  -h --help             This message.
  -l --list-commands    list commands instead of actually executing them.
  -n --nofpccfg         Compiler will not use fpc.cfg
  -v --verbose          Be verbose when working.
<snip>

It would make sense for the build system to use the global or user's 
fpc.cfg file. After all, I can compile any application from the command 
line by simply typing 'fpc <simpleproject.pas>'

Anyway, here are my attempts at helping fpmake along...


Attempt #1
graemeg at graemeg:dialer$ export FPCDIR=/opt/fpc/

graemeg at graemeg:dialer$ ./fpmake build -l -v
The installer encountered the following error:
Could not find unit directory for dependency package "rtl"

Attempt #2
graemeg at graemeg:dialer$ export FPCDIR=/opt/fpc/bin

graemeg at graemeg:dialer$ ./fpmake build -l -v
The installer encountered the following error:
Could not find unit directory for dependency package "rtl"


... and then finally ....

Attempt #3
graemeg at graemeg:dialer$ export FPCDIR=/opt/fpc/lib/fpc/2.2.1/

graemeg at graemeg:dialer$ ./fpmake build -l -v
Warning: Source file "mydialer" not found for i386-linux
   Compiling package MyPackage
   Creating output dir "units/i386-linux"
     Compiling target mydialer
       Executing command "/opt/fpc/bin/fpc -Tlinux -FUunits/i386-linux 
-Fu/opt/fpc/lib/fpc/2.2.1/units/i386-linux/rtl "
/opt/fpc/bin/fpc -Tlinux -FUunits/i386-linux 
-Fu/opt/fpc/lib/fpc/2.2.1/units/i386-linux/rtl


OK, so with that looking good, I tried the build for real without the 
'-l' parameter.

Attempt #4
graemeg at graemeg:dialer$ ./fpmake build -v
Warning: Source file "mydialer" not found for i386-linux
   Compiling package MyPackage
     Compiling target mydialer
       Executing command "/opt/fpc/bin/fpc -Tlinux -FUunits/i386-linux 
-Fu/opt/fpc/lib/fpc/2.2.1/units/i386-linux/rtl "
Free Pascal Compiler version 2.2.1 [2008/04/21] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Fatal: No source file name in command line
Fatal: Compilation aborted
Error: /opt/fpc_2.2.1/bin/ppc386 returned an error exitcode (normal if 
you did not specify a source file to be compiled)
The installer encountered the following error:
External command "/opt/fpc/bin/fpc" failed with exit code 1


Makefile's was so much easier!  :)
Or my custom method using in fpGUI:
   fpc @extrafpc.cfg <project.pas>


Regards,
   - Graeme -


_______________________________________________________
fpGUI - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/





More information about the fpc-devel mailing list