Sign in Join
Wiki copytemporary

fpcupdeluxe: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Overview
22
3-<img src="fpcupdeluxe.png" title="FPCUPdeluxe on Linux" width="300" />
3+![](/wiki-images/3/38/Fpcupdeluxe.png)
44
55**FPCUPdeluxe** is a GUI installer for FPC and Lazarus. It's based on [[fpcup]].
66
77- [GitHub repository](https://github.com/LongDirtyAnimAlf/fpcupdeluxe)
88- [Latest releases on GitHub](https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/latest)
99- [Lazarus Forum Topic](https://forum.lazarus.freepascal.org/index.php/topic,34645.0.html)
1010
1111## Installation of FPC and Lazarus
1212
1313The main purpose of fpcdeluxe is to provide a means for installing and updating multiple versions of FPC and Lazarus in a self-contained manner. Self-contained meaning that an install by fpcupdeluxe will have no influence on (interference with) your system: Hence you can install multiple versions of FPC and Lazarus.
1414
1515In order to have the installation working **you MUST use the generated link to start the install** !
1616
1717That launcher link contains a line like:
1818
1919`Exec=/P/s/lazarus/lazarus --pcp="/P/s/config_lazarus"`
2020
2121directing Lazarus to use the [[pcp]] , i.e. **primary configuration** setting **path** of "/P/s/config_lazarus" or a similar subdir under /home/ depending on you choice made from the GUI. No fpc or anything is required in the searchpath.
2222
2323### Prerequisites
2424
2525#### Debian, Raspbian, Mint gtk2
2626
2727actual working with Debian Buster and Raspbian Buster
2828
2929``` bash
3030#!/bin/bash
3131sudo apt-get update
3232sudo apt-get upgrade
3333
3434# Missing Packages
3535sudo apt-get install libx11-dev
3636sudo apt-get install libgdk-pixbuf2.0-dev
3737sudo apt-get install libpango1.0-dev
3838sudo apt-get install libgtk2.0-dev
3939
4040# if gdb is not installed (eg. Lubuntu)
4141sudo apt-get install gdb
4242
4343# GIT is the new SVN
4444sudo apt-get install git
4545```
4646
4747#### Debian qt5
4848
4949``` bash
5050#!/bin/bash
5151sudo apt-get update
5252sudo apt-get upgrade
5353
5454# Missing Packages
5555sudo apt install libqt5pas-dev
5656
5757# GIT is the new SVN
5858sudo apt-get install git
5959```
6060
6161See [[Qt5 Interface|Qt5_Interface#Linux]]
6262
6363#### Raspbian on RPi2
6464
6565You need to extend the swap see [[Lazarus on Raspberry Pi]]
6666
6767## Advanced settings
6868
69-<img src="fpcupdeluxe_advanced.png" title="FPCUPdeluxe advanced settings screen" width="400" />
69+![](/wiki-images/9/99/Fpcupdeluxe_advanced.png)
7070
7171The above screenshot (click Setup+ on mainscreen) shows the advanced settings of FPCUPdeluxe.
7272
7373Some examples of advanced settings:
7474
7575- for debugging FPC itself, add "-g -gl -O-" into the "FPC options" field.
7676- to apply a fix for FreeBSD x64 cross-compiler (which fixes FileExists/DirectoryExists functions on FreeBSD 12), press "Add FPC patch" and browse for relevant patch file.
7777
7878## Cross-compiling
7979
8080FPCUPdeluxe makes cross-compiling easy: activate "cross" UI tab, select a CPU and an OS, and press "Install compiler". If libraries and/or binary tools are needed, fpcupdeluxe will try to get them online.
8181
8282Use the link to see what is available at the moment:
8383
8484- [Linux 64bit binary toolchains](https://github.com/newpascal/fpcupdeluxe/releases/tag/linuxx64crossbins_v1.0)
8585- [Linux 32bit binary toolchains](https://github.com/newpascal/fpcupdeluxe/releases/tag/linuxi386crossbins_v1.0)
8686- [Windows binary toolchains](https://github.com/newpascal/fpcupdeluxe/releases/tag/wincrossbins_v1.0)
8787- [System libraries](https://github.com/newpascal/fpcupdeluxe/releases/tag/crosslibs_v1.0)
8888
8989### Cross-compiling from Windows and Linux towards Darwin: the hard way
9090
9191With the help of fpcupdeluxe, NewPascal or FPC trunk, and a toolset called osxcross/cctools-port, you can crosscompile towards Darwin. This help will concentrate on manually setting up crossing from Windows/Linux towards Darwin (fpcupdeluxe can also do all the auto-magic for you for crossing towards Darwin; see above).
9292
9393First, you will need to get osxcross/cctools-port, and compile it yourself.
9494
9595- [osxcross original](https://github.com/tpoechtrager/osxcross)\
9696 [osxcross for FPC](https://github.com/LongDirtyAnimAlf/osxcross)
9797- [cctools-port original](https://github.com/tpoechtrager/cctools-port)\
9898 [cctools-port for FPC](https://github.com/LongDirtyAnimAlf/cctools-port)
9999
100100For macOS, you will need the [osxcross for FPC](https://github.com/LongDirtyAnimAlf/osxcross) that has been adapted for use by FPC.
101101
102102For iOS/iPhone, you will need the [cctools-port for FPC](https://github.com/LongDirtyAnimAlf/cctools-port) that has been adapted for use by FPC.
103103
104104Get yourself a SDK, either from your own Mac, or from online sources: [Various Mac SDK's](https://github.com/phracker/MacOSX-SDKs/releases)
105105
106106SDKs for iPhone can also be obtained from online sources: [Various iPhone SDK's](https://github.com/theos/sdks)
107107
108108Build osxcross/cctools-port according to the instructions. For example, on Windows with Cygwin.
109109
110110> **Note:** Please note: to be able to cross from Windows towards Darwin, you need to have NewPascal or FPC trunk installed !
111111
112112Use fpcupdeluxe to install NewPascal or FPC trunk.
113113
114114Before building the cross-compiler, you need to inform fpcupdeluxe where to find the Darwin libs (SDK) and the binary tools (build by osxcross/cctools-port). The two screenshot below show how to proceed:
115115
116116- Choose a CPU-type and an OS (Darwin). Select custom. You should now be able to use the buttons and point fpcupdeluxe to the right locations.
117117
118-<img src="fpcupdeluxe_darwinlibs.JPG" title="Point fpcupdeluxe towards the library location" width="200" alt="Point fpcupdeluxe towards the library location" /> <img src="fpcupdeluxe_darwinbins.JPG" title="Point fpcupdeluxe towards the binary tools location" width="200" alt="Point fpcupdeluxe towards the binary tools location" />
118+![Point fpcupdeluxe towards the library location](/wiki-images/f/f5/Fpcupdeluxe_darwinlibs.JPG) ![Point fpcupdeluxe towards the binary tools location](/wiki-images/3/31/Fpcupdeluxe_darwinbins.JPG)
119119
120120- Now, on the mainscreen, you can select your CPU and OS (Darwin) and build the cross-compiler !
121121- **Again, fpcupdeluxe also has pre-built tools for crossing towards Darwin: using the fpcupdeluxe-auto-magic will be the easiest !!!**
122122
123123### Caveats, observations, troubleshooting
124124
125125- It was observed, that **f.** often times works on first run on an empty install dir, but subsequents runs, i.e. in order to add controls to the pallette, add the .chm [[help]] system asf., often times fail. In case of failure to recompile / [[make]] the IDE, the Lazarus binary may be gone, so unless you made a file backup earlier, you cannot start Lazarus anymore.
126126- copy and save the logfile for reference / troubleshoot.
127127- adding the [[help]] system is easy: just tag it under "advanced settings", saving some manual labour.
128128- it takes about 10 minutes to make a full new install of fpc + Laz.
129129- try out new --pcp settings to get a feeling for it, you can always delete the config and start anew (save the pristine fresh content of the --pcp dir right after install).
130130- Sometimes, fpcupdeluxe hangs when it cannot download OpenSSL library. It's chicken-egg problem - OpenSSL is needed to download from https, so fpcupdeluxe cannot download OpenSSL without OpenSSL. Fpcupdeluxe has its strategy to overcome this, but sometimes it fails. Then, try this workaround - in fpcupdeluxe go to "Extras" tab and click on "get OpenSSL by browser", then unpack the downloaded file to fpcupdeluxe folder (where fpcupdeluxe.exe is located). Now, try again.
131131
132132## Launching an installed Lazarus and fpc instance
133133
134134For launching the Lazarus GUI, a script is created (in the users home directory) and a launcher (on the desktop) which opens Lazarus with the correct config path & environment. Example, on Linux if installing to a folder named "/home/user/trunk", fpcupdeluxe creates:
135135
136136` /home/user/Desktop/Lazarus_trunk.desktop (launcher)`\
137137` /home/user/Lazarus_trunk  (shell script)`
138138
139139For Linux FPC/lazbuild command line work the following shell script can be used (assumes a bash shell and using example install dir of "/home/user/trunk"):
140140
141141``` bash
142142 #!/bin/sh
143143 # fpcupdeluxe: FPC home startlink script
144144 export PATH="/home/user/trunk/fpc/bin/x86_64-linux:/home/user/trunk/lazarus:${PATH}"
145145 export PPC_CONFIG_PATH="/home/user/trunk/fpc/bin/x86_64-linux"
146146 exec /bin/bash
147147```
148148
149149Windows equivalent batch file for setting up environment for working from command line (using example install dir of "f:\trunk"):
150150
151151```batch
152152 REM fpcupdeluxe: FPC home startlink script
153153 SET PATH=F:\trunk\fpc\bin\x86_64-win64;F:\trunk\lazarus;%PATH%
154154 SET PPC_CONFIG_PATH=F:\trunk\fpc\bin\x86_64-win64
155155 cmd.exe
156156```
157157
158158> **Note:** Setting the paths this way is not global and only effects the current terminal shell and child shells.
159159
160160## clang compilation error
161161
162162On compiling for macOS target on Linux, you can see this error:
163163
164164`clang: error: invalid version number in '-target arm64-apple-macosx11.0.0'`
165165
166166Usually it happens on old systems, e.g. Ubuntu 20.04. This is fixable.
167167
168168- Install package "clang-12" in package manager
169169- Go to /usr/bin and see all clang* symlinks. "clang" is symlink to Clang-10, and "clang-12" is symlink to Clang-12. Adjust symlinks so that "clang" points to Clang-12.
170170
171171 user@PC:~$ ls -l /usr/bin/clang*
172172 lrwxrwxrwx 1 root root 24 ноя 7 22:00 /usr/bin/clang -> ../lib/llvm-12/bin/clang
173173 lrwxrwxrwx 1 root root 26 мар 20 2020 /usr/bin/clang++ -> ../lib/llvm-10/bin/clang++
174174 lrwxrwxrwx 1 root root 26 апр 20 2020 /usr/bin/clang++-10 -> ../lib/llvm-10/bin/clang++
175175 lrwxrwxrwx 1 root root 24 апр 20 2020 /usr/bin/clang-10 -> ../lib/llvm-10/bin/clang
176176 lrwxrwxrwx 1 root root 26 мар 8 2022 /usr/bin/clang++-12 -> ../lib/llvm-12/bin/clang++
177177 lrwxrwxrwx 1 root root 24 мар 8 2022 /usr/bin/clang-12 -> ../lib/llvm-12/bin/clang
178178 lrwxrwxrwx 1 root root 28 апр 20 2020 /usr/bin/clang-cpp-10 -> ../lib/llvm-10/bin/clang-cpp
179179 lrwxrwxrwx 1 root root 28 мар 8 2022 /usr/bin/clang-cpp-12 -> ../lib/llvm-12/bin/clang-cpp
180180
181181## External links
182182
183183- See in depth guide for *BUILD / MAKE*: [Build FAQ](http://www.stack.nl/~marcov/buildfaq.pdf)
184184- [Fpcup by Reinier](http://wiki.lazarus.freepascal.org/fpcup)
185185- [Fpcupdeluxe source](https://github.com/newpascal/fpcupdeluxe)
186186- [Latest release](https://github.com/newpascal/fpcupdeluxe/releases/latest)
187187- [NewPascal](http://newpascal.org)
188188
189189---
190190*From the Free Pascal wiki, page "fpcupdeluxe", as it stood on 2023-11-08 after a change by Alextpp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history