AnsweredAssumed Answered

Yocto 1.7: problems when adding Python3 modules (paramiko, pycrypt, distribute)

Question asked by Lukasz Zemla on Jun 16, 2015

Hi!

 

I'd like to ad to my image Python 3 modules, especially python3-paramiko and required by it module pycrypto (I'd like to use P1020RDB-PC with Python 3 installed as some SFTP/SSH testbench station). I use freescale_sdk_ubuntu14.04_32bit_PPCE500V2_20150108 Virtual Host Environment. I'm a newbie in a Yocto, so maybe I'm doing something wrong. My way of thinking was as following:

 

There is no paramiko recipe for Python 3, so I created new recipe python3-pycrypto_2.6.bb basing on existing recipe python-pycrypto_2.6.bb (I renamed all occurencies of'distutils' to 'distutils3' - is it the right way to tell Yocto that I want to have Python3 module?).

In a similar way I created python3-paramiko_1.15.2.bb recipe (both are attached). When I try to bitbake pycrypto, I get following error:

NOTE: Preparing runqueue

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

ERROR: Function failed: do_compile (log file is located at /home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/work/ppce500v2-fsl-linux-gnuspe/python3-pycrypto/2.6-r0/temp/log.do_compile.25789)

ERROR: Logfile of failure stored in: /home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/work/ppce500v2-fsl-linux-gnuspe/python3-pycrypto/2.6-r0/temp/log.do_compile.25789

Log data follows:

| DEBUG: SITE files ['endian-big', 'bit-32', 'powerpc-common', 'common-linux', 'common-glibc', 'powerpc-linux', 'powerpc32-linux', 'powerpc-linux-gnuspe', 'common']

| DEBUG: Executing shell function do_compile

| Traceback (most recent call last):

|   File "setup.py", line 45, in <module>

|     import struct

|   File "/home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/sysroots/i686-linux/usr/lib/python3.3/struct.py", line 12, in <module>

|     from _struct import *

| ImportError: No module named '_struct'

| ERROR: python3 setup.py build_ext execution failed.

| WARNING: exit code 1 from a shell command.

| ERROR: Function failed: do_compile (log file is located at /home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/work/ppce500v2-fsl-linux-gnuspe/python3-pycrypto/2.6-r0/temp/log.do_compile.25789)

ERROR: Task 580 (/home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/meta-woodward/recipes-devtools/python3-pycrypto/python3-pycrypto_2.6.bb, do_compile) failed with exit code '1'

NOTE: Tasks Summary: Attempted 1425 tasks of which 1424 didn't need to be rerun and 1 failed.

No currently running tasks (1424 of 2422)

 

Summary: 1 task failed:

  /home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/meta-woodward/recipes-devtools/python3-pycrypto/python3-pycrypto_2.6.bb, do_compile

Summary: There was 1 WARNING message shown.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

freescale@freescale-sdk:~/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release$

 

I noticed, that I also get errors when building python3-distribute package:

 

NOTE: Preparing runqueue

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

ERROR: Function failed: do_compile (log file is located at /home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/work/ppce500v2-fsl-linux-gnuspe/python3-distribute/0.6.32-ml5/temp/log.do_compile.26341)

ERROR: Logfile of failure stored in: /home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/work/ppce500v2-fsl-linux-gnuspe/python3-distribute/0.6.32-ml5/temp/log.do_compile.26341

Log data follows:

| DEBUG: Executing shell function do_compile

| Traceback (most recent call last):

|   File "setup.py", line 45, in <module>

|     exec(init_file.read(), d)

|   File "<string>", line 8, in <module>

|   File "/home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/work/ppce500v2-fsl-linux-gnuspe/python3-distribute/0.6.32-ml5/distribute-0.6.32/build/src/setuptools/__init__.py", line 2, in <module>

|     from setuptools.extension import Extension, Library

|   File "/home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/work/ppce500v2-fsl-linux-gnuspe/python3-distribute/0.6.32-ml5/distribute-0.6.32/build/src/setuptools/extension.py", line 5, in <module>

|     from setuptools.dist import _get_unpatched

|   File "/home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/work/ppce500v2-fsl-linux-gnuspe/python3-distribute/0.6.32-ml5/distribute-0.6.32/build/src/setuptools/dist.py", line 103

|     except ValueError, e:

|                      ^

| SyntaxError: invalid syntax

| ERROR: python3 setup.py build_ext execution failed.

| WARNING: exit code 1 from a shell command.

| ERROR: Function failed: do_compile (log file is located at /home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release/tmp/work/ppce500v2-fsl-linux-gnuspe/python3-distribute/0.6.32-ml5/temp/log.do_compile.26341)

ERROR: Task 6 (/home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/poky/meta/recipes-devtools/python/python3-distribute_0.6.32.bb, do_compile) failed with exit code '1'

NOTE: Tasks Summary: Attempted 584 tasks of which 583 didn't need to be rerun and 1 failed.

No currently running tasks (583 of 634)

 

Summary: 1 task failed:

  /home/freescale/SDK/QorIQ-SDK-V1.7-20141218-yocto/poky/meta/recipes-devtools/python/python3-distribute_0.6.32.bb, do_compile

Summary: There was 1 WARNING message shown.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

freescale@freescale-sdk:~/SDK/QorIQ-SDK-V1.7-20141218-yocto/build_p1020rdb_release$

 

For me it looks like broken Python environment used during builds... Any ideas?

Thank you in advance.

 

Best regards,

Lukasz

Original Attachment has been moved to: python3-pycrypto_2.6.bb.zip

Original Attachment has been moved to: python3-paramiko_1.15.2.bb.zip

Outcomes