This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients Arfrever, barry, doko, freakboy3742, larry, ncoghlan, ned.deily, python-dev, rkuska, sYnfo, wscullin, xdegaye
Date 2016-06-18.20:47:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466282857.99.0.222728773674.issue23968@psf.upfronthosting.co.za>
In-reply-to
Content
There is a problem with the current implementation.  When running ./configure using compilers other than a current gcc, for example, when using clang or older versions of gcc, the build variable MULTIARCH may not get set because those compilers do not support --print-multiarch:

configure.ac:744
MULTIARCH=$($CC --print-multiarch 2>/dev/null)

But, a bit later in ./configure, PLATFORM_TRIPLET gets set as a result of running conftest.c.  The end result is that PLATFORM_TRIPET is non-empty but MULTIARCH is empty.  Still later in configure.ac (around 4477:

if test x$PLATFORM_TRIPLET = x; then
  LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
else
  LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
fi

So, the value of LIBPL is extended to include PLATFORM_TRIPLET regardless of whether MULTIARCH has a value.

This causes problems at runtime because get_makefile_filename() in Lib/sysconfig.py now uses the value of sys.implemntation's _multiarch attribute (whose value is compiled in sysmodule.c from MULTIARCH) to form the path to the config directory (the equivalent of LIBPL).  In these cases, sys.implementation will have no_multiarch attribute so sysconfig looks for the config directory in the pre-3.6 location (e.g. .../lib/python3.6/config-3.6m) even though it was installed in the new location (.../lib/python3.6/config-3.6m-darwin).  Fortunately, both test_sysconfig and test_distutils catch this:

======================================================================
FAIL: test_srcdir (test.test_sysconfig.TestSysConfig)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/py/dev/3x/root/uxd/lib/python3.6/test/test_sysconfig.py", line 346, in test_srcdir
    self.assertTrue(os.path.isdir(srcdir), srcdir)
AssertionError: False is not true : /py/dev/3x/root/uxd/lib/python3.6/config-3.6dm

======================================================================
FAIL: test_get_makefile_filename (test.test_sysconfig.MakefileTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/py/dev/3x/root/uxd/lib/python3.6/test/test_sysconfig.py", line 414, in test_get_makefile_filename
    self.assertTrue(os.path.isfile(makefile), makefile)
AssertionError: False is not true : /py/dev/3x/root/uxd/lib/python3.6/config-3.6dm/Makefile

======================================================================
FAIL: test_srcdir (distutils.tests.test_sysconfig.SysconfigTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/py/dev/3x/root/uxd/lib/python3.6/distutils/tests/test_sysconfig.py", line 61, in test_srcdir
    self.assertTrue(os.path.isdir(srcdir), srcdir)
AssertionError: False is not true : /py/dev/3x/root/uxd/lib/python3.6/config-3.6dm

----------------------------------------------------------------------

I'm not sure what the best solution is.
History
Date User Action Args
2016-06-18 20:47:38ned.deilysetrecipients: + ned.deily, barry, doko, ncoghlan, larry, Arfrever, freakboy3742, xdegaye, python-dev, sYnfo, rkuska, wscullin
2016-06-18 20:47:37ned.deilysetmessageid: <1466282857.99.0.222728773674.issue23968@psf.upfronthosting.co.za>
2016-06-18 20:47:37ned.deilylinkissue23968 messages
2016-06-18 20:47:37ned.deilycreate