<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7680</bug_id>
          
          <creation_ts>2015-04-30 12:01:55 +0000</creation_ts>
          <short_desc>Python3 modules not build</short_desc>
          <delta_ts>2015-09-07 13:05:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>arm</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.9 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="condo4">fabien.proriol</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>petan679</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>50635</commentid>
    <comment_count>0</comment_count>
    <who name="condo4">fabien.proriol</who>
    <bug_when>2015-04-30 12:01:55 +0000</bug_when>
    <thetext>Since I switch to fido branch, python3-elementtree and python3-fcntl packages are not generated by python3 recipe...

When I try to understand why, I can see that packages-split/python3-elementtree  and packages-split/python3-fcntl are empty...

If I revert patch b2f8367dff8a2db49b9296bd27a2e94a3619884d (python3: fix for cross compiling), all this modules build and works fine...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50638</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-04-30 12:47:12 +0000</bug_when>
    <thetext>Robert, could you take a look at this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50724</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2015-05-04 07:56:17 +0000</bug_when>
    <thetext>I tried on fido and master branch, both of them are OK, so mark it as need info:

$ rpm -qpl tmp/deploy/rpm/i586/python3-elementtree-3.3.3-r1.0.i586.rpm
/usr
/usr/lib
/usr/lib/python3.3
/usr/lib/python3.3/lib-dynload
/usr/lib/python3.3/lib-dynload/_elementtree.cpython-33m.so

$ rpm -qpl tmp/deploy/rpm/i586/python3-fcntl-3.3.3-r1.0.i586.rpm
/usr
/usr/lib
/usr/lib/python3.3
/usr/lib/python3.3/lib-dynload
/usr/lib/python3.3/lib-dynload/fcntl.cpython-33m.so</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50726</commentid>
    <comment_count>3</comment_count>
    <who name="condo4">fabien.proriol</who>
    <bug_when>2015-05-04 09:03:20 +0000</bug_when>
    <thetext>I build for armv7a_vfp_neon architecture... I don&apos;t know if it can change somethings...

In my case, 

ls -l tmp/work/armv7a-vfp-neon-jdsu-linux-gnueabi/python3/3.3.3-r1.0/packages-split/python3-elementtree/
total 0

ls -l tmp/work/armv7a-vfp-neon-jdsu-linux-gnueabi/python3/3.3.3-r1.0/packages-split/python3-fcntl/
total 0

Since this folders are empty, there is no RPM generate, so, in  tmp/deploy/rpm/armv7a_vfp_neon there is no python3-fcntl*.rpm

In fact, &quot;find tmp/work/armv7a-vfp-neon-jdsu-linux-gnueabi/python3/3.3.3-r1.0/build/ -name &quot;*cpython-33m*&quot;&quot; 
return nothing, so, all native lib are missings...

In the do_configure, I can find:

/home/foo/Yocto/fido/build/target/tmp/sysroots/x86_64-linux/usr/libexec/arm-bar-linux-gnueabi/gcc/arm-bar-linux-gnueabi/4.9.2/ld: build/temp.linux-arm-3.3/home/foo/Yocto/fido/build/mts1000/tmp/work/armv7a-vfp-neon-bar-linux-gnueabi/python3/3.3.3-r1.0/Python-3.3.3/Modules/_struct.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol&apos; can not be used when making a shared object; recompile with -fPIC
build/temp.linux-arm-3.3/home/foo/Yocto/fido/build/mts1000/tmp/work/armv7a-vfp-neon-bar-linux-gnueabi/python3/3.3.3-r1.0/Python-3.3.3/Modules/_struct.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
building &apos;_ctypes_test&apos; extension</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50727</commentid>
    <comment_count>4</comment_count>
    <who name="condo4">fabien.proriol</who>
    <bug_when>2015-05-04 09:08:40 +0000</bug_when>
    <thetext>oops, I would say, in the do_compile...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50728</commentid>
    <comment_count>5</comment_count>
    <who name="condo4">fabien.proriol</who>
    <bug_when>2015-05-04 09:13:18 +0000</bug_when>
    <thetext>

arm-my-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon -DNDEBUG -fno-inline -D__SOFTFP__ --sysroot=/home/foo/Yocto/fido/build/bar/tmp/sysroots/bar -O2 -pipe -g -feliminate-unused-debug-types -I/home/foo/Yocto/fido/build/bar/tmp/work/armv7a-vfp-neon-my-linux-gnueabi/python3/3.3.3-r1.0/Python-3.3.3/Include -I/home/foo/Yocto/fido/build/bar/tmp/work/armv7a-vfp-neon-my-linux-gnueabi/python3/3.3.3-r1.0/build -c /home/foo/Yocto/fido/build/bar/tmp/work/armv7a-vfp-neon-my-linux-gnueabi/python3/3.3.3-r1.0/Python-3.3.3/Modules/_struct.c -o build/temp.linux-arm-3.3/home/foo/Yocto/fido/build/bar/tmp/work/armv7a-vfp-neon-my-linux-gnueabi/python3/3.3.3-r1.0/Python-3.3.3/Modules/_struct.o

