Masayuki Yamamoto added the comment: 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) ---------- Added file: http://bugs.python.org/file44685/3.5-issue27374-distutils-build_ext.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27374> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com