Lazarus

Using the Lazarus IDE => General => Topic started by: MarkMLl on November 19, 2020, 10:23:15 pm

Title: Upgrading trunk: "The prefix of the ... installation is required"
Post by: MarkMLl on November 19, 2020, 10:23:15 pm
WTF is this supposed to mean? What files is it actually looking for?

MarkMLl

Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: marcov on November 19, 2020, 10:31:10 pm
? Destination of  make install maybe  ? INSTALL_PREFIX ?
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: Bart on November 19, 2020, 10:48:05 pm
But that's optional, isn't it?

Bart
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: Bart on November 19, 2020, 10:49:34 pm
WTF is this supposed to mean? What files is it actually looking for?

What exactly were you doing when you got that message?
(Upgrading trunk is a bit ambiguous.)
What is the exact message?

Bart
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: MarkMLl on November 19, 2020, 11:03:22 pm
I've taken working Lazarus trunk possibly a month old, upgraded from SVN, and recompiled with 3.2.0 rather than 3.0.4.

Installation prefix of FPC was /usr/local/bin/fpc.d/3.2.0 with fpc+fpcres+fp copied into /usr/local/bin, most binaries in /usr/local/lib/fpc/3.2.0 symlinked appropriately and sources (with temporary files cleaned) in /usr/local/src_fpc/3.2.0. That's a combination I've been using successfully for years. Lazarus build bigide OK for both qt and gtk2 but I'm stuck on a dialog(ue) at startup.

Platform is x64, Debian "stable" Linux.

Sorry if my WTF was a bit abrupt, but I've just wasted half the evening time trying (unsuccessfully) to work out what's broken Lazarus+Qt on 2.0.6+3.0.4. But that's another story.

MarkMLl
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: Bart on November 20, 2020, 08:43:54 am
How did you rebuild Lazarus: from console (make ..) or from within the IDE?

My normal workflow when upgrading the compiler is:

Note that I don't remove the old compiler (I tipically have current and last stable compiler available).

I don't have (many) non-standard packages installed, so it's not very inconvenient for me.
I've tried "make clean useride" in the past, but for some reason that always fails.

This hasn't failed me yet, but I have to say that I'm not sure wether I have updated mu Linux VM to fpc 3.2 yet. I cannot check right now, since I'm at work.

IIRC then I once tried to do this from within the IDE and it resulted in havoc.

Bart
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: MarkMLl on November 20, 2020, 09:32:48 am
How did you rebuild Lazarus: from console (make ..) or from within the IDE?

