Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-08

FPC 3.0.0-rc1 release

67 messages · 12 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

Hello

We have placed the first release candidate of the Free Pascal Compiler version 3.0.0 on our ftp servers.

You can help improve the upcoming 3.0.0 release by downloading and testing this release. If you want you can report what you have done here: http://wiki.freepascal.org/Testers_3.0.0

New features are listed at
http://wiki.freepascal.org/FPC_New_Features_3.0

Changes that may break backwards compatibility are documented at http://wiki.freepascal.org/User_Changes_3.0.0

Issues with this release candidate that we already know of are listed in the wiki: http://wiki.freepascal.org/Issues_3.0.0

A preview of the 3.0.0 docs is available at
http://www.freepascal.org/docs-html/3.0.0/

Downloads are available at:
* ftp://freepascal.stack.nl/pub/fpc/beta/3.0.0-rc1
* ftp://gd.tuwien.ac.at/languages/pascal/fpc/beta/3.0.0-rc1
* ftp://ftp.freepascal.org/pub/fpc/beta/3.0.0-rc1

Enjoy!

The Free Pascal Compiler Team

Free Pascal Compiler

Version 3.0.0-rc1

****************************************************************************
* Introduction
****************************************************************************

Please also read the platform specific README file, if it exists.

This package contains an advanced freeware 32-bit/64-bit/16-bit pascal compiler for several platforms. The language and the runtime library are almost compatible with Turbo Pascal 7.0 and recent Delphi releases. There is also partial support for the Macintosh pascal dialect.

News and changes related to this release are described in whatsnew.txt.

Free Pascal 3.0.0 is currently available for the following platforms:
- Linux-i386
- Linux-x86_64 (amd64)
- Linux-powerpc
- Linux-sparc
- Linux-ARM
- Win32-i386 (Win95/98/Me/XP/2000/2003/Vista/7 and WinNT)
- Win64-x86_64 (XP/Vista/2003)
- Wince-ARM (cross compiled from win32-i386)
- FreeBSD-i386
- FreeBSD-x86_64
- Mac OS X/Darwin for PowerPC (32 and 64 bit)
- Mac OS X/Darwin for Intel (32 and 64 bit)
- iOS, iPhoneSimulator
- OS/2-i386 (OS/2 Warp v3.0, 4.0, WarpServer for e-Business and eComStation)
- GO32v2-i386

There are other platforms (like other BSD variants) which are more or less working, but there is currently no maintainer for them and thus we cannot provide adequate support. If you want to change this and create and maintain versions for other platforms and targets, feel free to contact us, e-mail addresses are listed below.

****************************************************************************
* Features
****************************************************************************

- high speed compiler
- fully 16, 32 or 64-bit code
- 32 bit compiler can be used on x86_64 Linux distributions to compile 32 bit applications
- language features:
- almost fully compatible with Borland Pascal and Borland Delphi
- ansi strings
- wide strings
- exception support
- RTTI support
- procedure overloading
- generics (experimental)
- operator overloading
- COM, CORBA and raw interfaces support
- dynamic array support
- variant support
- inlining
- code optimizer:
- peephole optimizer (80x86 only)
- jump optimizer
- loading of variables into registers
- assembler level dataflow analyzer (80x86 only)
- stack frame eliminations
- sophisticated register allocator
- integrated BASM (built-in assembler) parser
- supports ATT syntax used by GNU C
- supports Intel syntax used by Turbo Pascal (80x86-only)
- can compile code into assembler source code for these assemblers:
- GNU Assembler (GAS)
- Netwide assembler (Nasm)
- Microsoft Assembler/Turbo Assembler (Masm/Tasm)
- Watcom assembler (wasm)
- internal assembler for ultra fast object file generation
- can call external C code
- h2pas utility to convert .h files to Pascal units
- smart linking (also known as dead code stripping)
- support for the GNU debugger
- integrated development environment (disabled by default on Mac OS X)
- powerful user friendly Wordstar compatible multi file editor
- context sensitive help supports help files in HTML, Windows HLP and Borland TPH format.
- debugger on most platforms
- can create binaries running natively under both DOS and OS/2 (EMX version)
- no need for Linux distribution specific binaries, programs you write run on all distributions
- high quality documentation

****************************************************************************
* Minimum requirements
****************************************************************************

i386, x86_64, PowerPC or Sparc processor
Win32:
- MS Windows NT/2000/2003/XP/Vista/7 (Win95, 98 and ME are not supported in FPC officially any longer).
- 16 MB RAM
OS/2:
- OS/2 Warp v3.0 with one of late fixpaks - FP 35 should be fine, OS/2 Warp v4.0 with FP 5 and above, WSeB, MCP or any eComStation version (OS/2 2.0/2.1 currently not supported, not even for compiled programs).
- Certain features (e.g. Unicode support in the RTL) require proper support
only available in later OS/2 versions (at least OS/2 Warp 4.0 FP14), otherwise the functionality may be limited (but the binaries still work even on the older versions, albeit with some limitations). Linux:
- system running a 2.4.x kernel
FreeBSD:
- There are separate releases for FreeBSD 7.x system or 8.x system. The code works on 6.x too. Older versions might need specific adaptations. Mac OS X:
- Mac OS X 10.4 and higher
Mac OS (classic)
- Mac OS 9.2 has been tested, should probably also work from 7.5.3 and up.

****************************************************************************
* Quick start - Win32
****************************************************************************

Download the distribution package (fpc-3.0.0.i386-win32.exe) and run it
- it is a self-extracting installer, so just follow the instructions to install it. The installer should set the PATH environment variable as appropriate.

To test the compiler, change to the demo\texts directory of the FPC tree and type on the command line:
fpc hello
hello

****************************************************************************
* Quick start - DOS
****************************************************************************

Download distribution archive (dos300.zip for GO32v2) and unzip it into a temporary directory.

Start the install program INSTALL.EXE and follow the instructions.

Don't forget to set PATH as mentioned by the install program. If running under plain DOS, this can be done by opening file named AUTOEXEC.BAT located in the root directory of your boot drive (usually C:\) with a plain text editor (like EDIT.COM), extending the line starting with "set PATH=" (case insensitive) with path to newly installed binaries (installation root as selected in the installation program appended with "\BIN\GO32v2") and save it.

To test the compiler, change to the demo\texts directory of the FPC tree and type
fpc hello
hello

****************************************************************************
* Quick start - OS/2 / eComStation
****************************************************************************

Download distribution archive (os2300.zip for OS/2 or eComStation) and unzip it into a temporary directory.

Start the install program INSTALL.EXE and follow the instructions.

Don't forget to set PATH and LIBPATH as mentioned by the install program. This can be done by opening file named CONFIG.SYS located in the root directory of your boot drive (e.g. C:\) with a plain text editor (e.g. E.EXE), extending the lines starting with "set PATH=" and "LIBPATH=" (both are case insensitive) with path to newly installed binaries (installation root as selected in the installation program appended with "\BIN\OS2" for PATH and "\DLL" for LIBPATH) and save it again as a plain text file. Note that changes to LIBPATH require restart of your machine in order to come
into effect.

To test the compiler, change to the demo\texts directory of the FPC tree and type
fpc hello
hello

****************************************************************************
* Quick start - Linux/FreeBSD
****************************************************************************

Download fpc-3.0.0.<cpu>-<os>.tar and untar into a temporary directory.

Start the install script with ./install.sh and follow the instructions.

To test the compiler, change to the demo/texts directory of the FPC tree and type
fpc hello
hello

****************************************************************************
* Quick start - Mac OS X/Darwin
****************************************************************************

Xcode must be installed before FPC is installed. In case of Xcode 4.3 and later, additionally install the "Command Line Tools" by going to "Preferences" and then "Downloads".

There are two methods to install Free Pascal for Mac OS X.

1) Download and install the Mac OS X package (fpc-3.0.0.powerpc-macosx.dmg)

This gives you the Free Pascal Compiler and the Xcode integration kit.

2) Install fpc using fink

This gives you the Free Pascal Compiler, including all libraries, packages and units from its sources, including Free Vision and the IDE, which partly works using X11 xterm.

With method 1 follow the instructions to install the XCode integration kit at:

http://www.freepascal.org/xcode.html

Method 2 is mainly meant for using the compiler through the command line. Fink takes care of setting the PATH variable. You can also use the command line with Free Pascal installed using method 1. The main point is to change your PATH as described below:

