[fpc-devel] Lazarus 1.0 and fpc 2.6 do not install on popular distributions

Giuliano Colla giuliano.colla at fastwebnet.it
Thu Nov 22 23:27:47 CET 2012


Hi fpc and Lazarus developers.

I just discovered that Lazarus 1.0.x and fpc 2.6 do not install out of 
the box on widely used distributions such as RHEL 5.8, CentOs 5.8, and 
Suse Enterprise 10.1.
They're the most popular enterprise versions, which should be an 
important target for Lazarus and fpc diffusion. Paying customers are there!
I purchased an HP laptop just a few weeks ago, and the preinstalled OS 
was Suse Enterprise 10.1.
As the current policy of enterprise distro's is to provide a longer life 
cycle (Red Hat, followed by CentOs now provides a 10 years life cycle) 
the problem will stay there for a long time, unless some simple steps 
are taken.

The first problem is the rpm format: rpm's are generated with a recent 
version, which provides a higher compression level (lzma), but which 
isn't supported by the previous rpm versions. Using a graphic interface 
installer will not give any clue, just signaling an "unknown error".
Anybody not stubborn enough will believe that the files are corrupted, 
and will give up, thinking that Lazarus and fpc are shit.
Only by switching to command line, and trying to interpret the rather 
cryptic messages, one can understand the problem.
The solution is to download the rpm's on a very recent distro, and use 
rpmrebuild to rebuild the rpm's with a more widely supported compression 
format (gz or bz2).

If one gets there, he will discover that there are no unsatisfied 
dependencies, that all relevant libraries are available, and he'll 
boldly try to compile his first "hello world".

And he'll stumble in the second problem: the "hello world" program won't 
compile, because of an ld error: unknown option --build-id.
Again anybody not stubborn enough will give up, instead of editing 
fpg.cfg which enables by default the build-id option, unsupported by the 
ld version of those distributions.

An experienced user can easily be told to use rpmrebuild, and to comment 
out the -k--build-id line on fpc.cfg, but that's hardly the way to 
encourage new users.

Just by setting

CPACK_RPM_SPEC_MORE_DEFINE

to

%define _binary_payload w9.bzdio

or

%define _binary_payload w9.gzdio

into the rpm SPEC, and commenting out the -kbuild-id line on the fpc.cfg 
file, one can make available rpm's which will install almost anywhere, 
at the price of slightly longer files, and of letting the experts who 
need the build-id option the burden to uncomment the line, if appropriate.

If it's desirable to widen the usage of fpc and Lazarus, anything that 
can discourage first time users should be avoided.

Giuliano








More information about the fpc-devel mailing list