Recent

Author Topic: compile lazrus ide on MacOS Arm  (Read 9279 times)

powerpcer

  • Full Member
  • ***
  • Posts: 100
compile lazrus ide on MacOS Arm
« on: June 05, 2021, 04:39:07 am »
build it on MacOS, every thing goes good,but launch startlazarus with "open startlazarus".
it show don't have permission.
do i miss something?
i had check in developer.apple.com, looks no solution for this problem.
any one have solution?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: compile lazrus ide on MacOS Arm
« Reply #1 on: June 05, 2021, 07:06:21 am »
why happens if you start it with "open lazarus"?

powerpcer

  • Full Member
  • ***
  • Posts: 100
Re: compile lazrus ide on MacOS Arm
« Reply #2 on: June 05, 2021, 08:05:15 am »
when i typed, it shows lazarus startup picture, and then
termined.
message below:
Code: Pascal  [Select][+][-]
  1. he application /Users/terrylou/Downloads/lazarus/lazarus-upstream/lazarus.app cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10826 "kLSNoLaunchPermissionErr: User doesn't have permission to launch the app (managed networks)" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2539, NSUnderlyingError=0x136f06880 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x136f072a0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 111}}}}}
  2. Saving session...
  3. ...copying shared history...
  4. ...saving history...truncating history files...
  5. ...completed.
  6.  

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: compile lazrus ide on MacOS Arm
« Reply #3 on: June 05, 2021, 08:48:08 am »
check if you've a quarantine mark on the app.
If you did build it, you should not have it, BUT it never hurts to check. Maybe the macOS security is more tricky.

Also make sure that Unix  execute right is specified for "lazarus" executable. (which should be found next the Lazarus.app directory/bundle)



trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: compile lazrus ide on MacOS Arm
« Reply #4 on: June 05, 2021, 11:11:09 am »
1. Are you using an M1 (Apple Processor) Mac?

2. Did you compile an Intel or ARM64 version of Lazarus?

powerpcer

  • Full Member
  • ***
  • Posts: 100
Re: compile lazrus ide on MacOS Arm
« Reply #5 on: June 05, 2021, 01:22:21 pm »
1. Are you using an M1 (Apple Processor) Mac?

2. Did you compile an Intel or ARM64 version of Lazarus?
1. yes
2. i use fpc-3.2.2.intelarm64-macosx.dmg to compile lazarus

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: compile lazrus ide on MacOS Arm
« Reply #6 on: June 06, 2021, 01:36:45 am »
This was unanswered:

2. Are you compiling an Intel or ARM64 version of Lazarus?

and

3. What command line did you use to compile Lazarus with FPC?

Note: You can download a pre-compiled daily development snapshot of Lazarus for ARM64 from https://sourceforge.net/projects/macos-lazarus-snapshots/ - it would be interesting to know whether that Lazarus version works for you.

powerpcer

  • Full Member
  • ***
  • Posts: 100
Re: compile lazrus ide on MacOS Arm
« Reply #7 on: June 06, 2021, 05:01:25 am »
my cmd for build lazarus was
Code: Pascal  [Select][+][-]
  1. make distclean all LCL_PLATFORM=cocoa CPU_TARGET=aarch64 bigide
  2.  

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: compile lazrus ide on MacOS Arm
« Reply #8 on: June 07, 2021, 03:01:32 am »
This seems to be a very odd Gatekeeper issue. It's hard for me to help because when I compile Lazarus (daily) on my M1 Mac mini I do not experience the issue with the resulting binaries. They are always successfully executable.

Maybe it's a code directory hash issue: Try deleting the existing lazarus and startlazarus executables first and then recompiling.


trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: compile lazrus ide on MacOS Arm
« Reply #9 on: June 07, 2021, 03:45:20 am »
I just noticed that you are doing this in your Downloads directory - try moving the source to a directory not subject to the operating system's TCC (Transparency, Consent, and Control). Try your home directory (ie move lazarus-upstream to /Users/terrylou/lazarus-upstream) and recompile.

powerpcer

  • Full Member
  • ***
  • Posts: 100
Re: compile lazrus ide on MacOS Arm
« Reply #10 on: June 07, 2021, 08:00:50 am »
thanks, trev.
i had download your daily build, when i use your command to open lazarus, it shows me that binary have no signature, just like download old intel lazarus running.
i test my build, if don't use open, it will open lazarus and tell me debugger not set, but i cannot do any input into lazarus setting, because all input will catch by terminal.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: compile lazarus ide on macOS Arm64
« Reply #11 on: June 07, 2021, 10:16:38 am »
thanks, trev.
i had download your daily build, when i use your command to open lazarus, it shows me that binary have no signature, just like download old intel lazarus running.