The compiler is called "fpc" and will be installed in /usr/local/bin. This directory may not be in your PATH yet (if you type "fpc" in a Terminal window and you get something like "fpc: command not found", then it isn't). If the installation directory is not yet in your PATH, you will have to add it. To get an idea, how to do this, follow the instructions at:

"http://fink.sourceforge.net/doc/users-guide/install.php#setup"

to determine which file you have to edit, but instead of adding the line suggested there, add the following at the end:

- if your shell is the Bourne shell (bash):

export PATH=/usr/local/bin:$PATH

When using Terminal.app add this to ".bash_profile", when using the X11 xterm add this to ".bashrc".
If these files do not exist yet in your home directory, you have to create them, for example with nano (or any other text editor):

nano .bash_profile

- if your shell is the C Shell (csh or tcsh):

setenv PATH /usr/local/bin:${PATH}

Next, close the Terminal window and open a new one. Now, the PATH should be set correctly. After installing the package, you can write your source code in your favorite editor (including Project Builder and XCode). To compile something, go to the directory containing your source files in Terminal and type:

fpc name_of_your_source_file

The compiler only accepts one file name as argument, but will automatically search for and compile any units used by the specified source file. Run "fpc" without any arguments to get an overview of the possible command line options.

****************************************************************************
* Documentation
****************************************************************************

The documentation is available as HTML pages, PDF, PS, and text although the recommended format is pdf. The latest PDF version is available on ftp://ftp.freepascal.org/fpc/dist/docs-pdf/, other formats are available for download in the directory of the respective distributed release.

NB that there is at present no FPC specific documentation for the platform specific API (like Win32 system functions, etc.). There is a note in the ftp /doc explaining where MS help file documenting Win32 API can be obtained, other platforms (especially Unix-based ones) often come with this documentation included in system installation.

****************************************************************************
* Suggestions, Help, Bug reporting, snapshots, ... ****************************************************************************

Suggestions, Help ...
---------------------
e-mail: (bugs, developer related questions)
e-mail: (general pascal related questions)

Both these adresses are for mailing lists. If you're not subscribed, be sure to mention this fact when sending questions to these lists, so that people sending answers know about it and send you a copy. Information about available lists and subscription can be found on http://lists.freepascal.org/mailman/listinfo

Combined with Lazarus, an IDE for the Free Pascal Compiler: Web forum: http://forum.lazarus.freepascal.org (all questions) Wiki: http://wiki.freepascal.org

WWW: http://www.freepascal.org
FTP: ftp://ftp.freepascal.org/fpc
(several mirrors exist, see website for links)

Additional information about mailing lists, news, future plans etc. can be found on the web site.

SNAPSHOTS & SOURCES
-------------------
One of the features of FPC is the snapshots. These are made daily or weekly from the developers' latest versions of the source. Snapshots are available for GO32v2, Win32, OS/2 and Linux versions. The latest snapshots are in: ftp://ftp.freepascal.org/fpc/snapshot/ in appropriately named .zip/tar files.

You will also normally find in the snapshot archive file a readme, with a note about the latest included changes. It is quite common, though it doesn't always happen, that when a bug is reported it is fixed and a fixed version can be obtained the NEXT day in the appropriate snapshot.... yes really!

Also on the ftp site you'll find a /dist directory, with the latest distributed releases, a /docs directory, and a /snapshot/<version>/source directory, in which every night at about 0100 GMT the latest source generated by the developers during the day & evening before is exported from SVN into ZIP file fpc.zip.

Making your own snapshots
-------------------------
By downloading the /source files (makefiles are included) it is possible to make your own version of the fpc compiler/rtl and to modify it. You are of course free to do this so as long as you observe the licence conditions. In order to make the compiler/rtl & IDE in a resonable time (eg <30 minutes) you'll need at least 32 MB of physical memory (64 MB is better), at least a 200 MHz processor and at least 100 MB of free disk space. You'll also need some knowledge of makefiles & programming... it is not difficult but it isn't easy either!

REPORTING BUGS
----------------
If you find a bug in the released version, you may want to try a snapshot (see SNAPSHOTS above) to see if it has been fixed before reporting it to the fpc-devel mailing list.

If you find a fault or 'feature' in a release, please report it either using the bug reporting interface at http://bugs.freepascal.org, or to the fpc-devel mailing list. PLEASE ALWAYS INCLUDE A COMPILABLE CODE FRAGMENT that can be used to reproduce the problem (or a link to larger archive if it cannot be reproduced with small example). Also state the FPC version, target platform (Win32, Linux, ...), operating system version (XP, Ubuntu 12.04, ...), the used compiler options and any other useful info so the developers can reproduce the problem. Otherwise they may not be able to fix it.

****************************************************************************
* License
****************************************************************************

The compiler and most utilities and executables distributed in this package fall under the GPL, for more information read the file COPYING.v2.

Some specific utilities and programs come under the license described in COPYING.v3, COPYING.DJ, COPYING.EMX, COPYING.RSX and licensez.ip.

FPC for JVM comes with some third party tools which are convered by the following licenses:
- jasmin.jar comes under the license described in jasminli.txt
- bcel-6.0-SNAPSHOT.jar comes under the Apache 2.0 license, described by apache2.txt

Some of the licenses of the third party tools require to make the source available. If you cannot find the sources or information where to find them for a certain tool under such a license included into the FPC distribution, please contact us through the contact details given at http://www.freepascal.org/moreinfo.var and we will provide you the sources or information where to find them.

The documentation, unless otherwise noted, is distributed as free text, and is distributed under the GNU Library General Public License as found in file COPYING.

The runtime library, package libraries, free component library, and other libraries which are used to create executables by the compiler come under a modified GNU Library General Public license. Additional information about the library license is found in COPYING.FPC.

License conditions for DPMI provider for GO32v2 version (CWSDPMI.EXE) can be found in cwsdpmi.txt, sources and/or binary updates may be downloaded from http://clio.rice.edu/cwsdpmi/.

The DOS version (go32v2) contains some binaries of DJGPP. You can obtain the full DJGPP package at: http://www.delorie.com/djgpp/

NOTE: OS/2 version of the installer uses the library UNZIP32.DLL from Info-ZIP. Info-ZIP's software (Zip, UnZip and related utilities) is free and can be obtained as source code or executables from Internet/WWW sites, including http://www.info-zip.org.

Reply by email

Mark Morgan Lloyd
Joost van der Sluis wrote 25 lines
Hello We have placed the first release candidate of the Free Pascal Compiler version 3.0.0 on our ftp servers. You can help improve the upcoming 3.0.0 release by downloading and testing this release. If you want you can report what you have done here: http://wiki.freepascal.org/Testers_3.0.0 New features are listed at http://wiki.freepascal.org/FPC_New_Features_3.0 Changes that may break backwards compatibility are documented at http://wiki.freepascal.org/User_Changes_3.0.0 Issues with this release candidate that we already know of are listed in the wiki: http://wiki.freepascal.org/Issues_3.0.0 A preview of the 3.0.0 docs is available at http://www.freepascal.org/docs-html/3.0.0/ Downloads are available at: * ftp://freepascal.stack.nl/pub/fpc/beta/3.0.0-rc1 * ftp://gd.tuwien.ac.at/languages/pascal/fpc/beta/3.0.0-rc1 * ftp://ftp.freepascal.org/pub/fpc/beta/3.0.0-rc1

Is there a native ARM version compatible with the Raspberry Pi?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Ched
to Mark Morgan Lloyd

Hello,

I strongly discourage the use of {$optimization deadstore} which induced strong numerical errors on our
solar system calculations (i386 linux). The other new ones
    {$optimization deadvalues}
    {$optimization orderfields}
    {$optimization fastmath}
    {$optimization constprop}
seem to be ok.

Unfortunately, deadstore will be difficult to debug with the actual code (>100000 lines).

Kindest regards, Raoul

Mark Morgan Lloyd wrote 29 lines
Joost van der Sluis wrote: > Hello > > We have placed the first release candidate of the Free Pascal Compiler > version 3.0.0 on our ftp servers. > > You can help improve the upcoming 3.0.0 release by downloading and > testing this release. If you want you can report what you have done here: > http://wiki.freepascal.org/Testers_3.0.0 > > New features are listed at > http://wiki.freepascal.org/FPC_New_Features_3.0 > > Changes that may break backwards compatibility are documented at > http://wiki.freepascal.org/User_Changes_3.0.0 > > Issues with this release candidate that we already know of are listed in > the wiki: http://wiki.freepascal.org/Issues_3.0.0 > > A preview of the 3.0.0 docs is available at > http://www.freepascal.org/docs-html/3.0.0/ > > Downloads are available at: > * ftp://freepascal.stack.nl/pub/fpc/beta/3.0.0-rc1 > * ftp://gd.tuwien.ac.at/languages/pascal/fpc/beta/3.0.0-rc1 > * ftp://ftp.freepascal.org/pub/fpc/beta/3.0.0-rc1 Is there a native ARM version compatible with the Raspberry Pi?

Reply by email

Martin Schreiber
to Mark Morgan Lloyd: Is there a native ARM version compatible with the Raspberry Pi? Mark Morgan Lloyd markMLl…
Mark Morgan Lloyd wrote
Is there a native ARM version compatible with the Raspberry Pi?

Here:
http://sourceforge.net/projects/mseide-msegui/files/fpcarm/

Please run eabihf/lib/fpc/3.0.1/samplecfg in order to create a default configuration file.

Cross development environment Linux X86 -> Raspberry Pi is here: http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/crossfpc-i386_linux_eabihf_3_0_1.tar.gz/download

How cross development looks in MSEide:
http://mseide-msegui.sourceforge.net/pics/crossarm.png

Martin

Reply by email

Mark Morgan Lloyd
to Martin Schreiber
Martin Schreiber wrote 14 lines
On Wednesday 26 August 2015 20:14:09 Mark Morgan Lloyd wrote: > Is there a native ARM version compatible with the Raspberry Pi? Here: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ Please run eabihf/lib/fpc/3.0.1/samplecfg in order to create a default configuration file. Cross development environment Linux X86 -> Raspberry Pi is here: http://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/crossfpc-i386_linux_eabihf_3_0_1.tar.gz/download How cross development looks in MSEide: http://mseide-msegui.sourceforge.net/pics/crossarm.png

Thanks Martin, I'll
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Michael Van Canneyt
to Géza Kovacs Géza
Géza Kovacs Géza wrote 8 lines
Hi All, The sound procedure does not work in FPC 3.0.0-rc1. I tested it under Linux. Under Windows, it works only with the WinCRT unit. But under linux, there is not an alternative. It was my problem with the recent 2.6 version too. Can you resolve the sound procedure to work well platform independently?

Surely not for 3.0.

In general, the sound procedure should not be used, there are better ways of producing sound.

Michael.

Reply by email

Mark Morgan Lloyd
to Martin Schreiber: Here: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ Please run…
Martin Schreiber wrote 8 lines
On Wednesday 26 August 2015 20:14:09 Mark Morgan Lloyd wrote: > Is there a native ARM version compatible with the Raspberry Pi? Here: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ Please run eabihf/lib/fpc/3.0.1/samplecfg in order to create a default configuration file.

/usr/local/lib/fpc/3.0.1/samplecfg: fpcmkcfg: not found # ls /usr/local/lib/fpc/3.0.1
fpmkinst msg ppcarm samplecfg units
# ls /usr/local/bin
fpc fpc.d fpc-filter-vt mkarmins mkx86ins ppcarm ppcarm-3.0.1 ppudump ppufiles ppumove

..but appears OK with a standard fpc.cfg.

Has problems rebuilding 3.0.0 rc1 from source:

/bin/mv -f ppcarm ppc2
make 'FPC=/usr/local/src/fpc/fpcbuild-3.0.0-rc1/fpcsrc/compiler/ppc2' 'OLDFPC=/usr/local/src/fpc/fpcbuild-3.0.0-rc1/fpcsrc/compiler/ppc1' next CYCLELEVEL=3
An unhandled exception occurred at $00087480:
EAccessViolation: Access violation
$00087480 TMESSAGE__GET, line 445 of cmsgs.pas
$00057754 MESSAGE, line 767 of verbose.pas
$0004F574 COMPILE, line 370 of compiler.pas
$00008384 main, line 246 of pp.pas

That happens several times until the make bombs. Original command line was

make OVERRIDEVERSIONCHECK=1 NO_GDB=1 OPT='-V3.0.1 -dFPC_ARMHF -O- -gl -Xs-' all

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Martin Schreiber
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 11 lines
Martin Schreiber wrote: > On Wednesday 26 August 2015 20:14:09 Mark Morgan Lloyd wrote: >> Is there a native ARM version compatible with the Raspberry Pi? > > Here: > http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ > > Please run eabihf/lib/fpc/3.0.1/samplecfg in order to create a default > configuration file. /usr/local/lib/fpc/3.0.1/samplecfg: fpcmkcfg: not found

I don't know where to get fpcmkcfg, in my RPI installation it probably has been installed by "apt-get install fpc" which installs FPC 2.6.0.

[...]

Show quoted text 17 lines
Has problems rebuilding 3.0.0 rc1 from source: /bin/mv -f ppcarm ppc2 make 'FPC=/usr/local/src/fpc/fpcbuild-3.0.0-rc1/fpcsrc/compiler/ppc2' 'OLDFPC=/usr/local/src/fpc/fpcbuild-3.0.0-rc1/fpcsrc/compiler/ppc1' next CYCLELEVEL=3 An unhandled exception occurred at $00087480: EAccessViolation: Access violation $00087480 TMESSAGE__GET, line 445 of cmsgs.pas $00057754 MESSAGE, line 767 of verbose.pas $0004F574 COMPILE, line 370 of compiler.pas $00008384 main, line 246 of pp.pas That happens several times until the make bombs. Original command line was make OVERRIDEVERSIONCHECK=1 NO_GDB=1 OPT='-V3.0.1 -dFPC_ARMHF -O- -gl -Xs-' all

"
make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all
"
in a fixes_3_0 checkout works for me.
A FPC version with debug info is here:
https://sourceforge.net/projects/mseide-msegui/files/fpcarm/

Martin

Reply by email

Jonas Maebe
to Martin Schreiber
Martin Schreiber wrote 5 lines
" make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all " in a fixes_3_0 checkout works for me.

Note that Mark is building 3.0.0rc1, not fixes_3_0. Building an older revision with a compiler built from a newer revision is never supported (although in this very specific case, it might work since there are barely any differences between 3.0.0rc1 and the current fixes_3_0 branch).

In any case: you should have to pass OPT="-dFPC_ARMHF" to get an armhf compiler (even if you already start with an armhf compiler). I haven't updated the compiler readme yet, but I've at least mentioned this in the mean time at
http://wiki.freepascal.org/FPC_New_Features_3.0#Support_for_the_armhf_EABI

Jonas

Reply by email

John Lee
to Martin Schreiber: I don't know where to get fpcmkcfg, in my RPI installation it probably has been installed…

Just downloaded the non debug version onto my rpi 2. Extracted - 6 files in /bin, including fpc but it is 2.6.4 not 3.0. Any ideas? Is there a rc1 .gz anywhere?

John

Martin Schreiber wrote 52 lines
On Friday 28 August 2015 10:30:24 Mark Morgan Lloyd wrote: > Martin Schreiber wrote: > > On Wednesday 26 August 2015 20:14:09 Mark Morgan Lloyd wrote: > >> Is there a native ARM version compatible with the Raspberry Pi? > > > > Here: > > http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ > > > > Please run eabihf/lib/fpc/3.0.1/samplecfg in order to create a default > > configuration file. > > /usr/local/lib/fpc/3.0.1/samplecfg: fpcmkcfg: not found I don't know where to get fpcmkcfg, in my RPI installation it probably has been installed by "apt-get install fpc" which installs FPC 2.6.0. [...] > Has problems rebuilding 3.0.0 rc1 from source: > > /bin/mv -f ppcarm ppc2 > make 'FPC=/usr/local/src/fpc/fpcbuild-3.0.0-rc1/fpcsrc/compiler/ppc2' > 'OLDFPC=/usr/local/src/fpc/fpcbuild-3.0.0-rc1/fpcsrc/compiler/ppc1' next > CYCLELEVEL=3 > An unhandled exception occurred at $00087480: > EAccessViolation: Access violation > $00087480 TMESSAGE__GET, line 445 of cmsgs.pas > $00057754 MESSAGE, line 767 of verbose.pas > $0004F574 COMPILE, line 370 of compiler.pas > $00008384 main, line 246 of pp.pas > > That happens several times until the make bombs. Original command line was > > make OVERRIDEVERSIONCHECK=1 NO_GDB=1 OPT='-V3.0.1 -dFPC_ARMHF -O- -gl > -Xs-' all " make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all " in a fixes_3_0 checkout works for me. A FPC version with debug info is here: https://sourceforge.net/projects/mseide-msegui/files/fpcarm/ Martin _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Jonas Maebe
to Florian Klämpfl: Am 29. August 2015 12:00:26 nachm. schrieb Jonas Maebe : This should not be necessary?
Florian Klämpfl wrote 7 lines
Am 29. August 2015 12:00:26 nachm. schrieb Jonas Maebe : > > In any case: you should have to pass OPT="-dFPC_ARMHF" to get an armhf > compiler (even if you already start with an armhf compiler). This should not be necessary?

I also used to think so, but I can't find where FPC_ARMHF it would be automatically defined for an armhf compiler. It only defines CPUARMHF as far as I can see.

Jonas

Reply by email

Florian Klämpfl
to Jonas Maebe

Am 29. August 2015 1:58:06 nachm. schrieb Jonas Maebe :

Show quoted text 10 lines
On 29/08/15 13:40, Florian Klämpfl wrote: > Am 29. August 2015 12:00:26 nachm. schrieb Jonas Maebe > : >> >> In any case: you should have to pass OPT="-dFPC_ARMHF" to get an armhf >> compiler (even if you already start with an armhf compiler). > > This should not be necessary? I also used to think so, but I can't find where FPC_ARMHF

compiler/fpcdefs.inc:155

Reply by email

Jonas Maebe
to Florian Klämpfl
Florian Klämpfl wrote 15 lines
Am 29. August 2015 1:58:06 nachm. schrieb Jonas Maebe : > On 29/08/15 13:40, Florian Klämpfl wrote: >> Am 29. August 2015 12:00:26 nachm. schrieb Jonas Maebe >> : >>> >>> In any case: you should have to pass OPT="-dFPC_ARMHF" to get an armhf >>> compiler (even if you already start with an armhf compiler). >> >> This should not be necessary? > > I also used to think so, but I can't find where FPC_ARMHF compiler/fpcdefs.inc:155

Damn grep ARMHF *.pas :)

