Bug 11472

Summary: Python Makefile contains many references to the build system
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Juro Bystricky <juro.bystricky>
Component: coreAssignee: Juro Bystricky <juro.bystricky>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alejandro.hernandez, meta.mr.watcher, meta.watcher
Version: 2.3   
Target Milestone: 2.5 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Bug Depends on:    
Bug Blocks: 11513    

Description Juro Bystricky 2017-05-05 23:58:32 UTC
After building core-image-sato, I see there is Makefile in /usr/lib/python3.5/config-3.5m
This Makefile contains numerous references to the actual host build system:
Some of them (there's more):


abs_srcdir=​/​data/​master-​master/​poky/​build-​repro-​new/​tmp/​work/​i586-​poky-​linux/​python3/​3.​5.​2-​r1.​0/​build/​.​.​/​Python-​3.​5
abs_builddir=​/​data/​master-​master/​poky/​build-​repro-​new/​tmp/​work/​i586-​poky-​linux/​python3/​3.​5.​2-​r1.​0/​build 

#·​Portable·​install·​script·​(configure·​doesn't·​always·​guess·​right)​
INSTALL= ​/​data/​master-​master/​poky/​build-​repro-​new/​tmp/​hosttools/​install·​-​c  	
MKDIR_P= ​/​data/​master-​master/​poky/​build-​repro-​new/​tmp/​hosttools/​mkdir·​-​p 

CONFIGURE_CFLAGS=​·​-​O2·​-​pipe·​-​g·​-​feliminate-​unused-​debug-​types·​-​fdebug-​prefix-​map=/​data/​master-​master/​poky/​build-​repro-​new/​tmp/​work/​i586-​poky-​linux/​python3/​3.​5.​2-​r1.​0=/​usr/​src/​debug/​python3/​3.​5.​2-​r1.​0·​-​fdebug-​prefix-​map=/​data/​master-​master/​poky/​build-​repro-​new/​tmp/​work/​i586-​poky-​linux/​python3/​3.​5.​2-​r1.​0/​recipe-​sysroot-​native=·​-​fdebug-​prefix-​map=/​data/​master-​master/​poky/​build-​repro-​new/​tmp/​work/​i586-​poky-​linux/​python3/​3.​5.​2-​r1.​0/​recipe-​sysroot=·​ 

CONFIG_ARGS=»   ​·​'-​-​build=x86_64-​linux'·​'-​-​host=i586-​poky-​linux'·​'-​-​target=i586-​poky-​linux'·​'-​-​prefix=/​usr'·​'-​-​exec_prefix=/​usr'·​'-​-​bindir=/​usr/​bin'·​'-​-​sbindir=/​usr/​sbin'·​'-​-​libexecdir=/​usr/​libexec'·​'-​-​datadir=/​usr/​share'·​'-​-​sysconfdir=/​etc'·​'-​-​sharedstatedir=/​com'·​'-​-​localstatedir=/​var'·​'-​-​libdir=/​usr/​lib'·​'-​-​includedir=/​usr/​include'·​'-​-​oldincludedir=/​usr/​include'·​'-​-​infodir=/​usr/​share/​info'·​'-​-​mandir=/​usr/​share/​man'·​'-​-​disable-​silent-​rules'·​'-​-​disable-​dependency-​tracking'·​''·​'-​-​with-​system-​ffi'·​'-​-​with-​threads'·​'-​-​with-​pymalloc'·​'-​-​without-​cxx-​main'·​'-​-​with-​signal-​module'·​'-​-​enable-​shared'·​'-​-​enable-​ipv6=yes'·​'ac_cv_header_bluetoo​th_bluetooth_h=no'·​'ac_cv_header_bluetoo​th_h=no'·​'CROSSPYTHONPATH=/​data/​master-​master/​poky/​build-​repro-​new/​tmp/​work/​i586-​poky-​linux/​python3/​3.​5.​2-​r1.​0/​recipe-​sysroot-​native/​usr/​lib/​python3.​5/​lib-​dynload/​'·​'-​-​without-​ensurepip'·​'-​-​disable-​static'·​'build_alias=x86_64-​linux'·​'host_alias=i586-​poky-​linux'·​'target_alias=i586-​poky-​linux'·​'CC=i586-​poky-​linux-​gcc·​·​-​m32·​-​march=i586·​-​DNDEBUG·​-​fn·​✂
Comment 1 Ross Burton 2017-05-11 14:41:53 UTC
RP has a patch which should solve a lot of this.
Comment 2 Juro Bystricky 2017-05-11 21:51:06 UTC
(In reply to comment #1)
> RP has a patch which should solve a lot of this.


Unfortunately it does not. The patch does, however, solve a similar problem in _sysconfigdata.py.
Comment 3 Ross Burton 2017-06-05 20:12:43 UTC
There's a patch on the list.
Comment 4 Ross Burton 2017-07-31 16:33:38 UTC
Reassigning to Alejandro.

This *might* be fixed in master.
Comment 5 Juro Bystricky 2017-08-28 21:52:15 UTC
Not fixed as of Aug 28, 2017.
Comment 6 Juro Bystricky 2017-11-22 21:54:15 UTC
This fixes the issue:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=jurob/reproducible_binaries_4&id=6da0b45df53ba2cb0df0a879b220e3722c081e2d

The patch:


diff --git a/meta/recipes-devtools/python/python3_3.5.3.bb b/meta/recipes-devtools/python/python3_3.5.3.bb
index 13df12f..2ea9e13 100644
--- a/meta/recipes-devtools/python/python3_3.5.3.bb
+++ b/meta/recipes-devtools/python/python3_3.5.3.bb
@@ -188,6 +188,11 @@ py_package_preprocess () {
 	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
 	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
 	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+		-e 's|${DEBUG_PREFIX_MAP}||g' \
+		-e 's:${HOSTTOOLS_DIR}/::g' \
+		-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+		-e 's:${RECIPE_SYSROOT}::g' \
+		-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
 		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
 		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \
 		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py