Recent

Author Topic: lazarus.app has extended attributes  (Read 548 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2182
    • tomboy-ng, a rewrite of the classic Tomboy
lazarus.app has extended attributes
« on: September 14, 2022, 07:39:49 am »
Spotted a problem with the lazarus.app in fixes_2_2. I am using an aging Sierra Mac, FPC322 and a Lazarus Fixes built from source downloaded yesterday.

It will not start lazarus for me, I get -
Code: [Select]
>$ open lazarus.app LSOpenURLsWithRole() failed with error -10810 for the file /Users/dbannon/bin/Lazarus/lazarus-fixes_2_2/lazarus.app.
Easy to confirm that the .app was the problem and the reason seems to be that the 'Contents' directory (etc) has extended attributes -
Code: [Select]
>$ ls -l lazarus.app-orig
drwxr-xr-x@  6 dbannon  staff   204  9 Sep 23:01 Contents

>$ xattr -l lazarus.app-orig/Contents com.apple.quarantine: 0081;63207498;Firefox.app;57911FAB-F89-4721-8F92-38E4AD138B9A
Note the '@' appended to the ls permissions string, it says extended attributes are present.

An older lazarus.app file brought in from elsewhere does not have extended attribues and does start lazarus correctly.

Anyone know how those attributes got to be be part of the lazarus.app thingo ?  Is it now part of the Lazarus source or did my Mac put them in as a record of where the lazarus.app came from ? I did download using Firefox.

Am I seeing this (easily fixed) problem because I am using Sierra ?

Another, somewhat related matter. I was surprised to see Fixes decides to use a 32bit compiler by default. About time we defaulted to 64bit I would have thought ?

Davo

Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1998
  • Former Delphi 1-7, 10.2 user
Re: lazarus.app has extended attributes
« Reply #1 on: September 15, 2022, 06:37:45 am »
I suspect it is almost certain that macOS added the quarantine attribute. The same thing happened when I downloaded my own source code from Sourceforge after uploading it :)
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

dbannon

  • Hero Member
  • *****
  • Posts: 2182
    • tomboy-ng, a rewrite of the classic Tomboy
Re: lazarus.app has extended attributes
« Reply #2 on: September 16, 2022, 02:04:42 am »
Wow, then how can we stop that from happening ?  Apparently random ? A new user would not be able or willing to dig around, they would assume its a failed build and blame Lazarus. Not good.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1998
  • Former Delphi 1-7, 10.2 user
Re: lazarus.app has extended attributes
« Reply #3 on: September 16, 2022, 02:49:15 am »
I provide instructions at https://sourceforge.net/projects/macos-lazarus-snapshots/ for my Snapshots of Lazarus + FPC. I haven't had any complaints so far :)
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

dbannon

  • Hero Member
  • *****
  • Posts: 2182
    • tomboy-ng, a rewrite of the classic Tomboy
Re: lazarus.app has extended attributes
« Reply #4 on: September 20, 2022, 03:23:01 pm »
Hmm, from the wiki "Installing Lazarus" page we click "Installing_Lazarus_on_macOS", scroll right down the bottom to "See Also", from there we click "Other macOS installation options." and from there we scroll down to the bottom and click on "source forge".

Trev, I think its great what you have done but you need to get out there and sell it man !

Too late to fire up my horrible Mac tonight, I'll give it a go tomorrow but just a touch worried that instructions appear a bit scant and its a week old ?   Is that right ?

Code: [Select]
1. Move lazarus-src to your home directory
2. Use a script to start Lazarus like:

Should there be a build process or a download of precompiled binaries happening ?

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1998
  • Former Delphi 1-7, 10.2 user
Re: lazarus.app has extended attributes
« Reply #5 on: September 20, 2022, 03:46:26 pm »
The snapshots are really for the hard core, not new or occasional users...

I don't follow the next bit:

Quote
Should there be a build process or a download of precompiled binaries happening ?

The snapshot is the daily source and freshly compiled binaries.
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

dbannon

  • Hero Member
  • *****
  • Posts: 2182
    • tomboy-ng, a rewrite of the classic Tomboy
Re: lazarus.app has extended attributes
« Reply #6 on: September 21, 2022, 01:02:33 pm »
I think you have nailed it Trev, the snaphots are now up to date again.

The instructions on https://wiki.freepascal.org/Other_macOS_installation_options are the ones that I felt were a bit vague. Maybe a step zero, "download and unzip..." ?   

Anyway, the real solution to my problem is on your SourceForge page, your script has some attr magic that probably removes the offending file attributes from lazarus.app (I just grabbed an old lazarus.app from previous install).

Maybe that command needs to find its way to https://wiki.freepascal.org/Installing_Lazarus_on_macOS ??

And if your snapshot approach is a good way to install, maybe it also needs to be mentioned on https://wiki.freepascal.org/Installing_Lazarus_on_macOS ? But the standard unix (and you keep reminding me that MacOS is Unix  :D ) install from source is still viable given your attr magic.

I have not tried the snapshot yet so don't know how, for example, it works with my liking for having several versions and both Lazarus and FPC in user space.

I'd rather not hack away at the MacOS page, thats your thing !

Thanks.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

 

TinyPortal © 2005-2018