Jonas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe: Note that Mark is building 3.0.0rc1, not fixes_3_0. Building an older revision with a…
Jonas Maebe wrote 11 lines
On 29/08/15 11:55, Martin Schreiber wrote: > " > make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 > all > " > in a fixes_3_0 checkout works for me. Note that Mark is building 3.0.0rc1, not fixes_3_0. Building an older revision with a compiler built from a newer revision is never supported (although in this very specific case, it might work since there are barely any differences between 3.0.0rc1 and the current fixes_3_0 branch).

I'm under a bit of pressure to demonstrate that a Raspberry Pi is a "real computer", not just a target for a cross compiler (I've done plenty of that sort of thing in the past).

Martin, what would be really useful is knowing /exactly/ what sources you used to build your binary at
http://sourceforge.net/projects/mseide-msegui/files/fpcarm/

Show quoted text 5 lines
In any case: you should have to pass OPT="-dFPC_ARMHF" to get an armhf compiler (even if you already start with an armhf compiler). I haven't updated the compiler readme yet, but I've at least mentioned this in the mean time at http://wiki.freepascal.org/FPC_New_Features_3.0#Support_for_the_armhf_EABI

Thanks, noted and aware.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Martin Schreiber
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 5 lines
Martin, what would be really useful is knowing /exactly/ what sources you used to build your binary at http://sourceforge.net/projects/mseide-msegui/files/fpcarm/

"
svn info
Path: .
Working Copy Root Path: /home/mse/packs/standard/svn/fp/arm/fixes_3_0 URL: http://svn.freepascal.org/svn/fpc/branches/fixes_3_0 Relative URL: ^/branches/fixes_3_0
Repository Root: http://svn.freepascal.org/svn/fpc Repository UUID: 3ad0048d-3df7-0310-abae-a5850022a9f2 Revision: 31324
Node Kind: directory
Schedule: normal
Last Changed Author: joost
Last Changed Rev: 31297
Last Changed Date: 2015-08-06 22:26:00 +0200 (Thu, 06 Aug 2015) "

Martin

Reply by email

John Lee
to Martin Schreiber: Try to start " <your extracting dir of fpc_eabihf_3_0_1.tar.gz>/eabihf/lib/fpc/3.0.1/ppcro…

Dohhh, still getting 2.6.4.

Did you mean ppcarm?

Downloaded fpc_eabihf_3_0_1.tar.gz, extracted

If I cd to eabihf/lib/fpc/3.0.1 there is ppcarm of 14th Aug there but running ppcarm still gives 2.6.4!

Or should I do exec ppcarm?

John

Martin Schreiber wrote 17 lines
On Saturday 29 August 2015 13:32:57 John Lee wrote: > Just downloaded the non debug version onto my rpi 2. Extracted - 6 files in > /bin, including fpc but it is 2.6.4 not 3.0. Any ideas? Try to start " <your extracting dir of fpc_eabihf_3_0_1.tar.gz>/eabihf/lib/fpc/3.0.1/ppcrossarm " directly. /bin/fpc probably picks the wrong compiler. Martin _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

John Lee
to John Lee

Oops sorry, ignore this, my finger trouble! Got 3.0.1 now using ./ppcarm from ..lib/fpc/3.01.

Can I install this version as fpc?
john

John Lee wrote 50 lines
Dohhh, still getting 2.6.4. Did you mean ppcarm? Downloaded fpc_eabihf_3_0_1.tar.gz, extracted If I cd to eabihf/lib/fpc/3.0.1 there is ppcarm of 14th Aug there but running ppcarm still gives 2.6.4! Or should I do exec ppcarm? John On 29 August 2015 at 12:52, Martin Schreiber wrote: > On Saturday 29 August 2015 13:32:57 John Lee wrote: > > Just downloaded the non debug version onto my rpi 2. Extracted - 6 > files in > > /bin, including fpc but it is 2.6.4 not 3.0. Any ideas? > > Try to start > " > <your extracting dir of > fpc_eabihf_3_0_1.tar.gz>/eabihf/lib/fpc/3.0.1/ppcrossarm > " > directly. /bin/fpc probably picks the wrong compiler. > > Martin > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal >

Reply by email

Jonas Maebe
to John Lee: Dohhh, still getting 2.6.4. Did you mean ppcarm? Downloaded fpc_eabihf_3_0_1.tar.gz,…
John Lee wrote
If I cd to eabihf/lib/fpc/3.0.1 there is ppcarm of 14th Aug there but running ppcarm still gives 2.6.4!

On Unix-like platforms, you have to use "./ppcarm" to execute the ppcarm binary in the current directory instead of the one in the PATH. The reason is that many Unix systems are (or can be) multi-user and that e.g. the /tmp directory is writeable by everyone, so if someone would put a program called "ls" in /tmp that was malevolent, a lot of users would be caught by that.

Jonas

Reply by email

Mark Morgan Lloyd
to Martin Schreiber: " svn info Path: . Working Copy Root Path: /home/mse/packs/standard/svn/fp/arm/fixes_3_0…
Martin Schreiber wrote 20 lines
On Saturday 29 August 2015 15:38:35 Mark Morgan Lloyd wrote: > Martin, what would be really useful is knowing /exactly/ what sources > you used to build your binary at > http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ > " svn info Path: . Working Copy Root Path: /home/mse/packs/standard/svn/fp/arm/fixes_3_0 URL: http://svn.freepascal.org/svn/fpc/branches/fixes_3_0 Relative URL: ^/branches/fixes_3_0 Repository Root: http://svn.freepascal.org/svn/fpc Repository UUID: 3ad0048d-3df7-0310-abae-a5850022a9f2 Revision: 31324 Node Kind: directory Schedule: normal Last Changed Author: joost Last Changed Rev: 31297 Last Changed Date: 2015-08-06 22:26:00 +0200 (Thu, 06 Aug 2015) "

Starting off with your binary on the system, i.e. with no 2.6.x, I have to use a generic fpc.cfg but apart from that things appear to work.

Got sources from svn as above. Attempting to rebuild using a generic command line:

make OVERRIDEVERSIONCHECK=1 NO_GDB=1 OPT='-O- -gl -Xs-' all

when building fpmake objects about missing crti.o crtbegin.o crtend.o crtn.o. Add -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi

Starting over, I get to

Free Pascal Compiler version 3.0.1 [2015/08/29] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMHF
Compiling fpmake.pp
fpmake.pp(16,3) Note: Local variable "T" is assigned but never used Assembling fpmake
Linking fpmake
/usr/bin/ld: warning: link.res contains output sections; did you forget -T? 14595 lines compiled, 58.7 sec
1 note(s) issued
./fpmake compile --localunitdir=.. --os=linux --cpu=arm -o -Ur -o -Xs -o -O2 -o -n -o -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -o -V3.0.1 -o -O- -o -gl -o -Xs- -o -vt -o -darm -o -dRELEASE --compiler=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm -bu -o -XX -o -CX make[2]: ./fpmake: Command not found
make[2]: *** [smart] Error 127
make[2]: Leaving directory `/usr/local/src/fpc/fixes_3_0/packages' make[1]: *** [packages_smart] Error 2
make[1]: Leaving directory `/usr/local/src/fpc/fixes_3_0' make: *** [build-stamp.arm-linux] Error 2

/usr/local/src/fpc/fixes_3_0$ find . -name fpmake -ls 157069 4460 -rwxr-xr-x 1 markMLl staff 4565218 Aug 29 15:46 ./packages/fpmake

/usr/local/src/fpc/fixes_3_0$ file ./packages/fpmake ./packages/fpmake: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped

/usr/local/src/fpc/fixes_3_0$ ./packages/fpmake --help -bash: ./packages/fpmake: No such file or directory

I get stuck at the same point irrespective of any -dFPC_ARMHF etc.

Now I'm quite sure it's me doing something silly...

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Florian Klaempfl
to Jonas Maebe: Damn grep ARMHF *.pas :) Jonas
Jonas Maebe wrote 18 lines
On 29/08/15 14:49, Florian Klämpfl wrote: > Am 29. August 2015 1:58:06 nachm. schrieb Jonas Maebe > : > >> On 29/08/15 13:40, Florian Klämpfl wrote: >>> Am 29. August 2015 12:00:26 nachm. schrieb Jonas Maebe >>> : >>>> >>>> In any case: you should have to pass OPT="-dFPC_ARMHF" to get an armhf >>>> compiler (even if you already start with an armhf compiler). >>> >>> This should not be necessary? >> >> I also used to think so, but I can't find where FPC_ARMHF > > compiler/fpcdefs.inc:155 Damn grep ARMHF *.pas :)

Nevertheless, it does not explain why the OPT=-dFPC_ARMHF is needed.

Reply by email

Florian Klaempfl
to Ched: I strongly discourage the use of {$optimization deadstore} which induced strong numerical…
Ched wrote 14 lines
Hello, I strongly discourage the use of {$optimization deadstore} which induced strong numerical errors on our solar system calculations (i386 linux). The other new ones {$optimization deadvalues} {$optimization orderfields} {$optimization fastmath} {$optimization constprop} seem to be ok. Unfortunately, deadstore will be difficult to debug with the actual code (>100000 lines).

Since it shouldn't affect too much code, it would be worth a try to compare the generated assembler with and without {$optimization deadstore}. With a tool like WinMerge this can be normally done pretty easy.

Reply by email

John Lee
to John Lee: Oops sorry, ignore this, my finger trouble! Got 3.0.1 now using ./ppcarm from…

Progress on hello world program, but link problem - Do I need -T or is it something else eg

~/Desktop/eabihf/lib/fpc/3.0.1 $ ./ppcarm
-Fuunits/arm-linux/rtl hello
Free Pascal Compiler version 3.0.1 [2015/08/14] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMHF
Compiling hello.pas
Assembling program
Linking hello

/usr/bin/ld: warning: link.res contains output sections; did you forget -T? 4 lines compiled, 0.8 sec

John Lee wrote 64 lines
Oops sorry, ignore this, my finger trouble! Got 3.0.1 now using ./ppcarm from ..lib/fpc/3.01. Can I install this version as fpc? john On 29 August 2015 at 16:30, John Lee wrote: > Dohhh, still getting 2.6.4. > > Did you mean ppcarm? > > Downloaded fpc_eabihf_3_0_1.tar.gz, extracted > > If I cd to eabihf/lib/fpc/3.0.1 there is ppcarm of 14th Aug there but > running ppcarm still gives 2.6.4! > > Or should I do exec ppcarm? > > John > > > > > > > > > > > > > > > > > > On 29 August 2015 at 12:52, Martin Schreiber wrote: > >> On Saturday 29 August 2015 13:32:57 John Lee wrote: >> > Just downloaded the non debug version onto my rpi 2. Extracted - 6 >> files in >> > /bin, including fpc but it is 2.6.4 not 3.0. Any ideas? >> >> Try to start >> " >> <your extracting dir of >> fpc_eabihf_3_0_1.tar.gz>/eabihf/lib/fpc/3.0.1/ppcrossarm >> " >> directly. /bin/fpc probably picks the wrong compiler. >> >> Martin >> _______________________________________________ >> fpc-pascal maillist - >> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal >> > >

Reply by email

Martin Schreiber
to Florian Klaempfl: Nevertheless, it does not explain why the OPT=-dFPC_ARMHF is needed.
Florian Klaempfl wrote
Nevertheless, it does not explain why the OPT=-dFPC_ARMHF is needed.

ppcarm -i after
"
make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all
"
returns:
"
Free Pascal Compiler version 3.0.1

Compiler date : 2015/08/29
Compiler CPU target: arm

Supported targets (targets marked with '{*}' are under development): Linux: Linux for ARMHF
WinCE: WinCE for ARM
gba: GameBoy Advance
PalmOS: PalmOS
nds: Nintendo DS
embedded: Embedded
Symbian: Symbian OS for ARM
Darwin: Darwin for ARM
Android: Android for ARMEL

Supported CPU instruction sets:
ARMV3,ARMV4,ARMV4T,ARMV5,ARMV5T,ARMV5TE,ARMV5TEJ,ARMV6,ARMV6K,ARMV6T2 ARMV6Z,ARMV6M,ARMV7,ARMV7A,ARMV7R,ARMV7M,ARMV7EM

Supported FPU instruction sets:
SOFT,LIBGCC,FPA,FPA10,FPA11,VFPV2,VFPV3,VFPV3_D16,FPV4_S16

Supported inline assembler modes:
STANDARD
GAS

Recognized compiler and RTL features:
HEAP,INITFINAL,RTTI,CLASSES,EXCEPTIONS,EXITCODE,ANSISTRINGS,WIDESTRINGS TEXTIO,CONSOLEIO,FILEIO,RANDOM,VARIANTS,OBJECTS,DYNARRAYS,THREADING COMMANDARGS,PROCESSES,STACKCHECK,DYNLIBS,SOFTFPU,OBJECTIVEC1,RESOURCES UNICODESTRINGS

Supported ABI targets:
DEFAULT
EABIHF

Supported Optimizations:
REGVAR
STACKFRAME
PEEPHOLE
LOOPUNROLL
TAILREC
CSE
DFA
ORDERFIELDS
FASTMATH
REMOVEEMPTYPROCS
CONSTPROP
FORCENOSTACKFRAME

Supported Whole Program Optimizations:
All
DEVIRTCALLS
OPTVMTS
SYMBOLLIVENESS

Supported Microcontroller types:
LPC810M021FN8,LPC811M001FDH16,LPC812M101FDH16,LPC812M101FD20 LPC812M101FDH20,LPC1110FD20,LPC1111FDH20_002,LPC1111FHN33_101 LPC1111FHN33_102,LPC1111FHN33_103,LPC1111FHN33_201,LPC1111FHN33_202 LPC1111FHN33_203,LPC1112FD20_102,LPC1112FDH20_102,LPC1112FDH28_102 LPC1112FHN33_101,LPC1112FHN33_102,LPC1112FHN33_103,LPC1112FHN33_201 LPC1112FHN24_202,LPC1112FHN33_202,LPC1112FHN33_203,LPC1112FHI33_202 LPC1112FHI33_203,LPC1113FHN33_201,LPC1113FHN33_202,LPC1113FHN33_203 LPC1113FHN33_301,LPC1113FHN33_302,LPC1113FHN33_303,LPC1113FBD48_301 LPC1113FBD48_302,LPC1113FBD48_303,LPC1114FDH28_102,LPC1114FN28_102 LPC1114FHN33_201,LPC1114FHN33_202,LPC1114FHN33_203,LPC1114FHN33_301 LPC1114FHN33_302,LPC1114FHN33_303,LPC1114FHN33_333,LPC1114FHI33_302 LPC1114FHI33_303,LPC1114FBD48_301,LPC1114FBD48_302,LPC1114FBD48_303 LPC1114FBD48_323,LPC1114FBD48_333,LPC1115FBD48_303,LPC11C12FBD48_301 LPC11C14FBD48_301,LPC11C22FBD48_301,LPC11C24FBD48_301 LPC11D14FBD100_302,LPC1224FBD48_101,LPC1224FBD48_121,LPC1224FBD64_101 LPC1224FBD64_121,LPC1225FBD48_301,LPC1225FBD48_321,LPC1225FBD64_301 LPC1225FBD64_321,LPC1226FBD48_301,LPC1226FBD64_301,LPC1227FBD48_301 LPC1227FBD64_301,LPC12D27FBD100_301,LPC1311FHN33,LPC1311FHN33_01 LPC1313FHN33,LPC1313FHN33_01,LPC1313FBD48,LPC1313FBD48_01,LPC1315FHN33 LPC1315FBD48,LPC1316FHN33,LPC1316FBD48,LPC1317FHN33,LPC1317FBD48 LPC1317FBD64,LPC1342FHN33,LPC1342FBD48,LPC1343FHN33,LPC1343FBD48 LPC1345FHN33,LPC1345FBD48,LPC1346FHN33,LPC1346FBD48,LPC1347FHN33 LPC1347FBD48,LPC1347FBD64,LPC2114,LPC2124,LPC2194,LPC1754,LPC1756 LPC1758,LPC1764,LPC1766,LPC1768,AT91SAM7S256,AT91SAM7SE256,AT91SAM7X256 AT91SAM7XC256,STM32F030C6,STM32F030C8,STM32F030F4,STM32F030K6 STM32F030R8,STM32F050C4,STM32F050C6,STM32F050F4,STM32F050F6,STM32F050G4 STM32F050G6,STM32F050K4,STM32F050K6,STM32F051C4,STM32F051C6,STM32F051C8 STM32F051K4,STM32F051K6,STM32F051K8,STM32F051R4,STM32F051R6,STM32F051R8 STM32F100X4,STM32F100X6,STM32F100X8,STM32F100XB,STM32F100XC,STM32F100XD STM32F100XE,STM32F101X4,STM32F101X6,STM32F101X8,STM32F101XB,STM32F101XC STM32F101XD,STM32F101XE,STM32F101XF,STM32F101XG,STM32F102X4,STM32F102X6 STM32F102X8,STM32F102XB,STM32F103X4,STM32F103X6,STM32F103X8,STM32F103XB STM32F103XC,STM32F103XD,STM32F103XE,STM32F103XF,STM32F103XG,STM32F107X8 STM32F107XB,STM32F107XC,STM32F105R8,STM32F105RB,STM32F105RC,STM32F105V8 STM32F105VB,STM32F105VC,STM32F107RB,STM32F107RC,STM32F107VB,STM32F107VC LM3S1110,LM3S1133,LM3S1138,LM3S1150,LM3S1162,LM3S1165,LM3S1166,LM3S2110 LM3S2139,LM3S6100,LM3S6110,LM3S1601,LM3S1608,LM3S1620,LM3S1635,LM3S1636 LM3S1637,LM3S1651,LM3S2601,LM3S2608,LM3S2620,LM3S2637,LM3S2651,LM3S6610 LM3S6611,LM3S6618,LM3S6633,LM3S6637,LM3S8630,LM3S1911,LM3S1918,LM3S1937 LM3S1958,LM3S1960,LM3S1968,LM3S1969,LM3S2911,LM3S2918,LM3S2919,LM3S2939 LM3S2948,LM3S2950,LM3S2965,LM3S6911,LM3S6918,LM3S6938,LM3S6950,LM3S6952 LM3S6965,LM3S8930,LM3S8933,LM3S8938,LM3S8962,LM3S8970,LM3S8971,LM3S5951 LM3S5956,LM3S1B21,LM3S2B93,LM3S5B91,LM3S9B81,LM3S9B90,LM3S9B92,LM3S9B95 LM3S9B96,LM3S5D51,LM4F120H5,SC32442B,XMC4500X1024,XMC4500X768 XMC4502X768,XMC4504X512,THUMB2_BARE

