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 masamoto
Recipients erik.bray, masamoto
Date 2016-09-16.03:01:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473994897.24.0.312800115245.issue27374@psf.upfronthosting.co.za>
In-reply-to
Content
I found -L option addition at Lib/distutils/command/build_ext.py:222.  This place is a process that finalize options for the build_ext command.
Comment in there: for extensions under Cygwin and AtheOS Python's library directory must be appended to library_dirs

After that I searched Makefile rule for installing $(LDLIBRARY) into "$(prefix)/lib/python3.5/config-3.5m" to look for way of simplifying code.  And I came across the $(LIBPL) configuration variable that is used by installation of the configuration for building library.
Hence I made a patch that adds to library_dirs the $(LIBPL) configuration variable instead of the "$(prefix)/lib/python$(VERSION)/config".  I succeeded to build '_speedups' C extension module of simplejson using new python that is applied this patch.
Erik, Would you be able to verify this patch?
Thanks

Build log:
$ patch -p1 <3.5-issue27374-distutils-build_ext.patch
$ ./configure --prefix=/opt/py35 --with-threads --with-dbmliborder=gdbm --with-system-ffi --with-system-expat
$ make touch && make -j2 && make altinstall
$ /opt/py35/bin/python3.5 -V
Python 3.5.2+
$ LANG=C /opt/py35/bin/pip3.5 install -v simplejson
(snip)
running build_ext
building 'simplejson._speedups' extension
creating build/temp.cygwin-2.6.0-i686-3.5
creating build/temp.cygwin-2.6.0-i686-3.5/simplejson
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/py35/include/python3.5m -c simplejson/_speedups.c -o build/temp.cygwin-2.6.0-i686-3.5/simplejson/_speedups.o
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-2.6.0-i686-3.5/simplejson/_speedups.o -L/opt/py35/lib/python3.5/config-3.5m -L/opt/py35/lib -lpython3.5m -o build/lib.cygwin-2.6.0-i686-3.5/simplejson/_speedups.cpython-35m.dll
running install_lib
(snip)
History
Date User Action Args
2016-09-16 03:01:37masamotosetrecipients: + masamoto, erik.bray
2016-09-16 03:01:37masamotosetmessageid: <1473994897.24.0.312800115245.issue27374@psf.upfronthosting.co.za>
2016-09-16 03:01:37masamotolinkissue27374 messages
2016-09-16 03:01:36masamotocreate