You should be able to just ad hoc sign the executable binaries (ie sign with the pseudo-identity “-” a dash). For example: codesign --force -s - lazarus

Quote
i test my build, if don't use open, it will open lazarus and tell me debugger not set, but i cannot do any input into lazarus setting, because all input will catch by terminal.

1. Did you delete previous executables?
2. Did you move the code directory to your home directory?
« Last Edit: June 07, 2021, 10:32:23 am by trev »

powerpcer

  • Full Member
  • ***
  • Posts: 100
Re: compile lazarus ide on macOS Arm64
« Reply #12 on: June 07, 2021, 03:11:39 pm »
thanks, trev.
i had download your daily build, when i use your command to open lazarus, it shows me that binary have no signature, just like download old intel lazarus running.

You should be able to just ad hoc sign the executable binaries (ie sign with the pseudo-identity “-” a dash). For example: codesign --force -s - lazarus

this simple, i solved.
Quote
i test my build, if don't use open, it will open lazarus and tell me debugger not set, but i cannot do any input into lazarus setting, because all input will catch by terminal.

1. Did you delete previous executables?
2. Did you move the code directory to your home directory?
because download your daily build, i have not previous lazarus.
and i will test if i move it to below of home DIR, current my source in $HOME/Downloads/lazarus/lazarus-upstrem/
when i move it to $HOME/, and run : open startlazarus
it show same no permission message.
and i try to run with : open lazarus
it how 2 hint, 1. primaryconfigpath="User/xxx/.lazarus"
2. SecondaryConfigPath="/etc/lazarus"
« Last Edit: June 07, 2021, 03:16:28 pm by powerpcer »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: compile lazrus ide on MacOS Arm
« Reply #13 on: June 08, 2021, 01:35:09 am »
I'm having great difficulty understanding what you actually do after I ask you to do something. So, please, do exactly what I ask and report back on it. Missing out a step or not doing it in the order asked can be the difference between something working or not and leaves me with no data points to help with debugging the issue.

Your source
========

1. Move the source directory to your home directory.
2. Delete the executables.
3. Recompile.
4. $ open lazarus (not startlazarus)

Does it work?

Daily snapshot
=========

1. Move the source directory to your home directory.
2. Ad hoc sign the executables as described previously.
3. $ open lazarus (not startlazarus)

Does it work?
« Last Edit: June 08, 2021, 01:37:08 am by trev »

powerpcer

  • Full Member
  • ***
  • Posts: 100
Re: compile lazrus ide on MacOS Arm
« Reply #14 on: June 08, 2021, 05:01:04 am »
I'm having great difficulty understanding what you actually do after I ask you to do something. So, please, do exactly what I ask and report back on it. Missing out a step or not doing it in the order asked can be the difference between something working or not and leaves me with no data points to help with debugging the issue.

Your source
========

1. Move the source directory to your home directory.
2. Delete the executables.
3. Recompile.
4. $ open lazarus (not startlazarus)

Does it work?

Daily snapshot
=========

1. Move the source directory to your home directory.
2. Ad hoc sign the executables as described previously.
3. $ open lazarus (not startlazarus)

Does it work?
I'm having great difficulty understanding what you actually do after I ask you to do something. So, please, do exactly what I ask and report back on it. Missing out a step or not doing it in the order asked can be the difference between something working or not and leaves me with no data points to help with debugging the issue.

Your source
========

1. Move the source directory to your home directory.
2. Delete the executables.
3. Recompile.
4. $ open lazarus (not startlazarus)

Does it work?

Daily snapshot
=========

1. Move the source directory to your home directory.
2. Ad hoc sign the executables as described previously.
3. $ open lazarus (not startlazarus)

Does it work?
Your source
========
after recompile, the permission problem solved,
but when type:open lazarus
it shows me to config, and all what i type in config screen, will show in terminal not in config screen
look at attachment,

if i change to: open -a lazarus
it shows the same as yours without codesign: "lazarus" cannot be opened because the developer cannot be verified

type: codesign --force -s - lazarus
lazarus: replacing existing signature

Daily snapshot
=========
type: codesign --force -s - lazarus
objc[798]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f3eeec10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1189e42b8). One of the two will be used. Which one is undefined.


 

TinyPortal © 2005-2018