Bug 10361 - python3 python-config script generates invalid includes
Summary: python3 python-config script generates invalid includes
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-05 02:19 UTC by Matt Weber
Modified: 2017-11-06 09:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
updates use of prefix (1.74 KB, patch)
2017-10-06 17:46 UTC, Matt Weber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Weber 2017-10-05 02:19:36 UTC
If building in a path that starts with /usr, the includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#") assignment in the python-config.sh ends up having the path it processes ran through a path substitution once before this line is executed because the @includedir@ in the python-config.sh.in is set to the string '${prefix}/include'.  ${prefix} is assigned just above includedir in python-config.sh to prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#")

I believe we need to update the line ref below to 

includedir=$(echo "@includedir@")

https://git.busybox.net/buildroot/tree/package/python3/0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch#n43

Another option would be to rename the prefix variable in this file so that there isn't a naming conflict......

Example build failure
http://autobuild.buildroot.net/results/dfd/dfdac93d25d5730f08aa747e615a1a1c3ac7f1c0/
Comment 1 Matt Weber 2017-10-06 13:38:16 UTC
Added a upstream bug.

https://bugs.python.org/issue31713
Comment 2 Matt Weber 2017-10-06 17:46:25 UTC
Created attachment 7261 [details]
updates use of prefix