Opened 6 years ago
Closed 5 years ago
#17510 closed defect (fixed)
Let pyzmq build on (really old?) 32-bit OS X machines
Reported by: | kcrisman | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | packages: standard | Keywords: | |
Cc: | tmonteil, slabbe, dimpase | Merged in: | |
Authors: | Reviewers: | Karl-Dieter Crisman, Sébastien Labbé | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
See #13313 and the comments at the end of #16455. Basically, a patch was removed that allows pyzmq to build on old (32-bit) Macs - the problem is that pyzmq assumes one has the Mac version of gcc which supports the -arch
flag, which we do not since we build our own vanilla gcc.
Change History (11)
comment:1 Changed 6 years ago by
comment:2 Changed 6 years ago by
On my osx 10.5.8, with Sage Version 6.4 that I compiled without problem, I get this:
sage: import platform sage: platform.architecture() ('32bit', '')
Also, I do not use the SAGE64='yes'
flag.
Here is my (stripped) log of sage -f pyzmq
:
$ sage -f pyzmq Found local metadata for pyzmq-14.3.0 Found local sources at /Users/slabbe/Applications/sage-git/upstream/pyzmq-14.3.0.tar.gz Checksum: 92e49cc9be92f0c95a6f790a85309df5 vs 92e49cc9be92f0c95a6f790a85309df5 pyzmq-14.3.0 ==================================================== Setting up build directory for pyzmq-14.3.0 Finished set up **************************************************** Host system: Darwin pol 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 **************************************************** C compiler: gcc C compiler version: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/Users/slabbe/Applications/sage-git/local/libexec/gcc/i386-apple-darwin9.8.0/4.9.2/lto-wrapper Target: i386-apple-darwin9.8.0 Configured with: ../src/configure --prefix=/Users/slabbe/Applications/sage-git/local --with-local-prefix=/Users/slabbe/Applications/sage-git/local --with-gmp=/Users/slabbe/Applications/sage-git/local --with-mpfr=/Users/slabbe/Applications/sage-git/local --with-mpc=/Users/slabbe/Applications/sage-git/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm --without-isl --without-cloog Thread model: posix gcc version 4.9.2 (GCC) **************************************************** running configure gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -I/Users/slabbe/Applications/sage-git/local/include -c build/temp.macosx-10.5-i386-2.7/scratch/check_sys_un.c -o build/temp.macosx-10.5-i386-2.7/scratch/check_sys_un.o gcc -arch i386 -undefined dynamic_lookup build/temp.macosx-10.5-i386-2.7/scratch/check_sys_un.o -L/Users/slabbe/Applications/sage-git/local/lib -o build/temp.macosx-10.5-i386-2.7/scratch/check_sys_un Configure: Autodetecting ZMQ settings... Custom ZMQ dir: /Users/slabbe/Applications/sage-git/local ************************************************ gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.macosx-10.5-i386-2.7/scratch/vers.c -o build/temp.macosx-10.5-i386-2.7/scratch/vers.o gcc -arch i386 -undefined dynamic_lookup build/temp.macosx-10.5-i386-2.7/scratch/vers.o -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/temp.macosx-10.5-i386-2.7/scratch/vers ZMQ version detected: 4.0.4 ************************************************ running install running build running build_py creating build/lib.macosx-10.5-i386-2.7 creating build/lib.macosx-10.5-i386-2.7/zmq copying zmq/__init__.py -> build/lib.macosx-10.5-i386-2.7/zmq copying zmq/error.py -> build/lib.macosx-10.5-i386-2.7/zmq creating build/lib.macosx-10.5-i386-2.7/zmq/auth copying zmq/auth/__init__.py -> build/lib.macosx-10.5-i386-2.7/zmq/auth copying zmq/auth/base.py -> build/lib.macosx-10.5-i386-2.7/zmq/auth copying zmq/auth/certs.py -> build/lib.macosx-10.5-i386-2.7/zmq/auth copying zmq/auth/ioloop.py -> build/lib.macosx-10.5-i386-2.7/zmq/auth copying zmq/auth/thread.py -> build/lib.macosx-10.5-i386-2.7/zmq/auth creating build/lib.macosx-10.5-i386-2.7/zmq/backend [...] copying zmq/utils/zmq_compat.h -> build/lib.macosx-10.5-i386-2.7/zmq/utils copying zmq/utils/zmq_constants.h -> build/lib.macosx-10.5-i386-2.7/zmq/utils copying zmq/utils/compiler.json -> build/lib.macosx-10.5-i386-2.7/zmq/utils copying zmq/utils/config.json -> build/lib.macosx-10.5-i386-2.7/zmq/utils running build_ext running configure Configure: Autodetecting ZMQ settings... Custom ZMQ dir: /Users/slabbe/Applications/sage-git/local ************************************************ gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.macosx-10.5-i386-2.7/scratch/vers.c -o build/temp.macosx-10.5-i386-2.7/scratch/vers.o gcc -arch i386 -undefined dynamic_lookup build/temp.macosx-10.5-i386-2.7/scratch/vers.o -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/temp.macosx-10.5-i386-2.7/scratch/vers ZMQ version detected: 4.0.4 ************************************************ skipping 'zmq/devices/monitoredqueue.c' Cython extension (up-to-date) building 'zmq.devices.monitoredqueue' extension creating build/temp.macosx-10.5-i386-2.7/zmq creating build/temp.macosx-10.5-i386-2.7/zmq/devices gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/devices/monitoredqueue.c -o build/temp.macosx-10.5-i386-2.7/zmq/devices/monitoredqueue.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/devices/monitoredqueue.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/devices/monitoredqueue.so skipping 'zmq/backend/cython/_device.c' Cython extension (up-to-date) building 'zmq.backend.cython._device' extension creating build/temp.macosx-10.5-i386-2.7/zmq/backend creating build/temp.macosx-10.5-i386-2.7/zmq/backend/cython gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/backend/cython/_device.c -o build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/_device.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/_device.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/_device.so skipping 'zmq/backend/cython/_poll.c' Cython extension (up-to-date) building 'zmq.backend.cython._poll' extension gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/backend/cython/_poll.c -o build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/_poll.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/_poll.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/_poll.so skipping 'zmq/backend/cython/_version.c' Cython extension (up-to-date) building 'zmq.backend.cython._version' extension gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/backend/cython/_version.c -o build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/_version.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/_version.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/_version.so skipping 'zmq/backend/cython/constants.c' Cython extension (up-to-date) building 'zmq.backend.cython.constants' extension gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/backend/cython/constants.c -o build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/constants.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/constants.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/constants.so skipping 'zmq/backend/cython/context.c' Cython extension (up-to-date) building 'zmq.backend.cython.context' extension gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/backend/cython/context.c -o build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/context.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/context.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/context.so skipping 'zmq/backend/cython/error.c' Cython extension (up-to-date) building 'zmq.backend.cython.error' extension gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/backend/cython/error.c -o build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/error.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/error.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/error.so skipping 'zmq/backend/cython/message.c' Cython extension (up-to-date) building 'zmq.backend.cython.message' extension gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/backend/cython/message.c -o build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/message.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/message.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/message.so skipping 'zmq/backend/cython/socket.c' Cython extension (up-to-date) building 'zmq.backend.cython.socket' extension gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/backend/cython/socket.c -o build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/socket.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/socket.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/socket.so skipping 'zmq/backend/cython/utils.c' Cython extension (up-to-date) building 'zmq.backend.cython.utils' extension gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DHAVE_SYS_UN_H=1 -I/Users/slabbe/Applications/sage-git/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -I/Users/slabbe/Applications/sage-git/local/include/ -I/Users/slabbe/Applications/sage-git/local/include/python2.7 -c zmq/backend/cython/utils.c -o build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/utils.o gcc -bundle -undefined dynamic_lookup -L/Users/slabbe/Applications/sage-git/local/lib build/temp.macosx-10.5-i386-2.7/zmq/backend/cython/utils.o -L/Users/slabbe/Applications/sage-git/local/lib -L/Users/slabbe/Applications/sage-git/local/lib/ -L/Users/slabbe/Applications/sage-git/local/lib -lzmq -o build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/utils.so running install_lib copying build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/_device.so -> /Users/slabbe/Applications/sage-git/local/lib/python2.7/site-packages/zmq/backend/cython copying build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/_poll.so -> /Users/slabbe/Applications/sage-git/local/lib/python2.7/site-packages/zmq/backend/cython copying build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/_version.so -> /Users/slabbe/Applications/sage-git/local/lib/python2.7/site-packages/zmq/backend/cython copying build/lib.macosx-10.5-i386-2.7/zmq/backend/cython/constants.so -> /Users/slabbe/Applications/sage-git/local/lib/python2.7/site-packages/zmq/backend/cython [...] byte-compiling /Users/slabbe/Applications/sage-git/local/lib/python2.7/site-packages/zmq/utils/monitor.py to monitor.pyc byte-compiling /Users/slabbe/Applications/sage-git/local/lib/python2.7/site-packages/zmq/utils/z85.py to z85.pyc running install_egg_info Removing /Users/slabbe/Applications/sage-git/local/lib/python2.7/site-packages/pyzmq-14.3.0-py2.7.egg-info Writing /Users/slabbe/Applications/sage-git/local/lib/python2.7/site-packages/pyzmq-14.3.0-py2.7.egg-info real 0m31.110s user 0m16.013s sys 0m3.498s Successfully installed pyzmq-14.3.0 Deleting temporary build directory /Users/slabbe/Applications/sage-git/local/var/tmp/sage/build/pyzmq-14.3.0 Finished installing pyzmq-14.3.0.spkg Warning: it might be needed to update the Sage library before installed packages work: you should run 'make' from $SAGE_ROOT before running Sage.
comment:3 Changed 6 years ago by
- Summary changed from Let pyzmq build on 32-bit OS X machines to Let pyzmq build on (really old?) 32-bit OS X machines
Very interesting. I wonder why it is that you don't have trouble? In principle, I don't think gcc in Sage should support that -arch
flag. I also note your computer is Intel, not PPC chip, though the code of the patch shouldn't really care. Huh.
comment:4 Changed 6 years ago by
Just for reference here (not formal patch):
--- a/build/pkgs/pyzmq/spkg-install +++ b/build/pkgs/pyzmq/spkg-install cd src +# Apply patches. See SPKG.txt for information about what each patch +# does. +for patch in ../patches/*.patch; do + patch -p1 <"$patch" + if [ $? -ne 0 ]; then + echo >&2 "Error applying '$patch'" + exit 1 + fi +done + # Configure and install python setup.py configure --zmq="$SAGE_LOCAL" python setup.py install +++ /dev/null --- a/build/pkgs/pyzmq/patches/buildutils.patch ---- src/buildutils/detect.py -+++ src-patched/buildutils/detect.py -@@ -45,17 +45,7 @@ + + cpreargs = lpreargs = None + if sys.platform == 'darwin': +- # use appropriate arch for compiler +- if platform.architecture()[0]=='32bit': +- if platform.processor() == 'powerpc': +- cpu = 'ppc' +- else: +- cpu = 'i386' +- cpreargs = ['-arch', cpu] +- lpreargs = ['-arch', cpu, '-undefined', 'dynamic_lookup'] +- else: +- # allow for missing UB arch, since it will still work: +- lpreargs = ['-undefined', 'dynamic_lookup'] ++ lpreargs = ['-undefined', 'dynamic_lookup'] + if sys.platform == 'sunos5': + if platform.architecture()[0]=='32bit': + lpreargs = ['-m32']
comment:5 Changed 6 years ago by
For reference.
-
new file uild/pkgs/pyzmq/patches/buildutils.patch
diff --git a/build/pkgs/pyzmq/patches/buildutils.patch b/build/pkgs/pyzmq/patches/buildutils.patch new file mode 100644 index 0000000..591578f
- + 1 ---- src/buildutils/detect.py 2 -+++ src-patched/buildutils/detect.py 3 -@@ -45,17 +45,7 @@ 4 + 5 + cpreargs = lpreargs = None 6 + if sys.platform == 'darwin': 7 +- # use appropriate arch for compiler 8 +- if platform.architecture()[0]=='32bit': 9 +- if platform.processor() == 'powerpc': 10 +- cpu = 'ppc' 11 +- else: 12 +- cpu = 'i386' 13 +- cpreargs = ['-arch', cpu] 14 +- lpreargs = ['-arch', cpu, '-undefined', 'dynamic_lookup'] 15 +- else: 16 +- # allow for missing UB arch, since it will still work: 17 +- lpreargs = ['-undefined', 'dynamic_lookup'] 18 ++ lpreargs = ['-undefined', 'dynamic_lookup'] 19 + if sys.platform == 'sunos5': 20 + if platform.architecture()[0]=='32bit': 21 + lpreargs = ['-m32'] -
build/pkgs/pyzmq/spkg-install
diff --git a/build/pkgs/pyzmq/spkg-install b/build/pkgs/pyzmq/spkg-install index 269f055..310c460 100755
a b echo "include_dirs = $SAGE_LOCAL/include/" >> src/setup.cfg 13 13 14 14 cd src 15 15 16 # Apply patches. 17 for patch in ../patches/*.patch; do 18 patch -p1 <"$patch" 19 if [ $? -ne 0 ]; then 20 echo >&2 "Error applying '$patch'" 21 exit 1 22 fi 23 done 24 16 25 # Configure and install 17 26 python setup.py configure --zmq="$SAGE_LOCAL" 18 27 python setup.py install
comment:6 Changed 5 years ago by
- Component changed from build to packages: standard
comment:7 Changed 5 years ago by
- Status changed from new to needs_info
I've given up now on this (see #17513) but not sure if this is relevant beyond PPC or 10.4 Macs. Sebastien, if you are able to still build on that computer I think we could close this as wontfix.
comment:8 Changed 5 years ago by
I can't tell as I upgraded my old mac 10.5.8 to 10.10 and pyzmq installs on 10.10 with no problems.
Before upgrading to 10.10, I verified (comment:2 above) that pyzmq was able to install on 10.5.8. That was the reason why I suggested in #16455 to remove the patch that I had written in #13313 to fix the pyzmq install issue on 10.5.8. So to me the patch was (possibly) relevant only for PPC or 10.4 but I can not confirm as I do not have access to such a machine.
comment:9 Changed 5 years ago by
- Milestone changed from sage-6.5 to sage-duplicate/invalid/wontfix
- Reviewers set to Karl-Dieter Crisman, Sébastien Labbé
- Status changed from needs_info to positive_review
Well, let's close it then as wontfix. If I got the accents wrong in your name from memory, please fix, my apologies!
comment:10 Changed 5 years ago by
Accent are right! Thanks.
comment:11 Changed 5 years ago by
- Resolution set to fixed
- Status changed from positive_review to closed
To be more precise, it is the output of Python's
platform.architecture()
that pyzmq uses, so perhaps some 32-bit Macs are immune, if they build a 64-bit Sage.