Opened 11 years ago
Closed 10 years ago
#13313 closed defect (fixed)
Fix gcc error in pyzmq-2.1.11.p0.spkg
Reported by: | slabbe | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-5.7 |
Component: | packages: optional | Keywords: | |
Cc: | Merged in: | ||
Authors: | Sébastien Labbé | Reviewers: | Volker Braun |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Here is the new proposed spkg:
http://sage.math.washington.edu/home/slabbe/pyzmq-2.1.11.p1.spkg
As reported on sage-devel here, there is an error when installing the optional package pyzmq #12843 (after its dependency zeromq of course!) on OSX 10.5.8 :
gcc version 4.6.3 (GCC) **************************************************** running configure ****************************************** Configure: Autodetecting ZMQ settings... Custom ZMQ dir: /Users/slabbe/Applications/sage-5.2.rc0/local gcc -fno-strict-aliasing -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -I/Users/slabbe/Applications/sage-5.2.rc0/local/include -Izmq/utils -Izmq/core -Izmq/devices -c detect/vers.c -o detect/vers.o gcc: erreur: i386: No such file or directory gcc: erreur: unrecognized option ‘-arch’ Fatal: Failed to compile ZMQ test program. Please check to make sure: * You have a C compiler installed * A development version of Python is installed (including header files) * A development version of ZMQ >= 2.1.4 is installed (including header files) * If ZMQ is not in a default location, supply the argument --zmq=<path> * If you did recently install ZMQ to a default location, try rebuilding the ld cache with `sudo ldconfig` or specify zmq's location with `--zmq=/usr/local` error: command 'gcc' failed with exit status 1 ******************************************
The reason to this is that Sage's gcc spkg does not build a compiler which understands the option -arch
of Apple's clone of gcc.
The following patch applied on the spkg fixes the problem :
-
buildutils.py
pyzmq-2.1.11.p1/patches $ cat buildutils.patch
old new 111 111 112 112 cpreargs = lpreargs = None 113 113 if sys.platform == 'darwin': 114 # use appropriate arch for comiler 115 if platform.architecture()[0]=='32bit': 116 cpreargs = ['-arch','i386'] 117 lpreargs = ['-arch', 'i386', '-undefined', 'dynamic_lookup'] 118 else: 119 # allow for missing UB arch, since it will still work: 120 lpreargs = ['-undefined', 'dynamic_lookup'] 114 lpreargs = ['-undefined', 'dynamic_lookup'] 121 115 122 116 objs = cc.compile([cfile],extra_preargs=cpreargs) 123 117 cc.link_executable(objs, efile, extra_preargs=lpreargs)
Attachments (1)
Change History (20)
comment:1 Changed 11 years ago by
Component: | packages → optional packages |
---|---|
Description: | modified (diff) |
Changed 11 years ago by
Attachment: | buildutils.patch added |
---|
comment:2 follow-up: 3 Changed 11 years ago by
The patch I just attached should go in pyzmq-2.1.11.p?/patches
. I never patch/created a package before. If I am doing something wrong, just tell me.
Sébastien
comment:3 Changed 11 years ago by
Replying to slabbe:
The patch I just attached should go in
pyzmq-2.1.11.p?/patches
. I never patch/created a package before. If I am doing something wrong, just tell me.
in a nutshell:
- rename the package directory pyzmq-2.1.11.p2
- put the patch in pyzmq-2.1.11.p2/patches
- adjust spkg-install so that this patch is applied (assuming your patch is not a change to Sage's patches to the upstream, but a change of the upstream)
- create pyzmq-2.1.11.p2.spkg by running sage -spkg pyzmq-2.1.11.p2/ in the corresponding directory i.e.
SAGEROOT/spkg/optional
- test it.
- upload it somewhere and put a link to it into the ticket description.
- mark the ticket as needing review
(I know, sounds like a lot of work :-))
comment:4 Changed 11 years ago by
Ok thanks for the cheering. I also read Patching a spkg in the Developper Guide. Here is my first patch to a package (p0 was the most recent version) :
http://sage.math.washington.edu/home/slabbe/pyzmq-2.1.11.p1.spkg
Needs review!
comment:5 Changed 11 years ago by
Status: | new → needs_review |
---|
comment:6 follow-up: 7 Changed 11 years ago by
Dima, you reported on the mailinglist that installing pyzmq works if you install zmq first. Can you clarify on that? zmq is a requirement, you can't build pyzmq without. I just want tbo be clear that we aren't patching dead code here.
The patch looks good to me, fwiw.
comment:7 Changed 11 years ago by
Replying to vbraun:
Dima, you reported on the mailinglist that installing pyzmq works if you install zmq first. Can you clarify on that? zmq is a requirement, you can't build pyzmq without. I just want tbo be clear that we aren't patching dead code here.
Hi Volker,
well, it was a (brain)dead response by me, the code is alive. Later I was able to reproduce the bug on another installation.
comment:9 Changed 11 years ago by
comment:11 Changed 11 years ago by
Replying to jtremblay:
The spkg, on OSX 10.7.3 with Sage 5.2 binaries.
And were you obtaining the same problem as me while installing pyzmq-2.1.11.p0.spkg ?
comment:12 follow-up: 13 Changed 11 years ago by
Apparently not, zmq was not installed when I tried installing pyzmq :
Extracting package /Library/sage/spkg/optional/pyzmq-2.1.11.p0.spkg -rw-r--r-- 1 tremblayj wheel 464755 2 Aug 10:02 /Library/sage/spkg/optional/pyzmq-2.1.11.p0.spkg Finished extraction **************************************************** Host system: Darwin jerometremblayportable.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64 **************************************************** C compiler: gcc C compiler version: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/Library/sage/local/bin/../libexec/gcc/x86_64-apple-darwin10.8.0/4.6.3/lto-wrapper Target: x86_64-apple-darwin10.8.0 Configured with: ../src/configure --prefix=/Users/buildbot/build/sage/bsd-1/bsd_64_binary/build/sage-5.2/local --with-local-prefix=/Users/buildbot/build/sage/bsd-1/bsd_64_binary/build/sage-5.2/local --with-gmp=/Users/buildbot/build/sage/bsd-1/bsd_64_binary/build/sage-5.2/local --with-mpfr=/Users/buildbot/build/sage/bsd-1/bsd_64_binary/build/sage-5.2/local --with-mpc=/Users/buildbot/build/sage/bsd-1/bsd_64_binary/build/sage-5.2/local --with-system-zlib --disable-multilib Thread model: posix gcc version 4.6.3 (GCC) **************************************************** running configure ****************************************** Configure: Autodetecting ZMQ settings... Custom ZMQ dir: /Library/sage/local gcc -fno-strict-aliasing -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Library/sage/local/include -Izmq/utils -Izmq/core -Izmq/devices -c detect/vers.c -o detect/vers.o detect/vers.c:3:17: fatal error: zmq.h: No such file or directory compilation terminated. Fatal: Failed to compile ZMQ test program. Please check to make sure: * You have a C compiler installed * A development version of Python is installed (including header files) * A development version of ZMQ >= 2.1.4 is installed (including header files) * If ZMQ is not in a default location, supply the argument --zmq=<path> * If you did recently install ZMQ to a default location, try rebuilding the ld cache with `sudo ldconfig` or specify zmq's location with `--zmq=/usr/local` error: command 'gcc' failed with exit status 1
comment:13 Changed 10 years ago by
Replying to jtremblay:
Apparently not, zmq was not installed when I tried installing pyzmq :
Yes, but this was not my question: zeromq needs to be installed before pyzmq.
To summarize:
- The
pyzmq-2.1.11.p0.spkg
is broken on OSX 10.5.8. - The
pyzmq-2.1.11.p1.spkg
fixes the bug at least for OSX 10.5.8. - The
pyzmq-2.1.11.p1.spkg
also work on OSX 10.7.3. - And we do not know if
pyzmq-2.1.11.p0.spkg
was broken on OSX 10.7.3 also (which was my previous question).
#12719 will be merged soon, so it would be nice if this ticket could be reviewed, no?
comment:14 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Summary: | gcc error while installing optionnal package pyzmq-2.1.11.p0 → Fix gcc error in pyzmq-2.1.11.p0.spkg |
comment:15 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:16 Changed 10 years ago by
Authors: | → Sebastien Labbe |
---|---|
Reviewers: | → Volker Braun |
Status: | needs_review → positive_review |
Looks good to me.
comment:18 Changed 10 years ago by
Authors: | Sebastien Labbe → Sébastien Labbé |
---|
comment:19 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | positive_review → closed |
Could you create a proper patch and upload it as an attachment?