Sign in Join

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

Mailing lists / lazarus / 2014-01

Lazarus without FPC plain bin dir in path: resource compiler "fpcres" not found - best solution?

7 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Reinier Olislagers

I'm trying a bare metal fpcup install on Linux ARMHF (but this applies to other platforms as well).

Things are starting to look good - I get FPC trunk and Lazarus trunk to compile.

However, when recompiling Lazarus with selected packages I get the fpcres resource compiler error not found - which is because the "plain FPC bin dir", the dir above the architecture-dependent one where the fpc executable is, and where fpcres resides in, is not in the PATH.

Questions:
1. On this and similar systems - where PATH is not set to a certain FPC directory - e.g. perhaps when using the new secondary config option in the Lazarus win installer or on pen drives etc - what to do?
- Write a batch/shell script that adds the "plain FPC bin dir" to the path before starting Lazarus?
- Add yet another option to Lazarus?
- Change Lazarus to search in the directory above the compiler for fpcres and other utilities?
... or is there something obvious that I've missed after messing with paths and builds for so long?

2. Non-related: Lazarus options has "Compiler path (e.g. fpc)". Wouldn'it it be *much* better to call this "Compiler (e.g. fpc.exe) location"?
IMO, path normally implies a path/directory, while the setting wants an actual directory+filename aka full path.
I know fpc.exe is a windowsism, but probably recognizable for other OS users as the indicator for the compiler executable. Alternative "Compiler executable location" perhaps? I realize this would mean changing docs etc and TBH I know what the option does so no problem if my rant is not followed up on ;)

Thanks,
Reinier

Reply by email

Sven Barth
to Reinier Olislagers
Reinier Olislagers wrote
However, when recompiling Lazarus with selected packages I get the fpcres resource compiler error not found - which is because the "plain FPC bin dir", the dir above the architecture-dependent one where the fpc executable is, and where fpcres resides in, is not in the PATH.

Downloading and extracting a FPC 2.6.2 Linux installation reveils that "fpcres" should be located inside the same directory as "fpc" (namely the "bin" directory). Everything else can be considered a bug (be it in fpcup, the Makefiles or whereever).

Regards,
Sven

Reply by email

Reinier Olislagers
to Sven Barth

On 24/01/2014 13:25, Sven Barth wrote:
Thanks for the quick reply, Sven!

Downloading and extracting a FPC 2.6.2 Linux installation reveils that "fpcres" should be located inside the same directory as "fpc" (namely the "bin" directory). Everything else can be considered a bug (be it in fpcup, the Makefiles or whereever).

Yes, 2.6.x but not trunk (with make install from source). See also Jonas' reply here:
http:/msg35672.html

Reply by email

Sven Barth
to Reinier Olislagers
Reinier Olislagers wrote 10 lines
On 24/01/2014 13:25, Sven Barth wrote: Thanks for the quick reply, Sven! > Downloading and extracting a FPC 2.6.2 Linux installation reveils that > "fpcres" should be located inside the same directory as "fpc" (namely > the "bin" directory). Everything else can be considered a bug (be it in > fpcup, the Makefiles or whereever). Yes, 2.6.x but not trunk (with make install from source). See also Jonas' reply here: http:/msg35672.html

Then the bug is that "fpc" is not in the "bin" directory and that's what Jonas meant.

The normal installation structure on *nix systems is this:

PREFIX (e.g. "/", "/usr", "/usr/local" or a custom directory (I myself use "/mnt/data/applications/$fpcversion"))
bin
fpc
fpcres
(etc.)
lib
fpc
2.6.2
ppc386
ppcx64
(etc.)
units
i386-linux
x86_64-linux
(etc.)
2.7.1
(...)
doc
(...)
share
(...)

Regards,
Sven

Reply by email

