compile lazrus ide on MacOS Arm lazarus / 13-General ---------------------------------------------------------------------- powerpcer · 2021-06-05 02:39 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 · 2021-06-05 05:06 why happens if you start it with "open lazarus"? ---------------------------------------------------------------------- powerpcer · 2021-06-05 06:05 when i typed, it shows lazarus startup picture, and then termined. message below: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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}}}}}Saving session......copying shared history......saving history...truncating history files......completed. ---------------------------------------------------------------------- skalogryz · 2021-06-05 06:48 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 · 2021-06-05 09:11 1. Are you using an M1 (Apple Processor) Mac? 2. Did you compile an Intel or ARM64 version of Lazarus? ---------------------------------------------------------------------- powerpcer · 2021-06-05 11:22 Quote from: trev on June 05, 2021, 11:11:09 am1. 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 · 2021-06-05 23:36 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 · 2021-06-06 03:01 my cmd for build lazarus was Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i make distclean all LCL_PLATFORM=cocoa CPU_TARGET=aarch64 bigide ---------------------------------------------------------------------- trev · 2021-06-07 01:01 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 · 2021-06-07 01:45 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 · 2021-06-07 06:00 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 · 2021-06-07 08:16 Quote from: powerpcer on June 07, 2021, 08:00:50 amthanks, 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 Quotei 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? ---------------------------------------------------------------------- powerpcer · 2021-06-07 13:11 Quote from: trev on June 07, 2021, 10:16:38 amQuote from: powerpcer on June 07, 2021, 08:00:50 amthanks, 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. Quotei 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" ---------------------------------------------------------------------- trev · 2021-06-07 23:35 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? ---------------------------------------------------------------------- powerpcer · 2021-06-08 03:01 Quote from: trev on June 08, 2021, 01:35:09 amI'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? Quote from: trev on June 08, 2021, 01:35:09 amI'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/Privat eFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1189e42b8). One of the two will be used. Which one is undefined. ---------------------------------------------------------------------- trev · 2021-06-09 07:38 Quote from: powerpcer on June 08, 2021, 05:01:04 amYour 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, OK. That's expected. Try open ./lazarus.app QuoteDaily snapshot ========= type: codesign --force -s - lazarus objc[798]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f3eeec10) and /System/Library/Privat eFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1189e42b8). One of the two will be used. Which one is undefined. That is a macOS info message because there are two dylibs for the particular function. It is not an error and is harmless but sloppy by Apple. Please try open ./lazarus.app for the now signed executable (note: you may need to also sign the .app bundle in which case use codesign --force --deep -s - lazarus.app). ---------------------------------------------------------------------- powerpcer · 2021-06-09 10:22 Quote from: trev on June 09, 2021, 09:38:54 amQuote from: powerpcer on June 08, 2021, 05:01:04 amYour 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, OK. That's expected. Try open ./lazarus.app Your source ======== type: open ./lazarus.app shows The application cannot be opened for an unexpected reason .....User doesn't have permission to launch the app(managed networks) type: codesign --force --deep -s - lazarus.app replacing existiing signature the main executable or info.plist must be a regular file (no symlinks, etc.) QuoteDaily snapshot ========= type: codesign --force -s - lazarus objc[798]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f3eeec10) and /System/Library/Privat eFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1189e42b8). One of the two will be used. Which one is undefined. That is a macOS info message because there are two dylibs for the particular function. It is not an error and is harmless but sloppy by Apple. Please try open ./lazarus.app for the now signed executable (note: you may need to also sign the .app bundle in which case use codesign --force --deep -s - lazarus.app). Daily snapshot ========= type: open ./lazarus.app same as before, show me that codesign problem. type: codesign --force --deep -s - lazarus.app objc[821]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f3eeec10) and /System/Library/Privat eFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1189e42b8). One of the two will be used. Which one is undefined. ---------------------------------------------------------------------- trev · 2021-06-09 10:40 Quote from: powerpcer on June 08, 2021, 05:01:04 amTry open ./lazarus.app Your source ======== type: codesign --force --deep -s - lazarus.app replacing existiing signature the main executable or info.plist must be a regular file (no symlinks, etc.) Replace the symlink with the real executable, re-sign with codesign --force --deep -s - lazarus.app and try open ./lazarus.app