portacle / portacle

A portable common lisp development environment
https://portacle.github.io
zlib License
694 stars 56 forks source link

unable to complete installation on Mac OS X Catalina #127

Open iacoporoc opened 4 years ago

iacoporoc commented 4 years ago

-Due to "security" reasons on OS X you must then move the Portacle.app within the extracted directory into another directory like projects/ and back again using Finder- this part seems impossible to execute I might have misinterpreted it but neither could the apple care technical department, I am terrible at installing stuff and new to the Mac system so I hope it's just me and there will be no problems

clartaq commented 4 years ago

Same.

yeonsh commented 4 years ago

Same here.

siwells commented 4 years ago

Not a fix, more of a temporary workaround, but I got Portacle running on Catalina by disabling both SIP and Gatekeeper.

Obvious caveats apply that this goes against the Apple security model but I am firmly of the opinion that it is my computer to do with as I please so here goes:

  1. Restart your Mac
  2. When you hear the tone, hold CMD+R until your machine starts to boot. This might take a moment but will leave you in the mac-os recovery console.
  3. Select "Terminal" from the "Utilities" menu
  4. Enter the following command to disable SIP: $ csrutil disable $ spctl --master-disable
  5. Reboot

You should now be able to run Portacle as normal.

NB. I think you can issue both the above commands from a regular terminal if you've enabled the root user account but I haven't verified this.

Shinmera commented 4 years ago

It's possible that my workaround for Portacle ceased to work on Catalina. I have not been able to look into it as I have very little time and energy to spare to catch up with Apple's increasingly hostile environment.

For now, disabling these 'security features' might be the only way to get it running, short of compiling it from scratch. That's a big bummer, and it bothers me a lot, but I'm not sure there's a lot that can be done about this except shill out the yearly 100$ licensing fee to start signing the portacle app, which I am not ready to do.

siwells commented 4 years ago

No problem from my perspective. Don't feel in any way bad that you don't have the time to jump through Apple's hoops. I'm just happy this software exists and am grateful you've brought it this far. Best, Simon

gamecubate commented 4 years ago

Couldn't launch the app on Catalina until, per @iacoporoc's suggestions, I moved Portacle.app into the projects/ folder, and back. All good now.

nathanielwheeler commented 4 years ago

I haven't been able to get this to work on Catalina at all. I tried moving it to projects and back. However, when I "open anyway" in the security & privacy tab of system preferences, it tells me it can't run emacs—twice. I "open anyway" twice. Then it does the same thing for git. Then for a lib file. And so on. At the end, it tells me portacle can't be opened, please tell Apple the issue.

Anyway, I'll have a Pinebook Pro coming in (running KDE Manjaro) as soon as the Hong Kong riots and COVID-19 stop disrupting shipping, so I suppose I'll have to wait until then to run LISP.

Or, I can do as @siwells did and disable security. Not sure if I'll do that yet, I'm going to wait until I'm not seeing red before I make a decision on that front.

yeonsh commented 4 years ago

I am finally able to run Portacle on Catalina. I used /usr/bin/codesign to re-codesign all libraries and executables included. (Used xattr -cr to clear some permission bits from files before the codesign)

siwells commented 4 years ago

@yeonsh Such a brilliant and obvious solution (now kicking self). Will be refreshing install of another machine in the next week or so and will report back on my experience.

OldSubSailor commented 4 years ago

