Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac Intel El Capitan 10.11.6 #1474

Closed
francisuk1989 opened this issue Aug 19, 2021 · 25 comments
Closed

Mac Intel El Capitan 10.11.6 #1474

francisuk1989 opened this issue Aug 19, 2021 · 25 comments

Comments

@francisuk1989
Copy link

francisuk1989 commented Aug 19, 2021

Is it possible someone could make a Intel El Capitan 10.11.6 build for Mac OS X

I think it would benefit everyone that owns 2008-2012 Mac Pro due to them having 4 bay drives.

@mathiascode
Copy link
Member

I've previously attempted to create official builds for 10.13, but it turned out to be too cumbersome in the end. Using newer macOS versions to generate builds for old versions is generally a no-go, and I'm not sure if Homebrew provides any packages for 10.11 anymore. If you can get Homebrew running somehow, you should be able to install GTK3/Python deps and generate a Nicotine+ build.

@francisuk1989
Copy link
Author

francisuk1989 commented Aug 20, 2021

Thanks for trying to build an image however with homebrew i think im going to have the same error as i did in pip, it just seems to be failing on but i know this isnt nicotine package.

pygobject for using GObject introspection with Python 3;`

Currently using
Mac OS X 10.11.6
python-3.9.6-macosx10.9.pkg
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
pip3 install nicotine-plus

MP2008:~ joe$ pip3 install nicotine-plus
Collecting nicotine-plus
  Downloading nicotine_plus-3.1.1-py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 3.4 MB/s 
Collecting PyGObject>=3.18
  Downloading PyGObject-3.40.1.tar.gz (714 kB)
     |████████████████████████████████| 714 kB 7.7 MB/s 
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 /private/var/folders/s0/35n1fkk97gx2fx9q3fcvhygw0000gn/T/pip-standalone-pip-99ivku0v/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/s0/35n1fkk97gx2fx9q3fcvhygw0000gn/T/pip-build-env-4w3qz1zs/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo
       cwd: None
  Complete output (35 lines):
  Collecting setuptools
    Downloading setuptools-57.4.0-py3-none-any.whl (819 kB)
  Collecting wheel
    Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
  Collecting pycairo
    Downloading pycairo-1.20.1.tar.gz (344 kB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  Building wheels for collected packages: pycairo
    Building wheel for pycairo (PEP 517): started
    Building wheel for pycairo (PEP 517): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 /var/folders/s0/35n1fkk97gx2fx9q3fcvhygw0000gn/T/tmpd4d4kw4c_in_process.py build_wheel /var/folders/s0/35n1fkk97gx2fx9q3fcvhygw0000gn/T/tmpo8hx2jpe
         cwd: /private/var/folders/s0/35n1fkk97gx2fx9q3fcvhygw0000gn/T/pip-install-vmk9_w66/pycairo_8a8d13556d30432f930f5fd3814c8d1b
    Complete output (12 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.9
    creating build/lib.macosx-10.9-x86_64-3.9/cairo
    copying cairo/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/cairo
    copying cairo/__init__.pyi -> build/lib.macosx-10.9-x86_64-3.9/cairo
    copying cairo/py.typed -> build/lib.macosx-10.9-x86_64-3.9/cairo
    running build_ext
    'pkg-config' not found.
    Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']
    ----------------------------------------
    ERROR: Failed building wheel for pycairo
  Failed to build pycairo
  ERROR: Could not build wheels for pycairo which use PEP 517 and cannot be installed directly
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/51/2f/4d5d5afb7000b9151e33952b59163c9389bd867ac6fe85d62f85831fa061/PyGObject-3.40.1.tar.gz#sha256=6fb599aa59ceb9dd05fafb0d72b3862943e7d5e85c8ef6c74856bc6d4321cbab (from https://pypi.org/simple/pygobject/) (requires-python:>=3.6, <4). Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 /private/var/folders/s0/35n1fkk97gx2fx9q3fcvhygw0000gn/T/pip-standalone-pip-99ivku0v/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/s0/35n1fkk97gx2fx9q3fcvhygw0000gn/T/pip-build-env-4w3qz1zs/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo Check the logs for full command output.

same error when building for Ubuntu 20.X LTS and should be fixed by https://askubuntu.com/questions/1316961/experiencing-gcc-5-failure-running-poetry-install-on-ubuntu-20-04
followed by
pip3 install p5py
pip3 install PEP517
pip3 install netifaces
pip3 install pycairo

@francisuk1989
Copy link
Author

francisuk1989 commented Aug 30, 2021

@mathiascode Regarding GTK 4 #1475
Do you think GTK 4 will work for this Intel Mac version? Willing to give this ago and more then report back and be more then happy to build and host at my github with maybe a warning at experimental use?

https://nicotine-plus.github.io/nicotine-plus/doc/PACKAGING.html

export NICOTINE_GTK_VERSION=4
export ARCH=x86_64
pacman --noconfirm -S --needed mingw-w64-$ARCH-python - Is this still needed for compiling with Mac?
python3 packaging/windows/dependencies_core.py
python3 packaging/windows/dependencies_packaging.py

FransMacPro8Core:~ fran$ python3
Python 3.9.6 (v3.9.6:db3ff76da1, Jun 28 2021, 11:49:53) 
[Clang 6.0 (clang-600.0.57)] on darwin

@mathiascode
Copy link
Member

Thanks for trying to build an image however with homebrew i think im going to have the same error as i did in pip, it just seems to be failing on but i know this isnt nicotine package.

Judging by the output, you probably need to install pkg-config:

brew install pkg-config

If you're running pip outside Homebrew, it won't work, since you need the GTK dependency from Homebrew (gtk+3 or gtk+4).

@mathiascode
Copy link
Member

@mathiascode Regarding GTK 4 #1475
Do you think GTK 4 will work for this Intel Mac version? Willing to give this ago and more then report back and be more then happy to build and host at my github with maybe a warning at experimental use?

https://nicotine-plus.github.io/nicotine-plus/doc/PACKAGING.html im a little stuck on two things.

export NICOTINE_GTK_VERSION=4
export ARCH=x86_64 << Whats this for Intel Mac? CPU is a Intel.
pacman --noconfirm -S --needed mingw-w64-$ARCH-python Help with this for Mac If not can install Arch Linux for compiling
python3 packaging/windows/dependencies_core.py
python3 packaging/windows/dependencies_packaging.py

FransMacPro8Core:~ fran$ python3
Python 3.9.6 (v3.9.6:db3ff76da1, Jun 28 2021, 11:49:53) 
[Clang 6.0 (clang-600.0.57)] on darwin

Sorry, there are no written packaging instructions for macOS yet. You have to follow https://github.com/nicotine-plus/nicotine-plus/blob/master/.github/workflows/packaging.yml for now.

This would result in the following commands for installing dependencies:

export NICOTINE_GTK_VERSION=4
python3 packaging/macos/dependencies_core.py
python3 packaging/macos/dependencies_packaging.py

Then create the dmg file:

pyinstaller packaging/macos/nicotine.spec
rm -rf dist/Nicotine+/
codesign --deep --entitlements packaging/macos/entitlements.plist --options runtime --sign - dist/Nicotine+.app
python3 packaging/macos/create_dmg.py

@francisuk1989
Copy link
Author

francisuk1989 commented Aug 30, 2021

@mathiascode Sorry to keep bugging you, Hope i become to some help whoever eles sees this.
GK4 is a no go and gives warning about older Mac (Cant upgrade to newer becouse of an 2008 Mac Pro.)

However GK2 compiled fine without no errors however i have two issues

pyinstaller packaging/macos/nicotine.spec
78 INFO: PyInstaller: 4.3
79 INFO: Python: 3.9.6
90 INFO: Platform: macOS-10.11.6-x86_64-i386-64bit
95 INFO: UPX is not available. - could this be the error??
1060 INFO: Extending PYTHONPATH with paths

  1. when i try and lunch it (heres the logs) also same error with 3.1.1
    FransMacPro8Core:~ fran$ /Users/fran/Desktop/Nicotine+.app/Contents/MacOS/Nicotine+ ; exit;
    Cannot find gdbm or semidbm, please install either one.

The DMG file size is 900 something MB.

@mathiascode
Copy link
Member

Try brew install gdbm

@francisuk1989
Copy link
Author

francisuk1989 commented Aug 30, 2021

@mathiascode
brew install gdbm

Warning: gdbm 1.20 is already installed and up-to-date.
To reinstall 1.20, run:

brew reinstall gdbm

FransMacPro:8Cores nicotine-plus fran$ brew reinstall gdbm

==> Downloading https://ftp.gnu.org/gnu/gdbm/gdbm-1.20.tar.gz
Already downloaded: /Users/fran/Library/Caches/Homebrew/downloads/0cb378cb017689a5fbb0e33492142d2754ff33eb33fd30d5668090ae407924c6--gdbm-1.20.tar.gz
==> Reinstalling gdbm
==> ./configure --enable-libgdbm-compat --without-readline --prefix=/usr/local/Cellar/gdbm/1.20
==> make install
🍺 /usr/local/Cellar/gdbm/1.20: 38 files, 916.2KB, built in 17 seconds

@mathiascode
Copy link
Member

I suppose the Python installation doesn't include gdbm support for some reason. You might have to install semidbm instead:
pip install semidbm

@francisuk1989
Copy link
Author

francisuk1989 commented Aug 31, 2021

No joy on pip or pip2 @mathiascode
I had to compatible again to get rid of this error however i still get more errors, Will report back to see what i can find.

Python 3.6.9 and brew with pygobject are having issues
pip3 install pygobject
brew install pygobject3
reported here also pygobject/pycairo#241

So for whoever read this, I done the following break down

  1. Download macOS 64-bit universal2 installer https://www.python.org/downloads/macos/
  2. reboot
  3. install pip https://pip.pypa.io/en/stable/installation
  4. pip3 install semidbm pygobject
  5. install brew https://brew.sh

export NICOTINE_GTK_VERSION=2
python3 packaging/macos/dependencies_core.py
python3 packaging/macos/dependencies_packaging.py
pyinstaller packaging/macos/nicotine.spec
rm -rf dist/Nicotine+/
codesign --deep --entitlements packaging/macos/entitlements.plist --options runtime --sign - dist/Nicotine+.app
python3 packaging/macos/create_dmg.py

@slook
Copy link
Member

slook commented Aug 31, 2021

Try looking for a package called "python3-gdbm"

@francisuk1989
Copy link
Author

Try brew install gdbm

Thanks @slook but was already suggested by @mathiascode but no joy.

@slook
Copy link
Member

slook commented Aug 31, 2021

What is selected choice of:
update-alternatives --config python

And:
python --version

Also, what is the output please copy paste:
pip3 list

@francisuk1989
Copy link
Author

francisuk1989 commented Aug 31, 2021

@slook Remember this is a Mac system not a Linux system as so :)

update-alternatives --config python
-bash: update-alternatives: command not found

update-alternatives --config python3
-bash: update-alternatives: command not found

python --version (comes with Mac OS X)
Python 2.7.10

python3 --version https://www.python.org/ftp/python/3.9.7/python-3.9.7-macos11.pkg
Python 3.9.7

Franciss-Mac-Pro:~ francis$ pip3 list
Package Version


aigpy 2021.7.22.1
altgraph 0.17
beautifulsoup4 4.9.3
certifi 2021.5.30
charset-normalizer 2.0.4
colorama 0.4.4
idna 3.2
lyricsgenius 3.0.1
macholib 1.15.1
mutagen 1.45.1
pip 20.3.4
prettytable 2.2.0
pycryptodome 3.10.1
pydub 0.25.1
pyinstaller 4.3
pyinstaller-hooks-contrib 2021.3
requests 2.26.0
semidbm 0.5.1
setuptools 57.4.0
soupsieve 2.2.1
urllib3 1.26.6
wcwidth 0.2.5
wheel 0.37.0

@slook
Copy link
Member

slook commented Aug 31, 2021

Yeah I am aware of that @francisuk1989 and my knowledge of your platform is minimal I have never owned a Mac.

However I recently had a very similar error to yourself on my legacy 'nix machine when I had installed the latest version of Python but what infact was needed was an older one.

Thanks for sending your pip list this might be useful for @mathiascode to look at.

@francisuk1989
Copy link
Author

francisuk1989 commented Aug 31, 2021

appreciate the help and I was thinking of the same @slook is either

  1. Go to python 3.5 or 3.8 but i think i would need to clean up brew's python 3.9 or install a fresh copy of Mac OS X.
  2. install Arch Linux on my spare laptop with linuxbrew https://docs.brew.sh/Homebrew-on-Linux and do from there but signing will be a issue just before creating dmg file.

Python 3.9.7 - Aug. 30, 2021
Python 3.8.10 - May 3, 2021 (The last 3.8 for Mac)
Python 3.7.9 - Aug. 17, 2020 (Last 3.7 for Mac)

@slook
Copy link
Member

slook commented Aug 31, 2021

I was able to get it working with Python 3.5 but not Python 3.8 - whilst it installed okay, the os didn't like it so wouldn't let python run, but no OS re-install was required to revert so it was no big deal.

can you run N+ from local Git folder?

@francisuk1989
Copy link
Author

Not sure if Mac can run from Git

@slook
Copy link
Member

slook commented Aug 31, 2021

Oh, that's a shame I assumed you could run from Git using anything with posix shell like bash?

https://github.com/nicotine-plus/nicotine-plus/blob/master/doc/RUNFROMGIT.md

@mathiascode
Copy link
Member

You need to install Homebrew first, so you can use the python3 package provided by Homebrew. Then, you issue the pip command.

brew install python3

@francisuk1989
Copy link
Author

francisuk1989 commented Aug 31, 2021

This is the first thing i did is issued brew install python3 and gives me 3.9 version however i think i might try and move on to another python version 3.7

An idea could be:

brew remove python3
brew cleanup
brew install python@3.7

I have build a gtk+3 3.24.30 under KDE Neon that uses Ubuntu LTS 20.04.? for Mac on my Linux system under x64 but not yet tested but can run ./Nicotine fine on Linux with x64.

Also needs Brew Linux https://docs.brew.sh/Homebrew-on-Linux

neonlights@kdeneonbaby:~/Downloads/nicotine-plus$ python3 packaging/macos/dependencies_core.py
Warning: adwaita-icon-theme 40.1.1 is already installed and up-to-date.
To reinstall 40.1.1, run:
  brew reinstall adwaita-icon-theme
Warning: gtk+3 3.24.30 is already installed and up-to-date.
To reinstall 3.24.30, run:
  brew reinstall gtk+3
Requirement already satisfied: flake8 in /home/neonlights/.local/lib/python3.8/site-packages (3.9.2)
Requirement already satisfied: pygobject in /usr/lib/python3/dist-packages (3.36.0)
Requirement already satisfied: pylint in /home/neonlights/.local/lib/python3.8/site-packages (2.10.2)
Requirement already satisfied: pycodestyle<2.8.0,>=2.7.0 in /home/neonlights/.local/lib/python3.8/site-packages (from flake8) (2.7.0)
Requirement already satisfied: pyflakes<2.4.0,>=2.3.0 in /home/neonlights/.local/lib/python3.8/site-packages (from flake8) (2.3.1)
Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /home/neonlights/.local/lib/python3.8/site-packages (from flake8) (0.6.1)
Requirement already satisfied: pycairo>=1.11.1 in /usr/lib/python3/dist-packages (from pygobject) (1.16.2)
Requirement already satisfied: platformdirs>=2.2.0 in /home/neonlights/.local/lib/python3.8/site-packages (from pylint) (2.3.0)
Requirement already satisfied: isort<6,>=4.2.5 in /home/neonlights/.local/lib/python3.8/site-packages (from pylint) (5.9.3)
Requirement already satisfied: toml>=0.7.1 in /home/neonlights/.local/lib/python3.8/site-packages (from pylint) (0.10.2)
Requirement already satisfied: astroid<2.8,>=2.7.2 in /home/neonlights/.local/lib/python3.8/site-packages (from pylint) (2.7.3)
Requirement already satisfied: lazy-object-proxy>=1.4.0 in /home/neonlights/.local/lib/python3.8/site-packages (from astroid<2.8,>=2.7.2->pylint) (1.6.0)
Requirement already satisfied: wrapt<1.13,>=1.11 in /home/neonlights/.local/lib/python3.8/site-packages (from astroid<2.8,>=2.7.2->pylint) (1.12.1)
Requirement already satisfied: setuptools>=20.0 in /usr/lib/python3/dist-packages (from astroid<2.8,>=2.7.2->pylint) (45.2.0)

neonlights@kdeneonbaby:~/Downloads/nicotine-plus$ python3 packaging/macos/dependencies_packaging.py
Warning: create-dmg 1.0.9 is already installed and up-to-date.
To reinstall 1.0.9, run:
  brew reinstall create-dmg
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (2019.11.28)
Collecting pyinstaller==4.3
  Using cached pyinstaller-4.3.tar.gz (3.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from pyinstaller==4.3) (45.2.0)
Collecting altgraph
  Using cached altgraph-0.17-py2.py3-none-any.whl (21 kB)
Collecting pyinstaller-hooks-contrib>=2020.6
  Using cached pyinstaller_hooks_contrib-2021.3-py2.py3-none-any.whl (200 kB)
Building wheels for collected packages: pyinstaller
  Building wheel for pyinstaller (PEP 517) ... done
  Created wheel for pyinstaller: filename=pyinstaller-4.3-py3-none-any.whl size=2457322 sha256=c115a03b25ad12af43a6c7f0a966012539cbc731aecd6d5bb6e44efa25eaf0d5
  Stored in directory: /home/neonlights/.cache/pip/wheels/f5/79/c9/9b8b452181d09bcc86b0e09403ecde2050954e51c8ac269821
Successfully built pyinstaller
Installing collected packages: altgraph, pyinstaller-hooks-contrib, pyinstaller
Successfully installed altgraph-0.17 pyinstaller-4.3 pyinstaller-hooks-contrib-2021.3

But like i said, I can only Sign package within a Mac.
codesign --deep --entitlements packaging/macos/entitlements.plist --options runtime --sign - dist/Nicotine+.app

@mathiascode
Copy link
Member

What was the issue with the 3.9 version provided by Homebrew? It should provide pip3 out of the box.

No joy on pip or pip2 @mathiascode

What was the error?

Regarding the pycairo issue, it says No package 'cairo' found. Have you tried brew install cairo?

@francisuk1989
Copy link
Author

What was the issue with the 3.9 version provided by Homebrew? It should provide pip3 out of the box.

No joy on pip or pip2 @mathiascode

What was the error?

Regarding the pycairo issue, it says No package 'cairo' found. Have you tried brew install cairo?

Sorry there is pip3 but not pip or pip2 for Mac.

Will give brew install cairo later on this evening.

@mathiascode
Copy link
Member

Sorry, I misunderstood. I meant python3 and pip3 in any case, I'm just used to pip and python invoking pip3 and python3 on my system.

@francisuk1989
Copy link
Author

francisuk1989 commented Sep 1, 2021

I have come to a stop on this as OpenSSL 1.1.1l and Rust 1.54.0_1 are having issues I have reported this but have to wait for the next release off 1.1.1m and a fix for Rust

Thanks again for all your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants