Gittyup icon indicating copy to clipboard operation
Gittyup copied to clipboard

Revive macOS 10.15 Catalina support

Open Sniperq2 opened this issue 2 years ago • 4 comments

I found that new binaries on a site for macos 12.6 or above.

Any way I could compile trunk version without a glitch. I am interrested in revive support for macos Catalina do you need any help with it?

Sniperq2 avatar Jan 28 '23 12:01 Sniperq2

Your help would be appreciated, we currently don't have anybody with a Mac as a contributor Also, we have little to no experience with macOS, so you'd need to tell us how we can compile for Catalina on Monterey or Big Sur (the Catalina runner for GitHub Actions is deprecated)

exactly-one-kas avatar Jan 30 '23 08:01 exactly-one-kas

Glad to hear that you are interrested too.

Here is a step-by-step manual(?):

  1. git submodule init
  2. git submodule update
  3. Build OpenSSL 3.1 # Start from root of gittyup repo.
cd dep/openssl/openssl
 ./Configure darwin64-arm64-cc no-shared
make

Here I faced with small problem: Lack of #include <string.h> string in test/v3ext.c in openssl library submodule (see : openssl 18720)

Next is ok:

Start from root of gittyup repo.
mkdir -p build/release
cd build/release  

---------- down to this line all is the same as described in README.md file-------

Two differences I have made:

  1. change "Ninja" to "Unix Makefiles" as generator (I think that this could be fine for all "macos'es"):
  2. Add -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 to cmake line

cmake -G "Unix Makefiles" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release ../..

After building I got:

otool -l Gittyup.app/Contents/MacOS/Gittyup -arch x86_64 | grep minos
    minos 10.15

and with downloaded executable I got:

otool -l Gittyup.app/Contents/MacOS/Gittyup -arch x86_64 | grep minos
    minos 12.6

So that's it.

Sniperq2 avatar Jan 30 '23 16:01 Sniperq2

thanks for your work! can we see a compiled app somewhere in releases tab?)))

Ivan-Igorevich avatar Mar 15 '23 19:03 Ivan-Igorevich

I followed the steps from sniperq2 using an M2 macbook pro. I installed qt5 with homebrew but I had to add this option to the cmake command -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5

My full cmake steps that resulted in a working build.

cmake -G "Unix Makefiles" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 ../..
make

** End of What worked **

** From here on describes what did not work, but then later did work ** I've been unable to build with ninja. I got an error that I think is the same as sniperq2. I also had to do the qt stuff for the ninja build and it looked like this

cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 ../..
ninja

That gives this error image

Now things get weird. After I did that "unix makefiles" that worked, my ninja build now works. I don't know enough to know why. Just thought it might help someone to post what happened.

NathanielACollier avatar Oct 07 '23 13:10 NathanielACollier