This program comes under the GNU General Public Licence For more information read COPYING.v2

Please report bugs in our bug tracker on:
http://bugs.freepascal.org

More information may be found on our WWW pages (including directions for mailing lists useful for asking questions or discussing potential new features, etc.):
http://www.freepascal.org
"
Martin

Reply by email

John Lee
to Martin Schreiber: This is normal. Martin

What is fix please? I noticed Jonas committed a link patch to svn today. Does that fix it? If so can pls you provide a new ver.

TIA John.

Martin Schreiber wrote 12 lines
On Saturday 29 August 2015 20:05:35 John Lee wrote: > > /usr/bin/ld: warning: link.res contains output sections; did you forget -T? This is normal. Martin _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Jonas Maebe
to Florian Klaempfl: Nevertheless, it does not explain why the OPT=-dFPC_ARMHF is needed.
Florian Klaempfl wrote
Nevertheless, it does not explain why the OPT=-dFPC_ARMHF is needed.

It is not necessary, I had simply (wrongly) made that deduction from looking all over the compiler source code (except for in fpcdefs.inc) and checking where it would automatically set it when recompiling the compiler.

I've now also verified on an actual ARM board that it is not necessary. Sorry for the wrong information (although it won't hurt to specify -dFPC_ARMHF again, of course).

Jonas

Reply by email

John Lee
to John Lee: What is fix please? I noticed Jonas committed a link patch to svn today. Does that fix…

Not clear about rpi compilers for rc1. My testing on rpi 2 of Martin's 3.0.0 of 18th Aug (similar to rc1?) suggests that compilation works ok, but linking doesn't.

So does this mean that 3.0.0 doesn't have a working fpc for rpi 2? What about rpi 1?

I have both rpi 1 and 2 available, so let me know if I can help with more testing. What's plan?

btw, dont think the rc1 release notes make status clear.

john

John Lee wrote 24 lines
What is fix please? I noticed Jonas committed a link patch to svn today. Does that fix it? If so can pls you provide a new ver. TIA John. On 29 August 2015 at 19:22, Martin Schreiber wrote: > On Saturday 29 August 2015 20:05:35 John Lee wrote: > > > > /usr/bin/ld: warning: link.res contains output sections; did you forget > -T? > > This is normal. > > Martin > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal >

Reply by email

Jonas Maebe
to John Lee
John Lee wrote
Not clear about rpi compilers for rc1. My testing on rpi 2 of Martin's 3.0.0 of 18th Aug (similar to rc1?) suggests that compilation works ok, but linking doesn't.

Maybe you don't have the correct extra packages installed.

Show quoted text 7 lines
So does this mean that 3.0.0 doesn't have a working fpc for rpi 2? What about rpi 1? I have both rpi 1 and 2 available, so let me know if I can help with more testing. What's plan? btw, dont think the rc1 release notes make status clear.

FPC 3.0rc1 supports the armhf eabi, which is used by (most?) Linux distributions on the Raspberry Pi 1 and 2. We don't advertise that we support a particular model of a particular board with a particular Linux distribution and if so, under which conditions (which packages might be needed). That is up to the maintainers of those Linux distributions, and something we have no expertise about nor any control over.

It is impossible to develop for Linux/ARM without familiarity with Linux and ARM development in general, especially if you want to use tools/packages that have not been built by the maintainers of your Linux distribution. This is regardless of which compiler/language you use.

Jonas

Reply by email

Jonas Maebe
to Mark Morgan Lloyd: Starting off with your binary on the system, i.e. with no 2.6.x, I have to use a generic…
Mark Morgan Lloyd wrote 21 lines
./fpmake compile --localunitdir=.. --os=linux --cpu=arm -o -Ur -o -Xs -o -O2 -o -n -o -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -o -V3.0.1 -o -O- -o -gl -o -Xs- -o -vt -o -darm -o -dRELEASE --compiler=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm -bu -o -XX -o -CX make[2]: ./fpmake: Command not found make[2]: *** [smart] Error 127 make[2]: Leaving directory `/usr/local/src/fpc/fixes_3_0/packages' make[1]: *** [packages_smart] Error 2 make[1]: Leaving directory `/usr/local/src/fpc/fixes_3_0' make: *** [build-stamp.arm-linux] Error 2 /usr/local/src/fpc/fixes_3_0$ find . -name fpmake -ls 157069 4460 -rwxr-xr-x 1 markMLl staff 4565218 Aug 29 15:46 ./packages/fpmake /usr/local/src/fpc/fixes_3_0$ file ./packages/fpmake ./packages/fpmake: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped /usr/local/src/fpc/fixes_3_0$ ./packages/fpmake --help -bash: ./packages/fpmake: No such file or directory

What does "readelf -aW ./packages/fpmake" print after "Requesting program interpreter:" ? And does that file exist?

Jonas

Reply by email

John Lee
to Jonas Maebe: Maybe you don't have the correct extra packages installed. FPC 3.0rc1 supports the armhf…

Can you please tell me which packages are needed so linking works. Martin?

Don't understand your point(s) - it is complicated by the problems of arm on 2.6.4 and the arm flavours, but you seem to be making it worse! We support fpc on various win (and linux) os for i386 & various versions, eg win xp (maybe), 7, 10. Also we used to say for these 'you need certain utils eg as, ls etc' until we had the internal as and lds

Suspect the most common linux on rpi is wheezy or jessie (I run this on rpi 2 and rpi 1) - the rpi people seem to favour these, So why don't we say fpc supports rpi 1 and 2 on wheezy/jessie, at versions >x, and you need certain utilities too, like we do with everything else? We don't need to mention the arm flavour, except in the details, any more than we mention the instruction set of i386 with all their variants.

So why not keep it simple, tho' not too simple, as the great man is supposed to have said, and release rpi compilers in 3.0.0 (as betas if necessary) - there are a lot of them out there..
john

Jonas Maebe wrote 33 lines
On 30/08/15 14:11, John Lee wrote: > Not clear about rpi compilers for rc1. My testing on rpi 2 of Martin's > 3.0.0 of 18th Aug (similar to rc1?) suggests that compilation works ok, > but linking doesn't. Maybe you don't have the correct extra packages installed. > So does this mean that 3.0.0 doesn't have a working fpc for rpi 2? > What about rpi 1? > > I have both rpi 1 and 2 available, so let me know if I can help with > more testing. What's plan? > > btw, dont think the rc1 release notes make status clear. FPC 3.0rc1 supports the armhf eabi, which is used by (most?) Linux distributions on the Raspberry Pi 1 and 2. We don't advertise that we support a particular model of a particular board with a particular Linux distribution and if so, under which conditions (which packages might be needed). That is up to the maintainers of those Linux distributions, and something we have no expertise about nor any control over. It is impossible to develop for Linux/ARM without familiarity with Linux and ARM development in general, especially if you want to use tools/packages that have not been built by the maintainers of your Linux distribution. This is regardless of which compiler/language you use. Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Jonas Maebe
to John Lee
John Lee wrote
Can you please tell me which packages are needed so linking works. Martin?

What linker error did you get? You only posted "/usr/bin/ld: warning: link.res contains output sections; did you forget -T?", but as the message literally says that's a warning, not an error. It's even been in the faq for 5 or more years: http://www.freepascal.org/faq.var#unix-ld219

Don't understand your point(s) - it is complicated by the problems of arm on 2.6.4 and the arm flavours, but you seem to be making it worse!

What did we do that made it worse?

We support fpc on various win (and linux) os for i386 & various versions, eg win xp (maybe), 7, 10. Also we used to say for these 'you need certain utils eg as, ls etc' until we had the internal as and lds

For Windows, we always provide all utilities ourselves, so that's easy. For Linux, we assume the user set it up for development already using their distribution's specific method (if you installed FPC 2.6.4 using apt-get install, you should have everything you need already; if not, file a bug report with your distribution).

Jonas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe: What does "readelf -aW ./packages/fpmake" print after "Requesting program interpreter:" ?…
Jonas Maebe wrote 25 lines
On 29/08/15 17:57, Mark Morgan Lloyd wrote: > ./fpmake compile --localunitdir=.. --os=linux --cpu=arm -o -Ur -o -Xs -o > -O2 -o -n -o -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -o > -V3.0.1 -o -O- -o -gl -o -Xs- -o -vt -o -darm -o -dRELEASE > --compiler=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm -bu -o -XX -o -CX > make[2]: ./fpmake: Command not found > make[2]: *** [smart] Error 127 > make[2]: Leaving directory `/usr/local/src/fpc/fixes_3_0/packages' > make[1]: *** [packages_smart] Error 2 > make[1]: Leaving directory `/usr/local/src/fpc/fixes_3_0' > make: *** [build-stamp.arm-linux] Error 2 > > /usr/local/src/fpc/fixes_3_0$ find . -name fpmake -ls > 157069 4460 -rwxr-xr-x 1 markMLl staff 4565218 Aug 29 15:46 > ./packages/fpmake > > /usr/local/src/fpc/fixes_3_0$ file ./packages/fpmake > ./packages/fpmake: ELF 32-bit LSB executable, ARM, version 1 (SYSV), > dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped > > /usr/local/src/fpc/fixes_3_0$ ./packages/fpmake --help > -bash: ./packages/fpmake: No such file or directory What does "readelf -aW ./packages/fpmake" print after "Requesting program interpreter:" ? And does that file exist?

ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32
Data: 2's complement, little endian Version: 1 (current)
OS/ABI: UNIX - System V ABI Version: 0
Type: EXEC (Executable file) Machine: ARM
Version: 0x1
Entry point address: 0x843c
Start of program headers: 52 (bytes into file) Start of section headers: 3549332 (bytes into file) Flags: 0x5000002, has entry point, Version5 EABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 7
Size of section headers: 40 (bytes)
Number of section headers: 30
Section header string table index: 27
..
[Requesting program interpreter: /lib/ld-linux-armhf.so.3] ..

That file's missing, something's obviously badly wrong with the Rpi filesystem etc.: I strongly suspect that somebody did an incautious update/upgrade/dist-upgrade.

