<?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>11472</bug_id>
          
          <creation_ts>2017-05-05 23:58:32 +0000</creation_ts>
          <short_desc>Python Makefile contains many references to the build system</short_desc>
          <delta_ts>2018-01-24 23:07:49 +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>core</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</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>2.5 M2</target_milestone>
          
          <blocked>11513</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Juro Bystricky">juro.bystricky</reporter>
          <assigned_to name="Juro Bystricky">juro.bystricky</assigned_to>
          <cc>alejandro.hernandez</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>73094</commentid>
    <comment_count>0</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-05-05 23:58:32 +0000</bug_when>
    <thetext>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&apos;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&apos;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=»   ​·​&apos;-​-​build=x86_64-​linux&apos;·​&apos;-​-​host=i586-​poky-​linux&apos;·​&apos;-​-​target=i586-​poky-​linux&apos;·​&apos;-​-​prefix=/​usr&apos;·​&apos;-​-​exec_prefix=/​usr&apos;·​&apos;-​-​bindir=/​usr/​bin&apos;·​&apos;-​-​sbindir=/​usr/​sbin&apos;·​&apos;-​-​libexecdir=/​usr/​libexec&apos;·​&apos;-​-​datadir=/​usr/​share&apos;·​&apos;-​-​sysconfdir=/​etc&apos;·​&apos;-​-​sharedstatedir=/​com&apos;·​&apos;-​-​localstatedir=/​var&apos;·​&apos;-​-​libdir=/​usr/​lib&apos;·​&apos;-​-​includedir=/​usr/​include&apos;·​&apos;-​-​oldincludedir=/​usr/​include&apos;·​&apos;-​-​infodir=/​usr/​share/​info&apos;·​&apos;-​-​mandir=/​usr/​share/​man&apos;·​&apos;-​-​disable-​silent-​rules&apos;·​&apos;-​-​disable-​dependency-​tracking&apos;·​&apos;&apos;·​&apos;-​-​with-​system-​ffi&apos;·​&apos;-​-​with-​threads&apos;·​&apos;-​-​with-​pymalloc&apos;·​&apos;-​-​without-​cxx-​main&apos;·​&apos;-​-​with-​signal-​module&apos;·​&apos;-​-​enable-​shared&apos;·​&apos;-​-​enable-​ipv6=yes&apos;·​&apos;ac_cv_header_bluetoo​th_bluetooth_h=no&apos;·​&apos;ac_cv_header_bluetoo​th_h=no&apos;·​&apos;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/​&apos;·​&apos;-​-​without-​ensurepip&apos;·​&apos;-​-​disable-​static&apos;·​&apos;build_alias=x86_64-​linux&apos;·​&apos;host_alias=i586-​poky-​linux&apos;·​&apos;target_alias=i586-​poky-​linux&apos;·​&apos;CC=i586-​poky-​linux-​gcc·​·​-​m32·​-​march=i586·​-​DNDEBUG·​-​fn·​✂</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73190</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-05-11 14:41:53 +0000</bug_when>
    <thetext>RP has a patch which should solve a lot of this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73219</commentid>
    <comment_count>2</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-05-11 21:51:06 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73694</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-06-05 20:12:43 +0000</bug_when>
    <thetext>There&apos;s a patch on the list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75502</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-07-31 16:33:38 +0000</bug_when>
    <thetext>Reassigning to Alejandro.

This *might* be fixed in master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76217</commentid>
    <comment_count>5</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-08-28 21:52:15 +0000</bug_when>
    <thetext>Not fixed as of Aug 28, 2017.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78332</commentid>
    <comment_count>6</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-11-22 21:54:15 +0000</bug_when>
    <thetext>This fixes the issue:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=jurob/reproducible_binaries_4&amp;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 &apos;s:--sysroot=${STAGING_DIR_TARGET}::g&apos; -e s:&apos;--with-libtool-sysroot=${STAGING_DIR_TARGET}&apos;::g \
+		-e &apos;s|${DEBUG_PREFIX_MAP}||g&apos; \
+		-e &apos;s:${HOSTTOOLS_DIR}/::g&apos; \
+		-e &apos;s:${RECIPE_SYSROOT_NATIVE}::g&apos; \
+		-e &apos;s:${RECIPE_SYSROOT}::g&apos; \
+		-e &apos;s:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g&apos; \
 		${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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79207</commentid>
    <comment_count>7</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2018-01-24 23:07:49 +0000</bug_when>
    <thetext>Fixed:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=100cf0849e3c8d355a38be525bf3cea903106f22</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>