Bug 13340 - python3 build fails when target is mips softfloat
Summary: python3 build fails when target is mips softfloat
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 2.8
Hardware: Other mips
: Medium normal
Target Milestone: 2.8 M1
Assignee: Matthias Schoepfer
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-05-08 15:53 UTC by Matthias Schoepfer
Modified: 2019-06-13 15:07 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Patch to fix Python/configure.ac (2.04 KB, patch)
2019-05-08 15:53 UTC, Matthias Schoepfer
no flags Details | Diff
Alternative patch for recipe python3_3.7.2.bb (743 bytes, patch)
2019-05-08 15:54 UTC, Matthias Schoepfer
no flags Details | Diff
Backported patch from PR mentioned above (7.29 KB, patch)
2019-05-31 14:40 UTC, Matthias Schoepfer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Schoepfer 2019-05-08 15:53:32 UTC
Created attachment 4511 [details]
Patch to fix Python/configure.ac

Building of python3 will fail if target is mips(32) softfloat. Result is:

ERROR: python3-3.7.2-r0 do_package_qa: QA Issue: non -staticdev package contains static .a library: python3-misc path '/work/mips32r2-24kc-nf-ithinx-linux-musl/python3/3.7.2-r0/packages-split/python3-misc/usr/lib/python3.7/config-3.7m/libpython3.7m.a'
non -staticdev package contains static .a library: python3-misc path '/work/mips32r2-24kc-nf-ithinx-linux-musl/python3/3.7.2-r0/packages-split/python3-misc/usr/lib/python3.7/config-3.7m/libpython3.7m.a' [staticdev]
ERROR: python3-3.7.2-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: python3-3.7.2-r0 do_package_qa: 
ERROR: python3-3.7.2-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/mschoepf/yocto/sa171-warrior/builddir/tmp/work/mips32r2-24kc-nf-ithinx-linux-musl/python3/3.7.2-r0/temp/log.do_package_qa.5549
ERROR: Task (/home/mschoepf/yocto/sa171s-yocto-main/poky/meta/recipes-devtools/python/python3_3.7.2.bb:do_package_qa) failed with exit code '1'

Reason is, that configure.ac tries to guess the OS triplet, but fails on mips softfloat, because it merely looks for existence of __mips_hard_float, but I reckon, __mips_soft_float is an indication for mips architecture as well... 

This might be an upstream issue, or could also be fixed when triplet -> none is accepted in the recipe, i.e. changing poky/meta/recipes-devtools/python/python3_3.7.2.bb like in the second attachment. Do not know, what further implications that might bring...

This is something I discovered migrating to warrior.
Comment 1 Matthias Schoepfer 2019-05-08 15:54:24 UTC
Created attachment 4512 [details]
Alternative patch for recipe python3_3.7.2.bb
Comment 2 Matthias Schoepfer 2019-05-08 15:54:57 UTC
Sorry, I think, first patch is the better approach....
Comment 3 Richard Purdie 2019-05-08 21:07:48 UTC
I'm a bit worried that if configure is failing to detect mips correctly, there may be bigger problems. This at the very least needs more investigation on what that configure option controls...
Comment 4 Matthias Schoepfer 2019-05-09 09:02:34 UTC
I already upstreamed a version of this patch, it is in review, but I think you are probably right with a nights sleep... autotools should determine OS triplet from config.guess *or* from the variables set in the configure script. In Python, there is C Code included in the configure.ac to get the job done...
Comment 5 Randy MacLeod 2019-05-09 14:48:03 UTC
Which upstream do you mean? Do you have a link?
Comment 6 Matthias Schoepfer 2019-05-10 10:24:44 UTC
cpython.

Here is my PR: 

https://github.com/python/cpython/pull/13196

Here is the issue:

https://bugs.python.org/issue36852

Regards
Comment 7 Randy MacLeod 2019-05-16 14:39:50 UTC
The bug is submitted upstream and they've asked to move the issue to github.
We can take a local patch if you can send one now please Mattias.
Comment 8 Randy MacLeod 2019-05-30 14:50:19 UTC
 Matthias do you plan to submit the fix to oe-core soon?
Comment 9 Matthias Schoepfer 2019-05-31 14:39:26 UTC
Hi Randy,

okay, I attached a patch, I hope, that is somewhat useful. Please help, if the patch does not match qa. It is my first patch to OE, so please bear with me.

Regards,

   Matthias
Comment 10 Matthias Schoepfer 2019-05-31 14:40:50 UTC
Created attachment 4519 [details]
Backported patch from PR mentioned above

Hopefully, this is the right way to approach this...
Comment 11 Randy MacLeod 2019-05-31 16:30:48 UTC
Nice, thanks Mattias. The patch looks good to me aside from an Upstream-Status: tag that is described:
   https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations:_Upstream-Status

We don't typically apply patches directly from bugzilla since the community will not get a chance to review them before the patch is applied to master in that caes. Would you be so kind as to send it to the oe-core list, as explained:

   https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded

If you need help, just ask here or on IRC: 
   https://old.yoctoproject.org/tools-resources/community/irc

Thanks and we're glad to have you dip your toes into the YoctoProject!
Comment 12 Matthias Schoepfer 2019-06-03 11:00:57 UTC
Hi Randy,

just submitted the patch. Let's see, what happens
Comment 13 Randy MacLeod 2019-06-06 14:56:01 UTC
Where did you send the patch? It should go to the oe-core list.
Comment 14 Matthias Schoepfer 2019-06-06 15:31:59 UTC
Hi Randy,

thanks for the follow up. Turns out, my original mail got lost. Now it is being reviewed...