evpo / EncryptPad

Minimalist secure text editor and binary encryptor that implements RFC 4880 Open PGP format: symmetrically encrypted, compressed and integrity protected. The editor can protect files with passwords, key files or both.
https://evpo.net/encryptpad
Other
433 stars 64 forks source link

Problem with Big Sur #99

Closed Kevin-Prichard closed 3 years ago

Kevin-Prichard commented 3 years ago

I recently upgraded a 2017 MBP (15" i7) to OSX 11.1 Big Sur. EncryptPad would then freeze every time opened, showing 99% cpu core usage on top and Activity Monitor, had to be put down via kill -9. I looked a bit at the crash report but didn't spot anything obvious, and didn't want to invest time right away in firing up a debugger.

Being that I've still got the latest release (0.5.0.0 from May), I figured well OK let's build it - maybe that'll cure the freeze-up (short version: yes it did). So, following the standard build instructions, I ran into a quirk centered around pkg-config.

My pkg-config comes from Homebrew (work laptop, otherwise it'd be MacPorts), which sports a --list-all option instead of the --list-package-names expected by configure.py (they produce same output, I think ?)

So, configure.py isn't aware of this variation, and doesn't know how to deal (although I believe you could bluff your way past it by supplying the --build-xyz options it's checking for anyways.) Partly this is due to errors within external_command(cmd) not always making their way back to callers.

So I contrived a way to route most errors from external_command(cmd) back to callers, and use that to detect when --list-package-names wasn't found as expected, then to reinvoke it as pkg-config --list-all and get the packages.

After that, a working build was maked, and I am able to edit files as usual. I'll submit the patch in a PR linked to this issue.

So, of course, the patch only addresses the running of configure.py on macOS, not why the current beta release gets stuck on Big Sur. At this point, seems the only thing needs doing is to rebuild and repost the current tag as a release (hopefully a Big Sur-built version will still execute on earlier releases without a similar issue, no reason why not.)

evpo commented 3 years ago

Hi Kevin,

Thanks for investing the time to resolve the build issue. The issue you observed on macOS was related to the one on Windows in which pkg-config was not found. I introduced an unconditional check for pkg-config packages on Windows and macOS by mistake. pkg-config is only supposed to work on Linux by intent and there is no support for Windows and macOS. This subsystem is rare outside of Linux so I never supported it. I understand that I created this puzzle for you with my last change. My bad.

I updated configure.py to build all dependencies by default on macOS and Windows. This should fix your macOS build as well.

girishnair12345 commented 3 years ago

I am using Big Sur and it gets stuck. Is this fix released? I even tried the 5.0.0 beta version and it just gets stuck

evpo commented 3 years ago

The game needs to be recompiled on Big Sur. There must be loss of backward compatibility with binaries built for previous macOS versions. My personal Mac Book Pro is late 2012 and it doesn't support Big Sur. I am organizing a supporting device to build the release.

girishnair12345 commented 3 years ago

Ok Pls, do when you have the device. Thanks for contributing such good projects to the community Great Work 👍

evpo commented 3 years ago

The new release v0.5.0.1 should solve this problem.