I think the problem is -fPIC was missing...
With dizzy, I added a bbappend with
SRC_URI_remove = &quot;file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch&quot;
To fix the same problem...

In this case (this is working), I have following logs (with -fPIC):


arm-my-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -DNDEBUG -fno-inline -D__SOFTFP__ --sysroot=/home/foo/Yocto/dizzy/build/bar/tmp/sysroots/bar -fPIC -Wno-unused-result -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -O2 -pipe -g -feliminate-unused-debug-types -O2 -pipe -g -feliminate-unused-debug-types -I./Include -I. -IInclude -I/home/foo/Yocto/dizzy/build/bar/tmp/work/armv7a-vfp-neon-my-linux-gnueabi/python3/3.3.3-r0.0/Python-3.3.3/Include -I/home/foo/Yocto/dizzy/build/bar/tmp/work/armv7a-vfp-neon-my-linux-gnueabi/python3/3.3.3-r0.0/Python-3.3.3 -c /home/foo/Yocto/dizzy/build/bar/tmp/work/armv7a-vfp-neon-my-linux-gnueabi/python3/3.3.3-r0.0/Python-3.3.3/Modules/_struct.c -o build/temp.linux-arm-3.3/home/foo/Yocto/dizzy/build/bar/tmp/work/armv7a-vfp-neon-my-linux-gnueabi/python3/3.3.3-r0.0/Python-3.3.3/Modules/_struct.o</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50772</commentid>
    <comment_count>6</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2015-05-05 06:18:26 +0000</bug_when>
    <thetext>Hi, I tried MACHINE=qemuarm which is armv5e, it also works well for me, where can I get your MACHINE&apos;s layer, please ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50775</commentid>
    <comment_count>7</comment_count>
    <who name="condo4">fabien.proriol</who>
    <bug_when>2015-05-05 08:26:37 +0000</bug_when>
    <thetext>(In reply to comment #6)


In my &lt;machine&gt;.conf I have:

require conf/machine/include/tune-zynq.inc
IMAGE_FSTYPES ?= &quot;cpio tar.gz&quot;
IMAGE_CLASSES += &quot;image_types_uboot&quot;
KERNEL_IMAGETYPE = &quot;uImage.fit&quot;
KERNEL_ITB_BASE_NAME=&quot;zynq-nymphea&quot;
MACHINE_FEATURES += &quot; mtp zynq qt5 &quot;
QEMU_TARGETS = &quot;arm&quot;

I have many other option, but it is own configurations or kernel specific options...

In any case, the board use a Xilinx Zynq from layer https://github.com/Xilinx/meta-xilinx from branch dizzy (I will update to fido, but there is only 1 change... I try to apply it in my conf (9b386bc9f7710643cc76672e5f1d21f909b51500)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51059</commentid>
    <comment_count>8</comment_count>
    <who name="Peter Bergin">petan679</who>
    <bug_when>2015-05-17 21:48:17 +0000</bug_when>
    <thetext>I can also confirm this bug. I am building for i.Mx6 with the Freescale community BSP. 


petber@petber-linux-laptop:/work/yocto/fido/qep$ ls -la tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/python3/3.3.3-r1.0/packages-split/python3-elementtree/
total 8
drwxr-xr-x  2 petber petber 4096 May 13 16:08 .
drwxr-xr-x 72 petber petber 4096 May 13 16:08 ..

petber@petber-linux-laptop:/work/yocto/fido/qep$ ls -la tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/python3/3.3.3-r1.0/packages-split/python3-fcntl/
total 8
drwxr-xr-x  2 petber petber 4096 May 13 16:08 .
drwxr-xr-x 72 petber petber 4096 May 13 16:08 ..


When my image is baked I get this error:

error: Can&apos;t install python3-subprocess-3.3.3-r1.0.0@cortexa9hf_vfp_neon: no package provides python3-fcntl


Could you try to reproduce with this BSP if you not have succeeded with the Zync? (https://github.com/Freescale/fsl-community-bsp-platform)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51093</commentid>
    <comment_count>9</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2015-05-18 19:26:40 +0000</bug_when>
    <thetext>Robert,

It appears your questions have been answered.  Please reword the question if you need additional information.  I am moving this to New.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51372</commentid>
    <comment_count>10</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2015-06-01 02:05:53 +0000</bug_when>
    <thetext>Merged into master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=63a409ae683236591f19e3c553e11c35aff84128</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53781</commentid>
    <comment_count>11</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-09-07 13:05:27 +0000</bug_when>
    <thetext>verified on poky c80b582212336044c55052ad0d39f9da06d71438
using https://github.com/Freescale/fsl-community-bsp-platform and building manually python3 recipe after a core-image-sato.
./python3-fcntl/usr/lib/python3.3/lib-dynload/fcntl.cpython-33m.so
./python3-elementtree/usr/lib/python3.3/lib-dynload/_elementtree.cpython-33m.so</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>