Leave it with me, I'll be back.

p.s. Currently looking at an x86 Android tablet, appears to have a significant amount of ARM code run by emulation.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Jonas Maebe
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 7 lines
.. [Requesting program interpreter: /lib/ld-linux-armhf.so.3] .. That file's missing, something's obviously badly wrong with the Rpi filesystem etc.: I strongly suspect that somebody did an incautious update/upgrade/dist-upgrade.

What does readelf say about the program interpreter of the system binaries, such as "/bin/ls"?

Jonas

Reply by email

Martin Schreiber
to John Lee: Not clear about rpi compilers for rc1. My testing on rpi 2 of Martin's 3.0.0 of 18th Aug…
John Lee wrote
Not clear about rpi compilers for rc1. My testing on rpi 2 of Martin's 3.0.0 of 18th Aug (similar to rc1?) suggests that compilation works ok, but linking doesn't.

What means "but linking doesn't"? the
"/usr/bin/ld: warning: link.res contains output sections; did you forget -T?" warning?
This warning is issued always on Linux by ld while linking FPC binaries, nothing what you should be concerned about.

Martin

Reply by email

Mark Morgan Lloyd
to Jonas Maebe: What does readelf say about the program interpreter of the system binaries, such as…
Jonas Maebe wrote 11 lines
On 30/08/15 15:35, Mark Morgan Lloyd wrote: > .. > [Requesting program interpreter: /lib/ld-linux-armhf.so.3] > .. > > That file's missing, something's obviously badly wrong with the Rpi > filesystem etc.: I strongly suspect that somebody did an incautious > update/upgrade/dist-upgrade. What does readelf say about the program interpreter of the system binaries, such as "/bin/ls"?

ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32
Data: 2's complement, little endian Version: 1 (current)
OS/ABI: UNIX - System V ABI Version: 0
Type: EXEC (Executable file) Machine: ARM
Version: 0x1
Entry point address: 0xc3f8
Start of program headers: 52 (bytes into file) Start of section headers: 99312 (bytes into file) Flags: 0x5000002, has entry point, Version5 EABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 9
Size of section headers: 40 (bytes)
Number of section headers: 28
Section header string table index: 27
..
[Requesting program interpreter: /lib/ld-linux.so.3] ..

$ ls -l /lib/ld-linux.so.3
lrwxrwxrwx 1 root root 28 Oct 16 2014 /lib/ld-linux.so.3 -> arm-linux-gnueabi/ld-2.13.so

$ ls -l /lib/arm-linux-gnueabi/ld-2.13.so
-rwxr-xr-x 1 root root 122136 Oct 16  2014 /lib/arm-linux-gnueabi/ld-2.13.so

You win that one, but I'm still a bit suspicious about what's in this Raspbian: it's almost a year old and seems a bit sensitive to attempted upgrades.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Jonas Maebe
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 14 lines
[Requesting program interpreter: /lib/ld-linux.so.3] .. $ ls -l /lib/ld-linux.so.3 lrwxrwxrwx 1 root root 28 Oct 16 2014 /lib/ld-linux.so.3 -> arm-linux-gnueabi/ld-2.13.so $ ls -l /lib/arm-linux-gnueabi/ld-2.13.so -rwxr-xr-x 1 root root 122136 Oct 16 2014 /lib/arm-linux-gnueabi/ld-2.13.so You win that one, but I'm still a bit suspicious about what's in this Raspbian: it's almost a year old and seems a bit sensitive to attempted upgrades.

The problem is that some old Debian (and hence Raspbian) versions used /lib/ld-linux.so.3 even on armhf, while newer ones (and other distributions) use /lib/ld-linux-armhf.so.3 . You should be able to work around this problem using the -FL/lib/ld-linux.so.3 compiler option.

See also
http://stackoverflow.com/questions/20717838/gcc-arm-executable-no-such-file-orr-directory-wrong-dynamic-lib and the first answer to that question.

Jonas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe
Jonas Maebe wrote 19 lines
On 30/08/15 17:36, Mark Morgan Lloyd wrote: > [Requesting program interpreter: /lib/ld-linux.so.3] > .. > > $ ls -l /lib/ld-linux.so.3 > lrwxrwxrwx 1 root root 28 Oct 16 2014 /lib/ld-linux.so.3 -> > arm-linux-gnueabi/ld-2.13.so > > $ ls -l /lib/arm-linux-gnueabi/ld-2.13.so > -rwxr-xr-x 1 root root 122136 Oct 16 2014 > /lib/arm-linux-gnueabi/ld-2.13.so > > You win that one, but I'm still a bit suspicious about what's in this > Raspbian: it's almost a year old and seems a bit sensitive to attempted > upgrades. The problem is that some old Debian (and hence Raspbian) versions used /lib/ld-linux.so.3 even on armhf, while newer ones (and other distributions) use /lib/ld-linux-armhf.so.3 .

Their current release (2015-05-05) does appear to use ld-linux-armhf.so.3

You should be able to work around this problem using the -FL/lib/ld-linux.so.3 compiler option.

