Difference between revisions of "fpcup"

From Free Pascal wiki
Jump to navigationJump to search
Line 98: Line 98:
 
# fpcup version (as printed in its output)
 
# fpcup version (as printed in its output)
 
# description of what went wrong/error messge
 
# description of what went wrong/error messge
# run fpcup with the <code>--verbose --noconfirm</code> arguments (or the equivalents in settings.ini) as well as the other arguments you used, redirect the output to file, and attach the file, e.g.: <syntaxhighlight lang=bash>fpcup --verbose --noconfirm > fpcupverbose.txt</syntaxhighlight>
+
# run fpcup with the <code>--verbose --noconfirm</code> arguments (or the equivalents in settings.ini) as well as the other arguments you used, redirect the output to file, and attach the file, e.g.: <syntaxhighlight lang=bash>fpcup --verbose --noconfirm > fpcupverbose.txt</syntaxhighlight>; if you post on the forum, please zip it and attach the result to your post
  
 
You can report bugs on the forum or directly on the issue tracker:
 
You can report bugs on the forum or directly on the issue tracker:

Revision as of 12:17, 12 November 2013

About

fpcup is a tool that automates running a subversion client to build FPC and/or Lazarus in a self-contained directory structure.

On Windows, it can also serve as a "bare metal" installer: it can download a subversion client, binutils (make.exe etc).

fpcup allows maintaining multiple different FPC/Lazarus combinations.

Documentation

fpcup has a -h option, a readme.txt and fpcup.html with development notes.

To make it easier to get user contributions for documentation/tips, this wiki page has been created. Please feel free to add your own examples etc.

Cross compilers

When you want to run a cross compiler, you need to have the relevant binutils that are specific for the host<>target system.

Often, you will also need libraries in target system format if you want to compile programs (e.g. Linux Qt or Gtk libraries for the relevant CPU if you're crosscompiling for Linux).

When you run a crosscompiler, fpcup briefly checks if it can find required binutils and libraries and will warn you if they can't be found.

Working cross compilers:

From\To

DOS

GO32v2

Windows x86

Windows x64

Linux x64

Linux x86

FreeBSD x64

FreeBSD x86

Windows x86

needs FPC trunk

yes, built in

N/A

yes

needs binutils,libs

needs binutils,libs

  

Windows x64

no

needs binutils

yes

N/A

needs binutils,libs

needs binutils,libs

  

Linux x64

no

   

N/A

 

no plans

no plans

Linux x86

     

N/A

no plans

no plans

FreeBSD x64

no

no plans

      

FreeBSD x86

 

no plans

      

Tips

DOS crosscompiler

Using 32 bit fpcup.exe on Windows, once you have set up a regular FPC trunk/2.7.1 compiler, you can add a DOS cross compiler. Note: the DOS cross compiler is still in development.

Required files

Download the required binaries as mentioned in DOS, currently:

msdos-nasm.exe
msdos-wlib.exe
msdos-wlink.exe
nasm.exe
wlibd.dll
wlinkd.dll
wlsystem.lnk

and put them in your cross binutils directory for the right platform - e.g. on a standard Windows fpcup install:

c:\development\cross\bin\i8086-msdos

There are no files needed in the corresponding library directory,

C:\development\cross\lib\i8086-msdos

Settings

Open your settings file or add a new file, settings.ini:

[dos]
; dos cross compiler
; a full fpcup run must have been done before
; please adjust paths etc
fpcdir=c:\development\fpctrunk
fpcurl=http://svn.freepascal.org/svn/fpc/trunk
fpcopt=""
fpcuplinkname=""
lazlinkname=""
binutilsdir=c:\development\fpcbootstrap
fpcbootstrapdir=c:\development\fpcbootstrap
cputarget=i8086
ostarget=msdos
verbose=0
; We only need an FPC here; assume FPC has been updated by regular update
only=FPCBuildOnly

Then generate the cross compiler with

fpcup --inifile=settings.ini --inisection=dos

Now you can run a test compile, compiling a file test.pas with

fpc -Pi8086 -TMSDOS test.pas

(your fpc.cfg will have been modified to use DOS medium memory model, smartlinking etc)

Avoid lengthy lcl.chm documentation generation

By default, fpcup tries to compile the $(lazarusdir)\docs\chm\lcl.chm Lazarus help file every day or so. This can take a long time due to the fpdoc being quite slow.

You can avoid compiling lcl.chm by generating it one time (or copying over an existing file) and making the file read-only.

Download

The official site is at: https://bitbucket.org/reiniero/fpcup/downloads

License

fpcup is open source software released under the LGPL with linking exception (same as FreePascal/LCL).

Support and bug reporting

Please post support requests on the forum (e.g. in the thread dedicated to FPCUP in the Third-Party announcements section).

If you report problems, please be sure to mention

  1. operating system
  2. fpcup version (as printed in its output)
  3. description of what went wrong/error messge
  4. run fpcup with the --verbose --noconfirm arguments (or the equivalents in settings.ini) as well as the other arguments you used, redirect the output to file, and attach the file, e.g.:
    fpcup --verbose --noconfirm > fpcupverbose.txt
    
    ; if you post on the forum, please zip it and attach the result to your post

You can report bugs on the forum or directly on the issue tracker: https://bitbucket.org/reiniero/fpcup/issues?status=new&status=open

Current progress

  • Support for Windows 2000-7 (untested, probably works on 8). Bare metal install currently needs MS Visual C++ runtime for the subversion client.
  • Linux x86: works
  • Linux x64: works
  • OSX 10.?: experimental support
  • FreeBSD 9: lightly tested; seems to work

Changelog

This log tracks fpcup binaries as available on the download page. Note that not all binaries may be updated at the same time; fpcup prints a version string at the beginning which you can check.

For more details, please see the Mercurial commit log in https://bitbucket.org/reiniero/fpcup/commits/all

  • 20131023: Win32=>DOS crosscompiler support for FPC trunk

Earlier releases: please see the fpcup forum thread dedicated in the Third-Party announcements section