Reputation: 119
I am trying to get python working on an old Mac Mini (2007) which is running OSX Lion on an Intel Core Duo Chip. Perhaps I shouldn't....
I've done a completely clean install on Mac Ports, as per here: Clean Mac Ports install
and then installing only the python312 package (and whatever dependencies this needs). This runs fine and I have a running python installation.
I then install py312-pip and this also works fine.
However, I then try to install pandas from pip and this fails with:
× Building wheel for cmake (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
---------------------------------------------
CMake 3.31.4, Copyright 2000-2024 Kitware, Inc. and Contributors
Found Clang toolchain
C compiler on this system is: clang
---------------------------------------------
Error when bootstrapping CMake:
Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
Please specify one using environment variable CXX.
The C++ flags are "".
They can be changed using the environment variable CXXFLAGS.
See cmake_bootstrap.log for compilers attempted.
Is this a mac ports problem of some sort? Or is it that this hardware/OS combo is just too old?
[EDIT: Adding further context having played with it some more]
It appears Mac Ports doesn't fully support this... I installed cmake, then I got a compiler version error then I manually installed gcc12 and set the CC and CXX env variables to gcc-mp12 and g++-mp-12 respectively. This seems to get numpy compilation going and it passes a fair number of error checks before successfully compiling some sources. However, it then breaks with:
[71/310] Compiling C object numpy/_core/libnpymath.a.p/src_npymath_npy_math.c.o FAILED: numpy/_core/libnpymath.a.p/src_npymath_npy_math.c.o gcc-mp-12 -Inumpy/_core/libnpymath.a.p -Inumpy/_core -I../numpy/_core -Inumpy/_core/include -I../numpy/_core/include -I../numpy/_core/src/npymath -I../numpy/_core/src/common -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -I/private/tmp/pip-install-wmd4gvqq/numpy_e10db06cd3b4445fa8fc3b3430481cf1/.mesonpy-gn9hxmws/meson_cpu -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c11 -O3 -fno-strict-aliasing -MD -MQ numpy/_core/libnpymath.a.p/src_npymath_npy_math.c.o -MF numpy/_core/libnpymath.a.p/src_npymath_npy_math.c.o.d -o numpy/_core/libnpymath.a.p/src_npymath_npy_math.c.o -c ../numpy/_core/src/npymath/npy_math.c clang: warning: argument unused during compilation: '-I numpy/_core/libnpymath.a.p' clang: warning: argument unused during compilation: '-I numpy/_core' clang: warning: argument unused during compilation: '-I ../numpy/_core' clang: warning: argument unused during compilation: '-I numpy/_core/include' clang: warning: argument unused during compilation: '-I ../numpy/_core/include' clang: warning: argument unused during compilation: '-I ../numpy/_core/src/npymath' clang: warning: argument unused during compilation: '-I ../numpy/_core/src/common' clang: warning: argument unused during compilation: '-I /opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12' clang: warning: argument unused during compilation: '-I /private/tmp/pip-install-wmd4gvqq/numpy_e10db06cd3b4445fa8fc3b3430481cf1/.mesonpy-gn9hxmws/meson_cpu' /var/tmp//ccbdsxrm.s:497:2: error: invalid instruction mnemonic 'cvttss2sil' cvttss2sil %xmm3, %eax ^~~~~~~~~~
Upvotes: 0
Views: 38
Reputation: 119
Mac ports can still run on such old hardware, but it's not straightforward. To make it run you need to:
This will then enable you to have a working chain that can build numpy (took about 1h on my hardware).
Upvotes: 1