Lazarus

Announcements => Third party => Topic started by: daniel_sap on March 12, 2021, 09:20:04 am

Title: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: daniel_sap on March 12, 2021, 09:20:04 am
Hi,
I'm trying to install/update the fpc+laz from trunk with FPCUPdeluxe on mac mini pc and received the following error.

make[1]: *** [utils_all] Error 2
make: *** [build-stamp.x86_64-darwin] Error 2
The installer encountered the following error:
Error inside worker thread for package utils: Failed compiling: utils: External command "/Users/julian/FpcUpDeluxe/fpcupdeluxe/fpcsrc/compiler/ppcx64 -Tdarwin -FEbin/x86_64-darwin -FUunits/x86_64-darwin/ -Fu/Users/julian/FpcUpDeluxe/fpcupdeluxe/fpcsrc/rtl/units/x86_64-darwin/ -Fu/Users/julian/FpcUpDeluxe/fpcupdeluxe/fpcsrc/packages/fcl-base/units/x86_64-darwin/ -Fu/Users/julian/FpcUpDeluxe/fpcupdeluxe/fpcsrc/packages/univint/units/x86_64-darwin/ -Fu/Users/julian/FpcUpDeluxe/fpcupdeluxe/fpcsrc/packages/rtl-objpas/units/x86_64-darwin/ -Fu/Users/julian/FpcUpDeluxe/fpcupdeluxe/fpcsrc/packages/paszlib/units/x86_64-darwin/ -Fu/Users/julian/FpcUpDeluxe/fpcupdeluxe/fpcsrc/packages/hash/units/x86_64-darwin/ -Fu/Users/julian/FpcUpDeluxe/fpcupdeluxe/fpcsrc/packages/fcl-json/units/x86_64-darwin/ -Fu/Users/julian/FpcUpDeluxe/fpcupdeluxe/fpcsrc/packages/rtl-extra/units/x86_64-darwin/ -Ur -Xs -O2 -n -Fl/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -WM10.8 -Sg -vw-n-h-l-d-u-t-p-c- -dx86_64 -dRELEASE -viq ptop.pp" failed with exit code 256. Console output:
Target OS: Darwin for x86_64
Compiling ptop.pp
Linking bin/x86_64-darwin/ptop
An error occurred while linking
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
ld: framework not found CoreFoundation

fpcupdeluxe: ERROR: FPCNativeInstaller (BuildModuleCustom: FPC): Error running /usr/bin/make for FPC failed with exit code 512
. Details:


ERROR: Fpcupdeluxe fatal error !
Sequencer (FPC): Failure running fpcupdeluxe: error executing sequence FPC
Sequencer (Default): Failure running fpcupdeluxe: error executing sequence Default


I managed to do the same install successfully a few days ago.

The macOs version is: macOs Big Sur version 11.3 beta (20E5196F)

May be someone can give more information about the error
and some ideas how to proceed.

Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: trev on March 14, 2021, 01:14:25 am
[...]
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
[...]
ld: framework not found CoreFoundation
[...]
May be someone can give more information about the error
and some ideas how to proceed.

Check that the SDK is located at the path given above.

Note: when you upgrade, the standalone command line tools package often needs to be reinstalled.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: daniel_sap on March 14, 2021, 11:33:20 am
Thanks, trev, for the information.

I checked the folder /Library/Developer/CommandLineTools/SDKs
I see there are located 3 folders and one alias (folders - MacOSX.sdk 1, MacOSX10.14.sdk, MacOSX10.15.sdk) (alias MacOSX.sdk)

I tried to change the alias to MacOSX10.14 hoping that it will use this folder for the next install.
However, the same error occurred. This time FpcUpDeluxe is compiling using the MacOSX10.15.sdk


...
The installer encountered the following error:
Error inside worker thread for package utils: Failed compiling: utils: External command
...
-XR/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -WM10.8 -Sg -vw-n-h-l-d-u-t-p-c- -dx86_64 -dRELEASE -viq ptop.pp"
failed with exit code 256. Console output:
...


I assume that after OS update new folder is created there and FpcUpDeluxe started to use new folder and cannot do the install any more.

