Well, there are some issues with building this package from scratch.
Free pascal requires the previous release (now 3.2.2) to bootstrap.
However, if I do
pacman -S fpc # old version providing fpcmake
make all -j 16
sudo make install
[/code]
Note that -j 16 doesn't do much, there is no per compilation unit parallelism, only per package(directory) level, and there is parallelism that way for about 4-6 cores. And to actually notice that if you need also pass FPMAKEOPT="-T 16" to instruct fpcmake to do so. The script does so automatically.
Also, if install is separate (and that is better, long term) you need to pass the generated compiler, not let it search in the path.
This script demonstrates some settings for a Athlon 200GE dual core processor. Most of the settings are in the first block, check them.
the resulting fpc (/usr/local/bin) still reports version 3.2.2
It searches for a ppcx64 in the same dir as the fpc binary ($prefix/bin) Usually this is a symlink to the real binary in $prefix/lib/fpc/<version>. Be careful though, the 3.2.2 installation might confuse things since packages often install /usr/lib
Also, the fpc.cfg (probably installed by 3.2.2) must point to the units (assume prefix is /usr/local) in /usr/local/lib/fpc/$fpcversion/units/x86_64-linux/*
where $fpcversion is a macro that gets automatically substituted by the version.
If I dare to
- deinstall the arch fpc-package, the installation in /usr/local/bin does not work anymore.
- deinstall the fpc-package before I do the make install, then the make insists on having an fpcmake in the path ...
That could work after the install. But I think the kicker is the install going wrong, and maybe the fpc.cfg (in /etc or as ~/.fpc.cfg depending on a global or per user install of the package) . Make a copy of that file before the deinstall of the distro package.
Then
- Restore the backed up fpc.cfg to /etc/fpc.cfg or ~/.fpc.cfg)
- fix the -Fu line in the fpc.cfg to your "make install" prefix and version if necessary. See the script (INSTALL_PREFIX)
- make sure /usr/local/bin (or whatever prefix) is in your $PATH
- Make sure a symlink from /usr/local/bin/ppcx64 to /usr/local/lib/fpc/3.3.1/ppcx64 exists
These are post install steps not done by the makefile install (to avoid messing up complex preexisting settings).
(* FPC -Miso *)
PROGRAM TRY(INPUT,OUTPUT);
TYPE
R = RECORD
I : INTEGER;
CASE BOOLEAN OF
TRUE: (J: INTEGER);
FALSE: (F: REAL)
END;
RP = ^R;
VAR
P : RP;
BEGIN
NEW(P,TRUE);
P^.I := 42;
P^.J := 7;
DISPOSE(P,TRUE);
NEW(P,FALSE);
P^.I := 42;
P^.F := 7.0;
DISPOSE(P,FALSE)
END.
That also compiles fine here with -Miso , I assume it is some version mixup.
If you have any problems, report back here or check this old but largely still valid PDF
http://www.stack.nl/~marcov/buildfaq.pdf for background info and more stepwise treatment