#13313: gcc error while installing optionnal package pyzmq-2.1.11.p0
-------------------------------------+--------------------------------------
Reporter: slabbe | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-5.3
Component: optional packages | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
-------------------------------------+--------------------------------------
Changes (by dimpase):
* component: packages => optional packages
Old description:
> As reported on sage-devel
> [https://groups.google.com/forum/?fromgroups#!topic/sage-
> devel/CuZNKclprIQ here], there is an error when installing the optional
> package pyzmq (#12843) 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 following patch seems to fix the problem :
>
> {{{
> #!diff
> pyzmq-2.1.11.p1/patches $ cat buildutils.patch
> --- src/buildutils.py 2011-12-19 04:21:14.000000000 -0500
> +++ src-patched/buildutils.py 2012-07-27 12:01:07.000000000 -0400
> @@ -111,13 +111,7 @@
>
> cpreargs = lpreargs = None
> if sys.platform == 'darwin':
> - # use appropriate arch for comiler
> - if platform.architecture()[0]=='32bit':
> - cpreargs = ['-arch','i386']
> - lpreargs = ['-arch', 'i386', '-undefined', 'dynamic_lookup']
> - else:
> - # allow for missing UB arch, since it will still work:
> - lpreargs = ['-undefined', 'dynamic_lookup']
> + lpreargs = ['-undefined', 'dynamic_lookup']
>
> objs = cc.compile([cfile],extra_preargs=cpreargs)
> cc.link_executable(objs, efile, extra_preargs=lpreargs)
> }}}
New description:
As reported on sage-devel
[https://groups.google.com/forum/?fromgroups#!topic/sage-devel/CuZNKclprIQ
here], there is an error when installing the optional package pyzmq
(#12843) 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 seems to fix the problem :
{{{
#!diff
pyzmq-2.1.11.p1/patches $ cat buildutils.patch
--- src/buildutils.py 2011-12-19 04:21:14.000000000 -0500
+++ src-patched/buildutils.py 2012-07-27 12:01:07.000000000 -0400
@@ -111,13 +111,7 @@
cpreargs = lpreargs = None
if sys.platform == 'darwin':
- # use appropriate arch for comiler
- if platform.architecture()[0]=='32bit':
- cpreargs = ['-arch','i386']
- lpreargs = ['-arch', 'i386', '-undefined', 'dynamic_lookup']
- else:
- # allow for missing UB arch, since it will still work:
- lpreargs = ['-undefined', 'dynamic_lookup']
+ lpreargs = ['-undefined', 'dynamic_lookup']
objs = cc.compile([cfile],extra_preargs=cpreargs)
cc.link_executable(objs, efile, extra_preargs=lpreargs)
}}}
--
Comment:
Could you create a proper patch and upload it as an attachment?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13313#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.