pyzmq 编译错误

pyzmq 编译错误

执行以下门户的指令,

https://gns3.com/discussions/how-to-install-gns3-1-2-3-on-ubu

但是 ubutu 12.04 在 pyzmq 阶段抛出错误,这里是错误报告。

ubuntu@ubuntu:/opt/gns3/downloads/pyzmq$ sudo python3.3 setup.py install
running install
running build
running build_py
running build_ext
running configure
************************************************
Using bundled libzmq
already have bundled/zeromq
already have platform.hpp
************************************************
checking for timer_create
cc -c /tmp/timer_create_6e3wa.c -o build/temp.linux-i686-3.3/tmp/timer_create_6e3wa.o
cc build/temp.linux-i686-3.3/tmp/timer_create_6e3wa.o -o build/temp.linux-i686-3.3/a.out
build/temp.linux-i686-3.3/tmp/timer_create_6e3wa.o: In function `main':
timer_create_6e3wa.c:(.text+0x7): undefined reference to `timer_create'
collect2: ld returned 1 exit status
no timer_create, linking librt
************************************************
skipping 'zmq/devices/monitoredqueue.c' Cython extension (up-to-date)
skipping 'zmq/backend/cython/_device.c' Cython extension (up-to-date)
skipping 'zmq/backend/cython/_poll.c' Cython extension (up-to-date)
skipping 'zmq/backend/cython/_version.c' Cython extension (up-to-date)
skipping 'zmq/backend/cython/constants.c' Cython extension (up-to-date)
cythoning zmq/backend/cython/context.pyx to zmq/backend/cython/context.c

Error compiling Cython file:
------------------------------------------------------------
...
    def underlying(self):
        """The address of the underlying libzmq context"""
        return <size_t     self.handle

    # backward-compat, though nobody is using it
    _handle = underlying
                       ^
------------------------------------------------------------

zmq/backend/cython/context.pyx:119:24: 'underlying' is not a constant, variable or function identifier
building 'zmq.backend.cython.context' extension
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -    Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_SYS_UN_H=1 -Ibundled/zeromq/include -Izmq/utils -Izmq/backend/    cython -Izmq/devices -I/usr/include/python3.3m -c zmq/backend/cython/context.c -o build/temp.linux-i686-3.3/zmq/backend/cython/context.o
zmq/backend/cython/context.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
ubuntu@ubuntu:/opt/gns3/downloads/pyzmq$ 

感谢您的所有建议。谢谢

答案1

这是 Cython 开发版本 (0.24a) 中的一个错误。如果您安装的是 Cython 稳定版本 (0.23):

python3.3 -m pip install cython

你应该没事。

由于您已经检出存储库,您也可以检出 git 分支,然后继续安装:

git checkout 0.23.4
python3 setup.py install

答案2

此行为由cython@9b04560@property,它改变了节点的处理方式。@minrk删除了零点659f921,因此最近检查 zeromq 后问题应该已经消失。

相关内容