First of all, Gatekeeper is a SECURITY feature, not a hostile environment; Is it a pain, well yes, but then reliable security always is. If you do not like it, then get a Windows box, or install a different OS on your Mac. I have also been jumping through the various Gatekeeper security hoops and even have the security disable command lines in my .zshrc file as aliases, but I do hate going that route (security don't ya know). That being said, the moving the program file is new to me, but I have discovered that if I don't do that step, I can get to the first "open anyway" step and after that nothing happens and it looks like Portable went into limbo. So when I did do it, I went through the expected, click cancel, click open anyway, click open steps that I have seen in the past. Then I get a crash. Portcale cras.txt

OldSubSailor commented 4 years ago

And an Interesting return in the terminal Desktop/portacle/Portacle.app/Contents/MacOS/portacle ; exit; dyld: Library not loaded: @loader_path/libnettle.6.dylib Referenced from: /Users/Desktop/portacle/mac/lib/libgnutls.30.dylib Reason: no suitable image found. Did find: /Users//Desktop/portacle//mac/emacs/bin/../../lib/libnettle.6.dylib: code signature in (/Users//Desktop/portacle//mac/emacs/bin/../../lib/libnettle.6.dylib) not valid for use in process using Library Validation: library load disallowed by system policy /Users//Desktop/portacle//mac/emacs/bin/../../lib/libnettle.6.dylib: stat() failed with errno=1 /Users//Desktop/portacle/mac/lib/libnettle.6.dylib: code signature in (/Users//Desktop/portacle/mac/lib/libnettle.6.dylib) not valid for use in process using Library Validation: library load disallowed by system policy /Users//Desktop/portacle/mac/lib/libnettle.6.dylib: stat() failed with errno=1 zsh: abort /Users//Desktop/portacle/Portacle.app/Contents/MacOS/portacle

[Process completed]

OldSubSailor commented 4 years ago

Finally, I have gone through this process installing other software and numerous additional aircraft for X-plane (the latest just 2 days ago), but I can't get this installed. I even disabled gatekeeper security and that did not help. So I think that there is something very strange going on with this particular application.

OldSubSailor commented 4 years ago

It looks like I finally got it up and running. However it is a lengthy process and requires that one try to open/run the application many times, interacting with the security preferences as described above. I am attaching "list" of screenshots that shows about how many steps are required. There were several crashes as I mentioned before, but I kept working through them and finally got there.

Installing Portacle.zip

OldSubSailor commented 4 years ago

Given the intense effort to get this program working, what does it offer over Lipspworks and BBEdit?

liminalitythree commented 4 years ago

I wrote a script that fixes the issues using @yeonsh 's solution

first, create a self-signed code signing cert

and then run this in the portacle directory (the directory with Portacle.app in it) (replace "Code Signing Cert" with the name of the cert you created)

#!/bin/sh

cert="Code Signing Cert"

$(xattr -cr ./Portacle.app)
$(codesign -s "$cert" ./Portacle.app)

list=$(find . -type f -perm +0111)
for a in $list
do
    if [ "$(file $a | grep "Mach-O 64-bit executable" )" != "" ];
    then
        $(xattr -cr $a)
        $(codesign -s "$cert" $a)
    fi
done

for a in $(find . -type f -name "*.dylib")
do
    $(xattr -cr $a)
    $(codesign -s "$cert" $a)
done

$(xattr -cr ./mac/sbcl/lib/sbcl/sbcl.core)
$(codesign -s "$cert" ./mac/sbcl/lib/sbcl/sbcl.core)
Shinmera commented 3 years ago

For what it's worth, I've recently received a good donation to cover the costs of an Apple developer license. I've then implemented the necessary bits to sign all binaries and notarise the release package, but there are still outstanding issues that I have not been able to investigate yet (the package does not launch, at all).

So work is being done to fix this, but as I'm still otherwise employed it might take a while to be finished.

siwells commented 3 years ago

Thanks @Shinmera. I think everyone using Portacle is appreciative of any efforts you're making. I'm happy to wait for a better solution as long as it takes (& I still have my hacky solution working in the meantime).

yarkun commented 3 years ago

I use Catalina. First, I tried moving the Portacle.app file around and allowing various files to be opened via the system preferences/security & privacy/general before deleting the quarantine attributes multiple times. Next time I opened the app, the same warnings came up again.

Finally, I got it working by deleting the quarantine attributes of all the files in the portacle directory:

xattr -dr com.apple.quarantine /Applications/portacle/

There were some Permission denied errors on git objects but I am not yet sure if they have any effect.

Shinmera commented 1 year ago

Hi. Please try the latest pre-release: https://github.com/portacle/portacle/releases/tag/1.4c It was created under macOS 12, so it may not launch on older versions. I'd be interested to know about that. It's been signed using a self-signed certificate, which must first be installed using the mac-fixup.sh script. The script will also clear security attributes. Unfortunately there's no way to make the script runnable via a simple double-click, so it has to be done via the terminal.

caovv1998 commented 1 year ago

Hi. Please try the latest pre-release: https://github.com/portacle/portacle/releases/tag/1.4c It was created under macOS 12, so it may not launch on older versions. I'd be interested to know about that. It's been signed using a self-signed certificate, which must first be installed using the mac-fixup.sh script. The script will also clear security attributes. Unfortunately there's no way to make the script runnable via a simple double-click, so it has to be done via the terminal.

Hi, thanks for your fixing work, but is seems like not works on my mac which os version is Monterey 12.6. I had run the the mac-fixup.sh script via terminal and then double-click the portacle.app. However, the app icon flash on dock, there is noting happened after icon flash.

Accessibilly commented 1 year ago

I use Catalina. First, I tried moving the Portacle.app file around and allowing various files to be opened via the system preferences/security & privacy/general before deleting the quarantine attributes multiple times. Next time I opened the app, the same warnings came up again.

Finally, I got it working by deleting the quarantine attributes of all the files in the portacle directory:

xattr -dr com.apple.quarantine /Applications/portacle/

There were some Permission denied errors on git objects but I am not yet sure if they have any effect.

On Ventura (Mac OS 13.2.1) I had a similar experience with the popups, and the command above worked for me.

Thanks, @yarkun!

And many thanks to @Shinmera for Portacle. I haven't read a line of emacs documentation yet, but the REPL works the way I expected. I was up and running more quickly with Portacle than with various Clojure setups.