Bug 7802

Summary: host-python build hangs compiling getbuildinfo.o
Product: buildroot Reporter: David Bender <codehero>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: buildroot
Priority: P5    
Version: 2014.11   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: kos_tom's patch to disable hg and svn build info tags

Description David Bender 2015-01-16 15:11:07 UTC
Created attachment 5810 [details]
kos_tom's patch to disable hg and svn build info tags

When building the host python, hg or svn is invoked to create build info tags. This can result in a socket hang, blocking compilation from completion.

The solution, as determined by kos_tom on #buildroot (THANK YOU), was to disable hg and svn from python's automake.
Comment 1 Thomas Petazzoni 2015-01-16 21:32:47 UTC
Here is the quick patch I came up with:

diff --git a/package/python/python.mk b/package/python/python.mk
index 4a3e71c..5791d4b 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -40,7 +40,9 @@ HOST_PYTHON_CONF_OPTS +=      \
 # This is needed because libpython may be installed at the same time that
 # python is called.
 HOST_PYTHON_CONF_ENV += \
-       LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags"
+       LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \
+       ac_cv_prog_HAS_HG=/bin/false \
+       ac_cv_prog_SVNVERSION=/bin/false
 
 # Building host python in parallel sometimes triggers a "Bus error"
 # during the execution of "./python setup.py build" in the
@@ -130,7 +132,9 @@ PYTHON_CONF_ENV += \
        ac_cv_have_long_long_format=yes \
        ac_cv_file__dev_ptmx=yes \
        ac_cv_file__dev_ptc=yes \
-       ac_cv_working_tzset=yes
+       ac_cv_working_tzset=yes \
+       ac_cv_prog_HAS_HG=/bin/false \
+       ac_cv_prog_SVNVERSION=/bin/false
 
 PYTHON_CONF_OPTS += \
        --without-cxx-main      \
Comment 2 Thomas Petazzoni 2016-08-31 21:19:08 UTC
I've submitted two patches to fix this: https://patchwork.ozlabs.org/patch/664681/ and https://patchwork.ozlabs.org/patch/664680/.