Reinier Olislagers
to Sven Barth
Sven Barth wrote 13 lines
Am 24.01.2014 13:27, schrieb Reinier Olislagers: > On 24/01/2014 13:25, Sven Barth wrote: > Thanks for the quick reply, Sven! > >> Downloading and extracting a FPC 2.6.2 Linux installation reveils that >> "fpcres" should be located inside the same directory as "fpc" (namely >> the "bin" directory). Everything else can be considered a bug (be it in >> fpcup, the Makefiles or whereever). > Yes, 2.6.x but not trunk (with make install from source). See also > Jonas' reply here: > http:/msg35672.html Then the bug is that "fpc" is not in the "bin" directory and that's what Jonas meant.

Interesting...

The normal installation structure on *nix systems is this:

Thanks.
I suppose I'll have to do a regular manual install (fpcup cheats by installing in the same tree as the svn sources which is not supported, I know) and see what goes where.

I'd either have to
- rework fpcup so it exports the sources to a different dir which is IMO overkill if you want to have a couple of fpc versions
- do something else. I'm now thinking of just symlinking from the arch dir to the plain bin dir... but I think I'd better sleep over it (a bit too tired of messing with compiler flags, build tests etc).

Reply by email

Sven Barth
to Reinier Olislagers
Reinier Olislagers wrote 15 lines
On 24/01/2014 13:35, Sven Barth wrote: > Am 24.01.2014 13:27, schrieb Reinier Olislagers: >> On 24/01/2014 13:25, Sven Barth wrote: >> Thanks for the quick reply, Sven! >> >>> Downloading and extracting a FPC 2.6.2 Linux installation reveils that >>> "fpcres" should be located inside the same directory as "fpc" (namely >>> the "bin" directory). Everything else can be considered a bug (be it in >>> fpcup, the Makefiles or whereever). >> Yes, 2.6.x but not trunk (with make install from source). See also >> Jonas' reply here: >> http:/msg35672.html > Then the bug is that "fpc" is not in the "bin" directory and that's what > Jonas meant. Interesting...

Maybe I should have written "and that's what Jonas would have said if he'd known the "big picture" like I do now" ^^

Show quoted text 5 lines
> The normal installation structure on *nix systems is this: Thanks. I suppose I'll have to do a regular manual install (fpcup cheats by installing in the same tree as the svn sources which is not supported, I know) and see what goes where.

It *should* normally work as the set of directories created by "install" ([bin, lib, usr, share] on *nix, [bin, msg, units] on Windows) are distinct from the source directories.

I'd either have to - rework fpcup so it exports the sources to a different dir which is IMO overkill if you want to have a couple of fpc versions

You should be able to export into the same directory as long as the common tools are those of the younger version. Otherwise you could for example not use "fpc -Pjvm ..." if your "fpc" binary is a 2.6.2 one. But a 2.7.1 fpc will happily drive a 2.6.2 ppcX binary ;)

- do something else. I'm now thinking of just symlinking from the arch dir to the plain bin dir... but I think I'd better sleep over it (a bit too tired of messing with compiler flags, build tests etc).

Since the best ideas normally come either when sleeping, riding a bike or taking a shower I'd suggest you definitely to sleep over it ;)

Regards,
Sven

Reply by email

Reinier Olislagers
to Reinier Olislagers: Interesting... Thanks. I suppose I'll have to do a regular manual install (fpcup cheats by
Reinier Olislagers wrote 13 lines
On 24/01/2014 13:35, Sven Barth wrote: > Am 24.01.2014 13:27, schrieb Reinier Olislagers: >> On 24/01/2014 13:25, Sven Barth wrote: I suppose I'll have to do a regular manual install (fpcup cheats by installing in the same tree as the svn sources which is not supported, I know) and see what goes where. I'd either have to - rework fpcup so it exports the sources to a different dir which is IMO overkill if you want to have a couple of fpc versions - do something else. I'm now thinking of just symlinking from the arch dir to the plain bin dir... but I think I'd better sleep over it (a bit too tired of messing with compiler flags, build tests etc).

Modified fpc.cfg to use -FD and added the "regular bin path" and "plain bin path". Seems to work ok.

Reply by email