Confirmed. Is that a setting which should have been created in fpc.cfg during installation (that bit failed, so I'm giving somebody a chance to tell me I should have checked things more carefully when I did it manually :-)

Noted, but Google overlooked that one earlier although I was being fairly FPC-specific with the search.

Almost there I think, but using a command like

make OVERRIDEVERSIONCHECK=1 NO_GDB=1 OPT='-O- -gl -Xs- -FL/lib/ld-linux.so.3' all

I get

..
Linking chm/bin/arm-linux/chmcmd
The installer encountered the following error:
External command "/usr/local/src/fpc/fixes_3_0/compiler/ppcarm -Tlinux -FEchm/bin/arm-linux -FUchm/units/arm-linux/
-Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/ -Fu/usr/local/src/fpc/fixes_3_0/packages/fcl-xml/units/arm-linux/ -Fu/usr/local/src/fpc/fixes_3_0/packages/fcl-base/units/arm-linux/ -Fu/usr/local/src/fpc/fixes_3_0/packages/fcl-res/units/arm-linux/ -Fu/usr/local/src/fpc/fixes_3_0/packages/rtl-objpas/units/arm-linux/ -Fu/usr/local/src/fpc/fixes_3_0/packages/iconvenc/units/arm-linux/ -Ur -Xs -O2 -n -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -V3.0.1 -O- -gl -Xs- -vt -FL/lib/ld-linux.so.3 -darm -dRELEASE -XX -CX -viq chm/src/chmcmd.lpr" failed with exit code 256. Console output: Target OS: Linux for ARMHF
Compiling chm/src/chmcmd.lpr
Assembling chmcmd
make[2]: *** [smart] Error 1
make[1]: *** [packages_smart] Error 2
make: *** [build-stamp.arm-linux] Error 2
Linking chm/bin/arm-linux/chmcmd
/usr/bin/ld: warning: chm/bin/arm-linux/link.res contains output sections; did you forget -T?
/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function `_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function `_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
chmcmd.lpr(238,46) Error: Error while linking
chmcmd.lpr(238,46) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted

make[2]: Leaving directory `/usr/local/src/fpc/fixes_3_0/packages' ..

I see discussion in the past suggesting that this was some residual eabihf issue, but nothing conclusive. Adding an explicit -dFPC_ARMHF doesn't help.

If this doesn't have a blindingly obvious solution I'll redo with a newer Raspbian as soon as a colleague finds a spare SDCard.

Alternatively, what's the quick-and-dirty way to exclude a single package under the new build regime?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Jonas Maebe
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 9 lines
/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function `_haltproc_eabi': (.text+0x88): undefined reference to `_fini' /usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function `_haltproc_eabi': (.text+0x90): undefined reference to `_init' chmcmd.lpr(238,46) Error: Error while linking chmcmd.lpr(238,46) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted

This is also related to the fact that you have an armhf system that uses the directory/file layout of an armel system. Pass -Fl/usr/lib/arm-linux-gnueabi to the compiler, as it is only looking in /usr/lib/arm-linux-gnueabihf for the crt*.o files (which contain those symbols).

Jonas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe
Jonas Maebe wrote 16 lines
Mark Morgan Lloyd wrote: > /usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function > `_haltproc_eabi': > (.text+0x88): undefined reference to `_fini' > /usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function > `_haltproc_eabi': > (.text+0x90): undefined reference to `_init' > chmcmd.lpr(238,46) Error: Error while linking > chmcmd.lpr(238,46) Fatal: There were 1 errors compiling module, stopping > Fatal: Compilation aborted This is also related to the fact that you have an armhf system that uses the directory/file layout of an armel system. Pass -Fl/usr/lib/arm-linux-gnueabi to the compiler, as it is only looking in /usr/lib/arm-linux-gnueabihf for the crt*.o files (which contain those symbols).

I've already got both in the fpc.cfg file:

# path to the gcclib
-Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3
-Fl/usr/lib/arm-linux-gnueabi

where the system already has the symlink

/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -> 4.6

Doing a brute-force search for crt*.o:

/usr/lib/arm-linux-gnueabi/crtn.o
/usr/lib/arm-linux-gnueabi/crti.o
/usr/lib/arm-linux-gnueabi/crt1.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtbegin.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtbeginT.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtbeginS.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtend.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtendS.o
/usr/local/lib/fpc/3.0.1/units/arm-linux/rtl-console/crt.o /usr/local/src/fpc/fixes_3_0/rtl/palmos/m68k/crt0.o

I really do think that I need to get Raspbian upgraded, I know that there are problems with the one currently running.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Jonas Maebe
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 5 lines
I've already got both in the fpc.cfg file: # path to the gcclib -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi

"make all" in the top level directory ignores your fpc.cfg (by design).

Jonas

Reply by email

Mark Morgan Lloyd
to Jonas Maebe
Jonas Maebe wrote 8 lines
Mark Morgan Lloyd wrote: > I've already got both in the fpc.cfg file: > > # path to the gcclib > -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 > -Fl/usr/lib/arm-linux-gnueabi "make all" in the top level directory ignores your fpc.cfg (by design).

[Slaps forehead] I'll be back.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 11 lines
Jonas Maebe wrote: > Mark Morgan Lloyd wrote: >> I've already got both in the fpc.cfg file: >> >> # path to the gcclib >> -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 >> -Fl/usr/lib/arm-linux-gnueabi > > "make all" in the top level directory ignores your fpc.cfg (by design). [Slaps forehead] I'll be back.

Thanks Jonas, that fixes it. To wrap this up and for the benefit of anybody getting here via Google: this is for a Raspeberry Pi with 2014-era Raspbian.

Binaries from: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/

Corresponding sources from
http://svn.freepascal.org/svn/fpc/branches/fixes_3_0 using svn co

Build command line: make NO_GDB=1 OPT='-FL/lib/ld-linux.so.3 -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi' all with OVERRIDEVERSIONCHECK=1 if necessary, and my preference is to also use -O- -gl -Xs- for ease of debugging.

Install command line: sudo OPT='-FL/lib/ld-linux.so.3 -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi' make install

Those -Fl and -FL options will probably need to be added to fpc.cfg for that specific version of Raspbian.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Martin Schreiber
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 18 lines
Thanks Jonas, that fixes it. To wrap this up and for the benefit of anybody getting here via Google: this is for a Raspeberry Pi with 2014-era Raspbian. Binaries from: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ Corresponding sources from http://svn.freepascal.org/svn/fpc/branches/fixes_3_0 using svn co Build command line: make NO_GDB=1 OPT='-FL/lib/ld-linux.so.3 -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi' all with OVERRIDEVERSIONCHECK=1 if necessary, and my preference is to also use -O- -gl -Xs- for ease of debugging. Install command line: sudo OPT='-FL/lib/ld-linux.so.3 -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi' make install

How it worked for me with a Raspbian image from last week from here: https://www.raspberrypi.org/downloads/raspbian/

In my Raspbian RPi 1 model B rev2 I installed FPC 2.6.0 by "
sudo apt-get update
sudo apt-get install fpc
"

Then I extracted fpc_eabihf_3_0_1.tar.gz from
http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ to /home/pi/fpc. cd to the svn fixes_3_0 checkout,
"
make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all "

Martin

Reply by email

Mark Morgan Lloyd
to Martin Schreiber
Martin Schreiber wrote 35 lines
On Monday 31 August 2015 13:00:59 Mark Morgan Lloyd wrote: > Thanks Jonas, that fixes it. To wrap this up and for the benefit of > anybody getting here via Google: this is for a Raspeberry Pi with > 2014-era Raspbian. > > Binaries from: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ > > Corresponding sources from > http://svn.freepascal.org/svn/fpc/branches/fixes_3_0 using svn co > > Build command line: make NO_GDB=1 OPT='-FL/lib/ld-linux.so.3 > -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi' > all with OVERRIDEVERSIONCHECK=1 if necessary, and my preference is to > also use -O- -gl -Xs- for ease of debugging. > > Install command line: sudo OPT='-FL/lib/ld-linux.so.3 > -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi' > make install > How it worked for me with a Raspbian image from last week from here: https://www.raspberrypi.org/downloads/raspbian/ In my Raspbian RPi 1 model B rev2 I installed FPC 2.6.0 by " sudo apt-get update sudo apt-get install fpc " Then I extracted fpc_eabihf_3_0_1.tar.gz from http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ to /home/pi/fpc. cd to the svn fixes_3_0 checkout, " make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all "

As I've said already- more than once- the Raspbian version I'd got dated from 2014 and an attempt to load 2.6.0 on it failed due to various missing/held packages. An attempt to do an update/upgrade/dist-upgrade also failed, leaving it in a broken state with e.g. the display manager deinstalled and not installable. So I'm very grateful for Jonas's help and patience, when he could easily have told me to get lost and fix the system software.

I anticipate that once I'm working from the current (2015-05-05) Raspbian that things will be much easier. However it looks as though the people who put the older version together left it in a state where the metadata was broken or inconsistent, which was possibly unavoidable taking into account that source.list and sources.list.d identify three distinct repositories (debian.net, qmh-project.org and raspberrypi.org).

Incidentally (and I hope that the ML managers will excuse the digression), if anybody has a plugtop USB PSU badged "MW" with their Rpi I strongly suggest checking that it's robustly assembled: one of these came apart when I tried to unplug it and I found that it was held together only by silicone RTV sealant. Scraping the gunge off and gluing properly appears to have improved reliability, presumably by improving heat dissipation.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Martin Schreiber
Martin Schreiber wrote 6 lines
On Monday 31 August 2015 16:25:38 Mark Morgan Lloyd wrote: > As I've said already- more than once- I wrote the previous mail "for the benefit of anybody getting here via Google" too. ;-) Sorry for annoying you.

[GRIN] Nonono, I'm not annoyed. But particularly taking into account the ld-linux issue there was something very obviously wrong with the 2014-era Raspbian, and since the Raspberry Pi Foundation (via Element 14 and their resellers) shipped a lot of cards containing that I think it's important for the casual user to know what to blame.

Anyway, even with that older Rasbian release FPC 3.0.1 is now making a valiant attempt to compile Lazarus. Whichever way that goes I'll discuss it in the Lazarus mailing list.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

John Lee
to Pierre Muller

Is this tar ok? - anyone used it successfully? Getting 'not a tar file' error on my rpi. john

Pierre Muller wrote 15 lines
On Thu, August 27, 2015 06:55, Martin Schreiber wrote: > On Wednesday 26 August 2015 20:14:09 Mark Morgan Lloyd wrote: >> >> Is there a native ARM version compatible with the Raspberry Pi? I uploaded a tar file to install FPC 3.0.0rc1 to a arm-linux Raspberry v1 compiled on a RaspBian wheezy machine. Hope this will help, Pierre Muller _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Mark Morgan Lloyd
to Jonas Maebe
Jonas Maebe wrote 5 lines
John Lee wrote: > Is this tar ok? - anyone used it successfully? Getting 'not a tar file' > error on my rpi. john The tar file verifies fine on the ftp server.

I'm currently having a lot of difficulty moving a .tar.gz from a PC to a 2014-era Raspbian, with various CRC and format errors reported when I try to decompress... this appears to be something consistent rather than an intermittent fault. Since I was able to decompress stuff earlier this could be related to the amount of storage available.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd: [GRIN] Nonono, I'm not annoyed. But particularly taking into account the ld-linux issue…
Mark Morgan Lloyd wrote
Anyway, even with that older Rasbian release FPC 3.0.1 is now making a valiant attempt to compile Lazarus. Whichever way that goes I'll discuss it in the Lazarus mailing list.

Just in case this is something that anybody thinks is worth discussing:

The good news is that after successful tests on x86 and x86-64 Linux (Debian Jessie), yesterday evening I was able to compile and run Lazarus 1.4 using FPC 3.0.1 on a SPARC running OpenSXCE (very approximately, Solaris 11).

The bad news is that when I try to do the same natively on a Raspberry Pi running 2014-era Raspbian, it consistently fails with

(3104) Compiling etsrceditmarks.pas
/usr/local/share/lazarus-trunk/ide/etsrceditmarks.pas(177,27) Hint: (5024) Parameter "Data" not used
/usr/local/share/lazarus-trunk/ide/etsrceditmarks.pas(204,26) Hint: (5024) Parameter "Sender" not used
/usr/local/share/lazarus-trunk/ide/etsrceditmarks.pas(205,34) Hint: (5024) Parameter "aText" not used
(9009) Assembling etsrceditmarks
etsrceditmarks.pas(1184) Error: (9008) Can't call the assembler, error -1 switching to external assembling
etsrceditmarks.pas(1184) Fatal: (10026) There were 2 errors compiling module, stopping
Fatal: (1018) Compilation aborted
make[2]: *** [lazbuild] Error 1
make[2]: Leaving directory `/usr/local/share/lazarus-trunk/ide'

I mention this here rather than in the Lazarus ML because of the successful tests on other platforms. The failure is the same on both Lazarus 1.4 and lazarus-trunk, which suggests that it's not something gross like an out-of-RAM condition. For various reasons I'm making very heavy going of upgrading to a more recent Raspbian (e.g. 2015-05-05) and I think it would be useful for somebody with a current version to check this combination, alternatively if somebody could tell me what options etc. to use to get more detailed failure info...

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

John Lee
to Mark Morgan Lloyd: I'm currently having a lot of difficulty moving a .tar.gz from a PC to a 2014-era…

Which rpi flavours should it work for, 1 or 2?

Still doesn't work (can't extract) for me on rpi 2 running jessie. What commands should I try after download?

John

On 2 September 2015 at 18:30, Mark Morgan Lloyd <

Show quoted text 29 lines
wrote: Jonas Maebe wrote: > John Lee wrote: > >> Is this tar ok? - anyone used it successfully? Getting 'not a tar file' >> error on my rpi. john >> > > The tar file verifies fine on the ftp server. > I'm currently having a lot of difficulty moving a .tar.gz from a PC to a 2014-era Raspbian, with various CRC and format errors reported when I try to decompress... this appears to be something consistent rather than an intermittent fault. Since I was able to decompress stuff earlier this could be related to the amount of storage available. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Pierre Muller
to John Lee
John Lee wrote
Which rpi flavours should it work for, 1 or 2? Still doesn't work (can't extract) for me on rpi 2 running jessie. What commands should I try after download?

First check that the file has the right size:
~/pas/fpcbuild-3.0.0rc1 $ ls -l
fpc-3.0.0rc1.arm-linux-raspberry1.tar
-rw-r--r-- 1 pierre pierre 44953600 Aug 31 22:33
fpc-3.0.0rc1.arm-linux-raspberry1.tar

Second test integrity, for example wiith md5sum:
~/pas/fpcbuild-3.0.0rc1 $ md5sum -b
fpc-3.0.0rc1.arm-linux-raspberry1.tar
a4f291e098e38351c7e1ee7e881665b0 *fpc-3.0.0rc1.arm-linux-raspberry1.tar

Third, chek content:
~/pas/fpcbuild-3.0.0rc1 $ tar -tvf
fpc-3.0.0rc1.arm-linux-raspberry1.tar
drwxr-xr-x pierre/pierre 0 2015-08-31 22:32 fpc-3.0.0rc1.arm-linux/ -rw-r--r-- pierre/pierre 35932160 2015-08-31 22:32 fpc-3.0.0rc1.arm-linux/binary.arm-linux.tar
-rw-r--r-- pierre/pierre 8762903 2015-08-31 21:41 fpc-3.0.0rc1.arm-linux/doc-pdf.tar.gz
-rwxr-xr-x pierre/pierre 8654 2015-08-31 22:32 fpc-3.0.0rc1.arm-linux/install.sh
-rw-r--r-- pierre/pierre 238444 2015-08-31 21:42 fpc-3.0.0rc1.arm-linux/demo.tar.gz

If all this works for you, you should also be able to extract those file change directory into fpc-3.0.0rc1.arm-linux and run ./install.sh there.

If size or checksum are different, it means something went wrong when you tried to copy the file over to the raspberry device.

Pierre Muller

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd: Just in case this is something that anybody thinks is worth discussing: The good news is…
Mark Morgan Lloyd wrote
The good news is that after successful tests on x86 and x86-64 Linux (Debian Jessie), yesterday evening I was able to compile and run Lazarus 1.4 using FPC 3.0.1 on a SPARC running OpenSXCE (very approximately, Solaris 11).

Also OK on PPC Mac running Linux.

The bad news is that when I try to do the same natively on a Raspberry Pi running 2014-era Raspbian, it consistently fails with

This is the perennial out-of-memory problem, it can be fixed by making sure there's at least 512 Mb swap. However the twist is that Raspbian reverts to what it thinks is a reasonable swapfile size at each boot, it's necessary to edit /sbin/dphys-swapfile to override this.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Joost van der Sluis
Show quoted text 8 lines
Martin Schreiber wrote: Starting over, I get to Free Pascal Compiler version 3.0.1 [2015/08/29] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMHF Compiling fpmake.pp

Can you send the lines before these lines? I'm interested in how the fpmake-binary is being build.

Joost.

Reply by email

Martin Schreiber
to Joost van der Sluis
Joost van der Sluis wrote 12 lines
> Martin Schreiber wrote: > > Starting over, I get to > > Free Pascal Compiler version 3.0.1 [2015/08/29] for arm > Copyright (c) 1993-2015 by Florian Klaempfl and others > Target OS: Linux for ARMHF > Compiling fpmake.pp Can you send the lines before these lines? I'm interested in how the fpmake-binary is being build.

