[zeromq-dev] Problem installing python language binding on openwrt

Roman consulttelecom at gmail.com
Tue Dec 10 19:51:48 CET 2013


Unfortunately, no compiler is available on OpenWRT platform. All the C
packages can be cross compiled with OpenWRT toolchain on another platform.

I have zeromq library crosscompiled and installed on OpenWRT. It was tested
on my hardware with test programs and it works.

Now I only need to install Python binding on OpenWRT in order to use zeromq
library from Python programs. As far as I understand, Python binding is not
pure Python and needs other C/C++ code to be compiled for successful
installation. Can somebody specify which parts I should crosscompile for
Python binding? Which changes needed in setup.py script to have everything
installed correctly?



On Tue, Dec 10, 2013 at 2:23 AM, MinRK <benjaminrk at gmail.com> wrote:

> what C compiler do you have available? You may need to:
>
> export CC=actual_c_compiler
>
> because Python tries to compile extensions with the compiler used for
> Python itself by default (often not available if cross compiled)
>
>
> On Mon, Dec 9, 2013 at 11:15 AM, Roman <consulttelecom at gmail.com> wrote:
>
>> Here is the output of running "DISTUTILS_DEBUG=1 python setup.py
>> install" on my device
>>
>> root at OpenWrt:/home# cd pyzmq-14.0.1/
>> root at OpenWrt:/home/pyzmq-14.0.1# ls
>> AUTHORS.md          PKG-INFO            docs                setup.py
>> CONTRIBUTING.md     README.md           examples            setupegg.py
>> COPYING.BSD         build               perf                tox.ini
>> COPYING.LESSER      buildutils          setup.cfg.android   zmq
>> MANIFEST.in         bundled             setup.cfg.template  zmqversion.py
>> root at OpenWrt:/home/pyzmq-14.0.1# DISTUTILS_DEBUG=1 python setup.py
>> install
>> options (after parsing config files):
>> options (after parsing command line):
>> option dict for 'install' command:
>>   {}
>> running install
>> Distribution.get_command_obj(): creating 'install' command object
>> pre-finalize_{unix,other}:
>>   prefix: None
>>   exec_prefix: None
>>   home: None
>>   user: 0
>>   install_base: None
>>   install_platbase: None
>>   root: None
>>   install_purelib: None
>>   install_platlib: None
>>   install_lib: None
>>   install_headers: None
>>   install_scripts: None
>>   install_data: None
>>   compile: None
>>   compile: True
>>   optimize: None
>>   force: None
>>   skip_build: 0
>>   record: None
>> post-finalize_{unix,other}():
>>   prefix: /usr
>>   exec_prefix: /usr
>>   home: None
>>   user: 0
>>   install_base: /usr
>>   install_platbase: /usr
>>   root: None
>>   install_purelib: $base/lib/python$py_version_short/site-packages
>>   install_platlib: $platbase/lib/python$py_version_short/site-packages
>>   install_lib: None
>>   install_headers: $base/include/python$py_version_short/$dist_name
>>   install_scripts: $base/bin
>>   install_data: $base
>>   compile: None
>>   compile: True
>>   optimize: None
>>   force: None
>>   skip_build: 0
>>   record: None
>> post-expand_basedirs():
>>   prefix: /usr
>>   exec_prefix: /usr
>>   home: None
>>   user: 0
>>   install_base: /usr
>>   install_platbase: /usr
>>   root: None
>>   install_purelib: $base/lib/python$py_version_short/site-packages
>>   install_platlib: $platbase/lib/python$py_version_short/site-packages
>>   install_lib: None
>>   install_headers: $base/include/python$py_version_short/$dist_name
>>   install_scripts: $base/bin
>>   install_data: $base
>>   compile: None
>>   compile: True
>>   optimize: None
>>   force: None
>>   skip_build: 0
>>   record: None
>> config vars:
>> {'base': '/usr',
>>  'dist_fullname': 'pyzmq-14.0.1',
>>  'dist_name': 'pyzmq',
>>  'dist_version': '14.0.1',
>>  'exec_prefix': '/usr',
>>  'platbase': '/usr',
>>  'prefix': '/usr',
>>  'py_version': '2.7.3',
>>  'py_version_nodot': '27',
>>  'py_version_short': '2.7',
>>  'sys_exec_prefix': '/usr',
>>  'sys_prefix': '/usr',
>>  'userbase': '/root/.local',
>>  'usersite': '/root/.local/lib/python2.7/site-packages'}
>> post-expand_dirs():
>>   prefix: /usr
>>   exec_prefix: /usr
>>   home: None
>>   user: 0
>>   install_base: /usr
>>   install_platbase: /usr
>>   root: None
>>   install_purelib: /usr/lib/python2.7/site-packages
>>   install_platlib: /usr/lib/python2.7/site-packages
>>   install_lib: None
>>   install_headers: /usr/include/python2.7/pyzmq
>>   install_scripts: /usr/bin
>>   install_data: /usr
>>   compile: None
>>   compile: True
>>   optimize: None
>>   force: None
>>   skip_build: 0
>>   record: None
>> after prepending root:
>>   prefix: /usr
>>   exec_prefix: /usr
>>   home: None
>>   user: 0
>>   install_base: /usr
>>   install_platbase: /usr
>>   root: None
>>   install_purelib: /usr/lib/python2.7/site-packages
>>   install_platlib: /usr/lib/python2.7/site-packages
>>   install_lib: /usr/lib/python2.7/site-packages/
>>   install_headers: /usr/include/python2.7/pyzmq
>>   install_scripts: /usr/bin
>>   install_data: /usr
>>   compile: None
>>   compile: True
>>   optimize: None
>>   force: None
>>   skip_build: 0
>>   record: None
>> Distribution.get_command_obj(): creating 'build' command object
>> running build
>> running build_py
>> Distribution.get_command_obj(): creating 'build_py' command object
>> running build_ext
>> Distribution.get_command_obj(): creating 'build_ext' command object
>> running configure
>> Distribution.get_command_obj(): creating 'configure' command object
>> ************************************************
>> Configure: Autodetecting ZMQ settings...
>>     Custom ZMQ dir:       /usr/local
>> creating build/temp.linux-mips-2.7/scratch/tmp
>> cc -c /tmp/timer_create4S7pHV.c -o
>> build/temp.linux-mips-2.7/scratch/tmp/timer_create4S7pHV.o
>> unable to execute cc: No such file or directory
>> ccache_cc -fno-strict-aliasing -Os -pipe -mips32r2 -mtune=mips32r2
>> -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable
>> -msoft-float -DNDEBUG -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
>> -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fPIC
>> -I/usr/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -c
>> build/temp.linux-mips-2.7/scratch/vers.c -o
>> build/temp.linux-mips-2.7/scratch/vers.o
>>  unable to execute ccache_cc: No such file or directory
>>
>> error: command 'ccache_cc' failed with exit status 1
>>
>> Fatal: Falling back on bundled libzmq, but setup.cfg has explicitly
>> prohibited building the libzmq extension.
>>
>>
>> On Mon, Dec 9, 2013 at 10:59 PM, Greg Ward <greg at gerg.ca> wrote:
>>
>>> On 08 December 2013, Roman said:
>>> > I tried to install python zeromq binding on openwrt issuing command
>>> python
>>> > setup.py install. Script ended with the following error:
>>> >
>>> > unable to execute ccache_cc: No such file or directory
>>> >
>>> > error: command 'ccache_cc' failed with exit status 1
>>>
>>> It sounds like Python was built with a compiler (ccache_cc) that is
>>> not installed on your machine. You should probably ask on an OpenWRT
>>> forum where to get ccache_cc. Things to investigate:
>>>
>>>   * Are you able to compile other C programs/libraries?
>>>   * Are you able to compile other Python extensions?
>>>
>>> Also, try
>>>
>>>   DISTUTILS_DEBUG=1 python setup.py install
>>>
>>> That might shed some light.
>>>
>>>        Greg
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev at lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131210/e01b66ab/attachment.htm>


More information about the zeromq-dev mailing list