I was wandering if I can force FpcUpDeluxe to use specific folder for MacOSX.sdk
Also, more information about why the error appears in case of existing folder MacOSX.sdk will be appreciated.
And some advice how can I proceed further.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: trev on March 15, 2021, 12:07:42 am
Unfortunately I know almost nothing about FPCUpDeluxe. I was just going by the linking error message which indicated that the SDK frameworks could not be found.

Instructions for installing trunk from source can be found in the Wiki article Installing Lazarus on macOS (https://wiki.freepascal.org/Installing_Lazarus_on_macOS).

Be aware that there's currently an unrelated open bug report (https://bugs.freepascal.org/view.php?id=38576) for building Lazarus trunk with bigide on macOS.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: daniel_sap on March 16, 2021, 12:02:33 pm
Thanks trev. You helped me go a little further.

I was wandering if there is some development documentation about the bridge (where the people working on it are documenting their internal stuff)
May be I can check the tasks for the bridge.

For me is always helpful to see the big picture, the scope. It helps me later solve easily such issues. Cause now I feel a little helpless.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: trev on March 16, 2021, 12:41:14 pm
I'm happy to help.

I'm not sure what you mean by "the bridge" - could you explain more what that means?
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: DonAlfredo on March 16, 2021, 03:55:31 pm
I might try to offer some help. However, my Mac is a VM 0f 10.15 running on Windows. Help is a bit limited as you might understand.
Did you do a clean install or an update ?
If you do not mind the bandwidth used, try a clean install in a new directory if possible to help to find the issues involved.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: daniel_sap on March 16, 2021, 07:20:35 pm
Thanks DonAlfredo, may be limited help is all needed.

Did you do a clean install or an update ?

Yes, I did clean install.
I deleted the whole FpcUpDeluxe directory. Created new folder. Unziped there the latest version of the fpcupdeluxe-x86_64-darwin-cocoa.zip executable.
And run it clean. Left it for a wile and then come back to check it, and saw the error.

I'm not sure what you mean by "the bridge" - could you explain more what that means?
By bridge I mean the code that stands between LCL and Cocoa libraries. I didn't know how to call it. I suppose there is some specific pascal code or imports that make it possible LCL to work with Cocoa.
But this issue is not related to such bridge and such information. It was wrong to point my thoughts in this direction
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: DonAlfredo on March 16, 2021, 07:53:57 pm
Your install-log points me towards the cause.
Will try to solve. Stay tuned.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: daniel_sap on March 17, 2021, 11:16:30 am
Thanks @DonAlfredo,

I will stay tuned and in crouch start position :)
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: DonAlfredo on March 17, 2021, 11:45:18 am
Would you mind testing this pre-release ? Thanks.
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2n/fpcupdeluxe-x86_64-darwin-cocoa.zip
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: Rainbow6 on March 17, 2021, 01:02:39 pm
Hi,

even not being the addressee, I tested the pre-release on macOS 11.2.3 using FPC=fixes and Lazarus=trunk - worked without any problems.

Thanks for your great work - FpcUpDeluxe was, is and will always be my preferred way to install FPC and Lazarus.

Kind regards,
Daniel
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: DonAlfredo on March 17, 2021, 01:24:01 pm
That is good news ! And thanks for your kind words also !
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: daniel_sap on March 17, 2021, 01:46:43 pm
I run a clean install of fpc trunk.git + lazarus trunk.git and got the same error as before.

Now, I'm installing the latest macOs Big Sur beta 4
after that will remove and install xcode and developer-tools again

and will come back to post the results

@Rainbow6
Can you share which version of macOS you are using. In the image attached is very blurred
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: daniel_sap on March 17, 2021, 02:47:06 pm
The pre-release clean Install was SUCCESSFUL

What I did
1. Installed the latest macOS Big Sur 11.3 update - I don't believe this has something to do with the issue.
2. Uninstalled the CommandLineTools by deleting the directory /Library/Developer/CommandLineTools
3. Installed again the CommandLineTools by executing command xcode-select --install
4. Run clean install for fpc trunk.git + laz trunk.git using the FpcUpDeluxe pre-release
Result: Successful build