make bigide (with LCL_Platform for qt and gtk2, binaries renamed... how I've been doing it for 10+years).

Quote
My normal workflow when upgrading the compiler is:
  • Install the new compiler (I use the tar archive with the install script)
  • Download and unpack the fpc sources from the new compiler
  • In ($LazarusDir) do: make clean bigide

Note that I don't remove the old compiler (I tipically have current and last stable compiler available).

I built the compiler weeks ago, and it runs fine with Lazarus 2.0.10: it's only starting trunk that's giving problems.

Quote
I don't have (many) non-standard packages installed, so it's not very inconvenient for me.
I've tried "make clean useride" in the past, but for some reason that always fails.

[No non-standard packages at all

Quote
This hasn't failed me yet, but I have to say that I'm not sure wether I have updated mu Linux VM to fpc 3.2 yet. I cannot check right now, since I'm at work.

IIRC then I once tried to do this from within the IDE and it resulted in havoc.

I'm doing exactly what I've done for ten years or so, basically I've got appropriate combinations ranging from 0.9.24+2.2.4 through 2.0.10+3.2.0 on various systems built in exactly the same way. But something's changed in the IDE startup with the addition of the fppkg stuff, possibly because in my case some of the binaries are in /usr/local/bin/fpc.d/x.x.x or possibly because there's a symlink in the source path, and without knowing what it's supposed to be looking for I'm (a) unable to help diagnose it and (b) stuck with dysfunctional trump... take your choice which I find more irritating.

I've just updated from svn, recompiled bigide using 3.2.0, and can confirm that there is still an IDE startup problem: screenshot attached.

Referring to that dialog(ue):

Lazarus: /usr/local/share/lazarus-trunk/
Compiler: ppcx64-3.2.0 (expanded by the IDE to /usr/local/bin/ppcx64-3.2.0)
FPC sources: /usr/local/src_fpc/3.2.0 (where 3.2.0 -> fpcbuild-3.2.0/fpcsrc)

The IDE will start with the field left blank but if restarted I get the same dialogue.

MarkMLl
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: marcov on November 20, 2020, 10:09:44 am
But that's optional, isn't it?

I don't recognize the error, it is was just a wild guess. It could be it that such error happens when the default doesn't exist or is not writeable with current permissions
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: MarkMLl on November 20, 2020, 10:18:51 am
But that's optional, isn't it?

I don't recognize the error, it is was just a wild guess. It could be it that such error happens when the default doesn't exist or is not writeable with current permissions

I've missed a screenshot of a second- more useful- dialogue, which I'll append in a few minutes. I've reverted to 3.0.4 with no change, so it looks like a Lazarus problem rather than an FPC one.

FPC is (obviously) in a root-only directory, but that's never given problems in the past.

MarkMLl
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: Bart on November 20, 2020, 02:38:42 pm
I remember that I had this once before on Windows.
I have no odea how I got rid of it though.
IIRC I asked on the fpc/lazarus devel ML.

On my Linux VM I have Lazarus installed in ~/devel/lazarus, but fpc resides in /usr/local (installed as root).

I'll check my Lazarus on Linux later this day to see if I can reproduce the problem.

Bart
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: MarkMLl on November 20, 2020, 02:59:49 pm
I remember that I had this once before on Windows.
I have no odea how I got rid of it though.
IIRC I asked on the fpc/lazarus devel ML.

On my Linux VM I have Lazarus installed in ~/devel/lazarus, but fpc resides in /usr/local (installed as root).

I'll check my Lazarus on Linux later this day to see if I can reproduce the problem.

Bart

I suspect that this might be something which has crept into the configuration files, since reverting to my previous revision (63876) still appears to exhibit the problem... I'm not 100% certain of my facts there since I took a bit of time off to do some work :-)

I'm out for the afternoon, but will try to pick up some of the pieces later.

MarkMLl

Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: Bart on November 20, 2020, 03:02:48 pm
Any relation to https://bugs.freepascal.org/view.php?id=38075 ?

Bart
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: MarkMLl on November 20, 2020, 03:14:01 pm
Maybe, although I think I've already tried telling the dialogue where the sources were (noting that that directory had been cleaned after a successful build). More later.

Much later: I've got a snafu here. My fpc.d/3.2.0 files were from a 32-bit cross-build on an otherwise 64-bit system, as (I suspect) was my fpc binary. I'm working to sort things out since even if that wasn't the main problem it undoubtedly wasn't helping.

MarkMLl
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: MarkMLl on November 21, 2020, 11:30:41 am
Any relation to https://bugs.freepascal.org/view.php?id=38075 ?

Some of my problems (up to and including 2.0.10+3.2.0) were caused by trying to set up an x64 Lazarus with an i386 fpc binary. I've not tried going into the IDE code yet but it looks as though during IDE startup it checks something using the fpc binary even if the user has already explicitly said that e.g. ppcx64-3.2.0 should be used as the compiler. I don't know whether using the explicitly-specified compiler at this point would be a valid fix, but passing parameters to fpc to tell it the architecture of the IDE invoking it probably would be.

There was also something at the end of the build sequence being messed up by this, I could build the IDE for gtk2 but not for qt (the error was something like "Incompatible libqt4pas").

I'm still left with the problem as originally described when I try to start up trunk (it builds OK for both qt and gtk2).

I notice that in ide/initialsetupdlgs.pas and ide/generatefppkgconfigurationdlg.pas there's code conditional on FPC_FULLVERSION>30100 including the comment


// fpcmkcfg's version must be > 3.1. Older versions need other
// parameters. Version 0 is also allowed, because it is probably
// self-built.


I can confirm that there is no problem if the compiler version is rolled back to 3.0.4.

MarkMLl


Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: Bart on November 21, 2020, 11:19:51 pm
I can confirm that there is no problem if the compiler version is rolled back to 3.0.4.

I was unable to reproduce the issue on my Linux VM (fresh checkout of lazarus trunk, fpc 3.2.0).

Bart
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: MarkMLl on November 22, 2020, 09:18:01 am
I can confirm that there is no problem if the compiler version is rolled back to 3.0.4.
I was unable to reproduce the issue on my Linux VM (fresh checkout of lazarus trunk, fpc 3.2.0).
Bart

In that case one of us is "doing it wrong". I was using a recently-built 3.2.0 (after I realised that my fpc binary was wrong) and had got a fresh Lazarus trunk from svn. There's definitely a problem in there, and even if it's only expressing itself on my system (due to my particular filesystem layout, or my root/user split) the real issue is that there's not enough diagnostics in the output to show what's going wrong and why.

MarkMLl
Title: Re: Upgrading trunk: "The prefix of the ... installation is required"
Post by: MarkMLl on January 14, 2021, 06:59:06 pm
This is based on Lazarus trunk revision 64085 and FPC 3.2.0. That particular revision was chosen since later revisions are (currently?) not compilable with 3.0.4 and I anticipated that I might need a working IDE to debug this issue.

To progress past the initial setup dialogue with Lazarus trunk and FPC 3.2.0, (a recent) fpcmkcfg has to be on the path, and the "right answer" appears to be an fppkg.cfg file which has to be writeable (its modified timestamp is changed the first time the IDE starts). For example /usr/local/src_fpc/fpcbuild-3.2.0/fpcsrc/utils/fpcmkcfg/fppkg.cfg which the IDE can't locate by itself even if it has been told where the FPC sources are.

The IDE now appears to create a ~/.config/fppkg.cfg even if execution is qualified with a --pcp option, if this file is removed it is recreated the next time the IDE is run. These two .cfg files do not have the same content.

I think there are aspects of this which could do with being tidied up. In particular (a) starting Lazarus shouldn't update anything in the FPC source directory and (b) the working fppkg.cfg should be subject to the --pcp option.

MarkMLl
TinyPortal © 2005-2018