I was Mark who wrote it not me. Mark?

Martin

Reply by email

Mark Morgan Lloyd
to Martin Schreiber
Martin Schreiber wrote 13 lines
On Saturday 05 September 2015 19:55:38 Joost van der Sluis wrote: >> Martin Schreiber wrote: >> >> Starting over, I get to >> >> Free Pascal Compiler version 3.0.1 [2015/08/29] for arm >> Copyright (c) 1993-2015 by Florian Klaempfl and others >> Target OS: Linux for ARMHF >> Compiling fpmake.pp > Can you send the lines before these lines? I'm interested in how the > fpmake-binary is being build. > I was Mark who wrote it not me. Mark?

I'll revert to the 2014-era Raspbian and take a look this afternoon.

Raspbian 2015-05-05 is better, there's a benign failure (unable to find crtbegin.o) which doesn't appear to break anything but can be fixed by a -Fl.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 14 lines
Martin Schreiber wrote: > On Saturday 05 September 2015 19:55:38 Joost van der Sluis wrote: >>> Martin Schreiber wrote: >>> >>> Starting over, I get to >>> >>> Free Pascal Compiler version 3.0.1 [2015/08/29] for arm >>> Copyright (c) 1993-2015 by Florian Klaempfl and others >>> Target OS: Linux for ARMHF >>> Compiling fpmake.pp >> Can you send the lines before these lines? I'm interested in how the >> fpmake-binary is being build. >> > I was Mark who wrote it not me. Mark?

Below on Raspbian 2015-05-05:

..

make[3]: Leaving directory '/usr/local/src/fpc/fixes_3_0/packages/fpmkunit' /usr/local/src/fpc/fixes_3_0/compiler/ppcarm fpmake.pp -Fu/usr/local/src/fpc/fixes_3_0/packages/fpmkunit/units_bs/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -V3.0.1 -O- -gl -Xs- -vt
Configfile search: /home/markMLl/.fpc.cfg
Configfile search: /usr/local/src/fpc/fixes_3_0/etc/fpc.cfg Configfile search: /etc/fpc.cfg
Reading options from file /etc/fpc.cfg
Free Pascal Compiler version 3.0.1 [2015/09/07] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMHF
Compiling fpmake.pp
fpmake.pp(16,3) Note: Local variable "T" is assigned but never used Assembling fpmake
Linking fpmake
fpmake.pp(49) Warning: "crtbegin.o" not found, this will probably cause a linking failure
fpmake.pp(49) Warning: "crtend.o" not found, this will probably cause a linking failure
/usr/bin/ld: warning: link.res contains output sections; did you forget -T? 14595 lines compiled, 62.8 sec
2 warning(s) issued
1 note(s) issued
./fpmake compile --localunitdir=.. --os=linux --cpu=arm -o -Ur -o -Xs -o -O2 -o -n -o -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -o -V3.0.1 -o -O- -o -gl -o -Xs- -o -vt -o -darm -o -dRELEASE --compiler=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm -bu -o -XX -o -CX Start compiling package a52 for target arm-linux.
Warning: Unable to determine the libgcc path.

.. also ...

make[1]: Leaving directory '/usr/local/src/fpc/fixes_3_0' make utils_all FPC=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm FPCFPMAKE=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm RELEASE=1 'OPT=-V3.0.1 -O- -gl -Xs- -vt'
make[1]: Entering directory '/usr/local/src/fpc/fixes_3_0' make -C utils all
make[2]: Entering directory '/usr/local/src/fpc/fixes_3_0/utils' /usr/local/src/fpc/fixes_3_0/compiler/ppcarm fpmake.pp -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/paszlib/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/fcl-process/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/hash/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/libtar/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/fpmkunit/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/fcl-json/units/arm-linux -V3.0.1 -O- -gl -Xs- -vt
Configfile search: /home/markMLl/.fpc.cfg
Configfile search: /usr/local/src/fpc/fixes_3_0/etc/fpc.cfg Configfile search: /etc/fpc.cfg
Reading options from file /etc/fpc.cfg
Free Pascal Compiler version 3.0.1 [2015/09/07] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMHF
Compiling fpmake.pp
fpmake.pp(83,52) Warning: Local variable "P" does not seem to be initialized fpmake.pp(12,3) Note: Local variable "T" is assigned but never used fpmake.pp(12,3) Note: Local variable "T" is assigned but never used fpmake.pp(12,3) Note: Local variable "T" is assigned but never used fpmake.pp(12,3) Note: Local variable "T" is assigned but never used fpmake.pp(12,3) Note: Local variable "T" is assigned but never used Assembling fpmake
Linking fpmake
fpmake.pp(105) Warning: "crtbegin.o" not found, this will probably cause a linking failure
fpmake.pp(105) Warning: "crtend.o" not found, this will probably cause a linking failure
/usr/bin/ld: warning: link.res contains output sections; did you forget -T? 1498 lines compiled, 15.1 sec
3 warning(s) issued
5 note(s) issued
./fpmake compile --localunitdir=.. --globalunitdir=../packages --os=linux --cpu=arm -o -Ur -o -Xs -o -O2 -o -n -o -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/paszlib/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/fcl-process/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/hash/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/libtar/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/fpmkunit/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/fcl-json/units/arm-linux -o -V3.0.1 -o -O- -o -gl -o -Xs- -o -vt -o -darm -o -dRELEASE --compiler=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm -bu Start compiling package utils for target arm-linux.

.. also ...

make[1]: Leaving directory '/usr/local/src/fpc/fixes_3_0' make ide_all FPC=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm FPCFPMAKE=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm RELEASE=1 'OPT=-V3.0.1 -O- -gl -Xs- -vt'
make[1]: Entering directory '/usr/local/src/fpc/fixes_3_0' make -C ide all
make[2]: Entering directory '/usr/local/src/fpc/fixes_3_0/ide' /usr/local/src/fpc/fixes_3_0/compiler/ppcarm fpmake.pp -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/paszlib/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/fcl-process/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/hash/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/libtar/units/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/packages/fpmkunit/units/arm-linux -V3.0.1 -O- -gl -Xs- -vt
Configfile search: /home/markMLl/.fpc.cfg
Configfile search: /usr/local/src/fpc/fixes_3_0/etc/fpc.cfg Configfile search: /etc/fpc.cfg
Reading options from file /etc/fpc.cfg
Free Pascal Compiler version 3.0.1 [2015/09/07] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMHF
Compiling fpmake.pp
fpmake.pp(70,3) Note: Local variable "s" not used
Assembling fpmake
Linking fpmake
fpmake.pp(239) Warning: "crtbegin.o" not found, this will probably cause a linking failure
fpmake.pp(239) Warning: "crtend.o" not found, this will probably cause a linking failure
/usr/bin/ld: warning: link.res contains output sections; did you forget -T? 238 lines compiled, 12.3 sec
2 warning(s) issued
1 note(s) issued
./fpmake compile --localunitdir=.. --globalunitdir=../packages --os=linux --cpu=arm -o -Ur -o -Xs -o -O2 -o -n -o -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/paszlib/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/fcl-process/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/hash/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/libtar/units/arm-linux -o -Fu/usr/local/src/fpc/fixes_3_0/packages/fpmkunit/units/arm-linux -o -V3.0.1 -o -O- -o -gl -o -Xs- -o -vt -o -dRELEASE
--compiler=/usr/local/src/fpc/fixes_3_0/compiler/ppcarm -bu

..

I've saved the complete build output if anybody wants it.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Joost van der Sluis
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 14 lines
Below on Raspbian 2015-05-05: .. make[3]: Leaving directory '/usr/local/src/fpc/fixes_3_0/packages/fpmkunit' /usr/local/src/fpc/fixes_3_0/compiler/ppcarm fpmake.pp -Fu/usr/local/src/fpc/fixes_3_0/packages/fpmkunit/units_bs/arm-linux -Fu/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux -V3.0.1 -O- -gl -Xs- -vt Configfile search: /home/markMLl/.fpc.cfg Configfile search: /usr/local/src/fpc/fixes_3_0/etc/fpc.cfg Configfile search: /etc/fpc.cfg Reading options from file /etc/fpc.cfg Free Pascal Compiler version 3.0.1 [2015/09/07] for arm

Thanks.

Regards,

Joost.

Reply by email

Mark Morgan Lloyd
to Martin Schreiber: In my Raspbian RPi 1 model B rev2 I installed FPC 2.6.0 by apt-get install fpc Then I…
Martin Schreiber wrote 8 lines
In my Raspbian RPi 1 model B rev2 I installed FPC 2.6.0 by apt-get install fpc Then I extracted fpc_eabihf_3_0_1.tar.gz to /home/pi/fpc. cd to the svn fixes_3_0 checkout, " make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all "

Thought a status report might be useful here. Using Raspbian 4.1 "Jessie" dated 2015-11-21 from
https://www.raspberrypi.org/downloads/raspbian/ I find fpc_eabihf_3_0_1 from http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ installs and runs with no further prerequisites, and is able to build the standard 3.0.0 sources. There are some minor complaints that Subversion is missing, but that can be trivially fixed.

The new Jessie "Lite" similarly runs 3.0.1 and builds 3.0.0, there are no missing prerequisites so it is not necessary to start "full fat" Jessie, Lazarus 1.4.4 compiles but requires libgtk2.0-dev as a prerequisite. The result doesn't run reliably but this is a Jessie issue which I believe is being addressed. Adding libqt4pas-dev and building Lazarus for Qt results in something that works fine.

I have not tried building Lazarus on Jessie Lite, since I see it as mainly being useful for embedded systems based on the original Rpi or the new RPi Zero. I don't anticipate significant problems other than caused by limited memory (Lazarus requires at least 512Mb RAM+swap to build).

Using standard RPi2 Debian (i.e. not Raspbian) from http://sjoerd.luon.net/posts/2015/02/debian-jessie-on-rpi2/ with the addition of a fairly standard collection of packages using tasksel followed by the build-essential, gdb and subversion packages runs 3.0.1 and builds 3.0.0 in essentially the same way as is described above.

On standard RPi2 Debian, FPC 3.0.0 fails to build Lazarus 1.4.4 with errors like

paswstring.pas(425,46) Error: Incompatible types: got "<address of procedure(PChar;var UnicodeString;LongInt);StdCall>" expected "TUnicodeStringManager.<procedure variable type of procedure(PChar;Word;var UnicodeString;LongInt);StdCall>" paswstring.pas(439) Fatal: There were 4 errors compiling module, stopping Fatal: Compilation aborted
Makefile:2276: recipe for target 'lazutils.ppu' failed

I'm not intending to pursue this at the moment, since I've hacked a lot of stuff onto the top of the supplied "lean and mean" distro ("Adde parvum parvo magnus acervus erit") and my guess is that the Unicode stuff is inadequately configured probably impacting on FPC. I mention it here entirely as a "heads up" for anybody attempting a similar combination.

In all of the above cases, /etc/fpc.cfg should contain a line

-Fl/usr/lib/gcc/arm-linux-gnueabihf/4.9

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email