Most probable the reinstalling the CommandLineTools solved the issue. It is possible also the pre-release changes to be part of solution too.

Thank you, @DonAlfredo, @trev, @Rainbow6 for the help.

@DonAlfredo, if you need me in the future, for pre-release testing, for design or code reviews or anything else, I'll be glad to help you.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: Rainbow6 on March 17, 2021, 10:00:50 pm
@Rainbow6
Can you share which version of macOS you are using. In the image attached is very blurred

I use the latest plain Big Sur 11.2.3 version coming via software update / App Store - nothing fancy and no pre-releases.

And for the next post - yes - most probably it was command line tools - Xcode is very picky at this point - especially if you freshly installed Xcode and never accepted the "user agreement" even the command line tools won't work properly.

Good to read, that you managed it.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: daniel_sap on March 18, 2021, 01:15:20 pm
I use the latest plain Big Sur 11.2.3 version coming via software update / App Store - nothing fancy and no pre-releases.
Yes, it's better not to use Beta releases, but my PC is with latest betas since long time and didn't want to spent time on this.

And for the next post - yes - most probably it was command line tools - Xcode is very picky at this point - especially if you freshly installed Xcode and never accepted the "user agreement" even the command line tools won't work properly.

This is good to know. I didn't know at all that Lazarus has something to do with the xcode and command line tools.
Now, I'll keep in mind that I have to keep an eye on these tools as well.
And still don't know why exactly Lazarus needs the command line tools. I assume it is only for development and later when I prepare the installation for my clients it won't be necessary. But I'm far from that.

May be, FpcUpDeluxe could somehow catch such situations and show some message pointing in the right direction.
(don't know how much useful is this, but just to share my thoughts and ideas)
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: PascalDragon on March 18, 2021, 01:23:38 pm
And still don't know why exactly Lazarus needs the command line tools. I assume it is only for development and later when I prepare the installation for my clients it won't be necessary. But I'm far from that.

Yes, they're only required for development. Installing them sets up some paths that the compiler needs to correctly find libraries and such.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: DonAlfredo on March 18, 2021, 01:31:47 pm
Quote
May be, FpcUpDeluxe could somehow catch such situations and show some message pointing in the right direction.
Yes, that would be good. However. Fpcupdeluxe (and FPC and Lazarus) support many versions of OSX. On systems ranging from ppc to aarch64. Besides, OSX is making it harder and harder for 3rd party to fit in. Again, my OSX is a VM of 10.15 on Win. That is it. Fpcupdeluxe is 30+ binaries. From Win to Haiku. Crostools also. You can imagine: too much work.
If an error is reproduceable and can be detected, fpcupdeluxe will happily emit a message.
Title: Re: FPCUPDELUXE: Failed to Install/Update FPC+Laz from trunk
Post by: daniel_sap on March 20, 2021, 10:44:39 am
And still don't know why exactly Lazarus needs the command line tools. I assume it is only for development and later when I prepare the installation for my clients it won't be necessary. But I'm far from that.

Yes, they're only required for development. Installing them sets up some paths that the compiler needs to correctly find libraries and such.
Good to know this information. Thanks @PascalDragon

If an error is reproduceable and can be detected, fpcupdeluxe will happily emit a message.

I will keep an eye on this issue and if it appears again I will try to make it clear and reproducableA

Fpcupdeluxe (and FPC and Lazarus) support many versions of OSX. On systems ranging from ppc to aarch64. Besides, OSX is making it harder and harder for 3rd party to fit in. Again, my OSX is a VM of 10.15 on Win. That is it. Fpcupdeluxe is 30+ binaries. From Win to Haiku. Crostools also. You can imagine: too much work.

It is even difficult to imagine how much work is it.

I was thinking about something like that. When somebody compiles using the FpcUpDeluxe Darwin Cocoa and error occurs, it checks if the error contains ptop and Cocoa.sdk it can write in the console something like - 'Possible solution, reinstalling CommandLineTools'. This way for all platforms and architectures some helpful guidelines can be shown to the person in trouble.
But you know better, I just wanted to share an idea. May be in the future if times are different and situation FpcUpDeluxe can go in such direction.
TinyPortal © 2005-2018