public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Python 3.3 coming soon?
@ 2013-10-14 14:17 Ryan Johnson
  2013-10-15  1:10 ` Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?] Ryan Johnson
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan Johnson @ 2013-10-14 14:17 UTC (permalink / raw)
  To: cygwin

Hi python maintainer,

Is there any chance to get a build of python 3.3 on x86_64? (I need PEP 
380, delegating to a subgenerator, and the Windows version doesn't play 
nice with cygwin shells). I tried downloading the sources and applying 
the patches mentioned in the .cygport file for the cygwin python 3.2 
source distribution, but make fails with:

./Modules/signalmodule.c: In function ‘fill_siginfo’:
./Modules/signalmodule.c:745:60: error: ‘siginfo_t’ has no member named 
‘si_band’
PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
^
Include/tupleobject.h:62:75: note: in definition of macro ‘PyTuple_SET_ITEM’
#define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v)
^
./Modules/signalmodule.c:745:5: note: in expansion of macro 
‘PyStructSequence_SET_ITEM’
PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
^

NOTES:

  * Google turned up several other reports of the same error message,
    going back as far as python 2.6 for cygwin, but all the workarounds
    seem to have been fixed in older versions upstream, and/or fix other
    problems that had no obvious link with si_band (such as using
    ncursesw instead of ncurses).
  * I don't have (or know how to use) cygport, so maybe it would be as
    simple as changing $VERSION in the .cygport file.


Detailed steps I followed:

 1. Download python 3.3.2 source from python.org
 2. Download the cygwin python 3.2 source package using setup.exe, along
    with binaries for all dependencies (gettext, python3-tkinter, etc.)
 3. Apply the following patches (as specified in the .cygport):
    3.0b3-tkinter.patch
    3.0rc3-ctypes-util-find_library.patch
    3.1-enable-new-dtags.patch
    3.1-ncurses-abi6.patch
    3.1-PATH_MAX.patch
    3.1-ssl-threads.patch
    3.2-ctypes-libpython.patch
    3.2-cygwin-soname.patch
    3.2-dbm.patch
    3.2-distutils-shlibext.patch
    3.2-export-PyNode_SizeOf.patch
    3.2-export-PySignal_SetWakeupFd.patch
    3.2-format-parsetuple.patch
    3.2-pep3149.patch
    3.2-thread-cygwin64.patch
    CVE-2013-4238-py32.patch
    uuid.patch
 4. autoreconf -i
 5. ./configure CPPFLAGS="-I/usr/include/ncursesw"
    --prefix=$HOME/apps/python-3.3.2 --enable-shared --enable-ipv6
    --with-libc= --with-libm= --with-system-expat --with-system-ffi
    ac_cv_func_bind_textdomain_codeset=yes
 6. make -k

Thoughts?
Ryan


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?]
  2013-10-14 14:17 Python 3.3 coming soon? Ryan Johnson
@ 2013-10-15  1:10 ` Ryan Johnson
  2013-10-15  3:28   ` nu774
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan Johnson @ 2013-10-15  1:10 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 4243 bytes --]

On 14/10/2013 10:17 AM, Ryan Johnson wrote:
> Hi python maintainer,
>
> Is there any chance to get a build of python 3.3 on x86_64? (I need 
> PEP 380, delegating to a subgenerator, and the Windows version doesn't 
> play nice with cygwin shells). I tried downloading the sources and 
> applying the patches mentioned in the .cygport file for the cygwin 
> python 3.2 source distribution, but make fails with:
>
> ./Modules/signalmodule.c: In function ‘fill_siginfo’:
> ./Modules/signalmodule.c:745:60: error: ‘siginfo_t’ has no member 
> named ‘si_band’
> PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
> ^
> Include/tupleobject.h:62:75: note: in definition of macro 
> ‘PyTuple_SET_ITEM’
> #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject 
> *)(op))->ob_item[i] = v)
> ^
> ./Modules/signalmodule.c:745:5: note: in expansion of macro 
> ‘PyStructSequence_SET_ITEM’
> PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
> ^
>
> NOTES:
>
>  * Google turned up several other reports of the same error message,
>    going back as far as python 2.6 for cygwin, but all the workarounds
>    seem to have been fixed in older versions upstream, and/or fix other
>    problems that had no obvious link with si_band (such as using
>    ncursesw instead of ncurses).
>  * I don't have (or know how to use) cygport, so maybe it would be as
>    simple as changing $VERSION in the .cygport file.
>
>
> Detailed steps I followed:
Update: I installed cygport, waded through various slight 
incompatibilities in the patches, and verified that the compilation 
still fails with the same error message. The modified .cygport and 
updated patches are attached (other patches remain the same as for 3.2).

The steps to repro are now simply:
# download the 3.3.2 source .xz from python.org
$ ./cygport --64 python3-3.cygport prep
$ ./cygport --64 python3-3.cygport compile

Going by this StackOverflow question, si_band is POSIX, though I don't 
know which version introduced it... the linux man pages suggest 
POSIX.1-2001. In any case, it looks like si_band is endemic in POSIX 
systems, but missing in cygwin.

Updating the signal module to no longer expose si_band at all seems to 
work around the problem (see patch), but compilation still dies (much 
later) with:

Traceback (most recent call last):
   File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 2166, 
in <module>
     main()
   File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 2161, 
in main
     "Tools/scripts/2to3", "Tools/scripts/pyvenv"]
   File 
"/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/core.py", line 
148, in setup
     dist.run_commands()
   File 
"/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/dist.py", line 
929, in run_commands
     self.run_command(cmd)
   File 
"/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/dist.py", line 
948, in run_command
     cmd_obj.run()
   File 
"/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/command/build.py", 
line 126, in run
     self.run_command(cmd_name)
   File 
"/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/cmd.py", line 
313, in run_command
     self.distribution.run_command(command)
   File 
"/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/dist.py", line 
948, in run_command
     cmd_obj.run()
   File 
"/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/command/build_ext.py", 
line 354, in run
     self.build_extensions()
   File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 245, 
in build_extensions
     build_ext.build_extensions(self)
   File 
"/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/command/build_ext.py", 
line 463, in build_extensions
     self.build_extension(ext)
   File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 279, 
in build_extension
     if not self.configure_ctypes(ext):
   File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 1807, 
in configure_ctypes
     exec(f.read(), globals(), fficonfig)
   File "<string>", line 33, in <module>
KeyError: 'X86_WIN64'
Makefile:505: recipe for target 'sharedmods' failed

At this point I'm stuck... any advice from the gurus out there would be 
appreciated.

Thanks,
Ryan


[-- Attachment #2: 3.3-dbm.patch --]
[-- Type: text/plain, Size: 1308 bytes --]

--- origsrc/Python-3.2.3/setup.py	2012-07-19 20:44:59.596311500 -0500
+++ src/Python-3.2.3/setup.py	2012-07-19 20:43:22.069733300 -0500
@@ -1061,6 +1061,6 @@
         dbm_order = ['gdbm']
         # The standard Unix dbm module:
-        if host_platform not in ['cygwin']:
+        if host_platform not in ['win32']:
             config_args = [arg.strip("'")
                            for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
             dbm_args = [arg for arg in config_args
@@ -1111,6 +1111,15 @@ class PyBuildExt(build_ext):
                                     ],
                                 libraries = gdbm_libs)
                             break
+                        if find_file("ndbm.h", inc_dirs, []) is not None:
+                            print("building dbm using gdbm")
+                            dbmext = Extension(
+                                '_dbm', ['_dbmmodule.c'],
+                                define_macros=[
+                                    ('HAVE_NDBM_H', None),
+                                    ],
+                                libraries = gdbm_libs)
+                            break
                 elif cand == "bdb":
                     if db_incs is not None:
                         print("building dbm using bdb")

[-- Attachment #3: 3.3-pep3149.patch --]
[-- Type: text/plain, Size: 669 bytes --]

--- origsrc/Python-3.2.5/configure.ac	2013-07-30 16:39:31.743160000 -0500
+++ src/Python-3.2.5/configure.ac	2013-07-30 18:41:19.375132600 -0500
@@ -3773,7 +3773,7 @@ AC_MSG_RESULT($SOABI)
 
 AC_SUBST(EXT_SUFFIX)
 case $ac_sys_system in
-    Linux*|GNU*)
+    Linux*|GNU*|CYGWIN*)
 	EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
     *)
 	EXT_SUFFIX=${SHLIB_SUFFIX};;

--- origsrc/Python-3.2.3/Python/dynload_shlib.c	2012-04-11 01:54:08.000000000 -0500
+++ src/Python-3.2.3/Python/dynload_shlib.c	2012-07-19 20:28:01.691090700 -0500
@@ -38,5 +38,6 @@
 
 const char *_PyImport_DynLoadFiletab[] = {
 #ifdef __CYGWIN__
+    "." SOABI ".dll",
     ".dll",
 #else  /* !__CYGWIN__ */

[-- Attachment #4: 3.3-tkinter.patch --]
[-- Type: text/plain, Size: 1125 bytes --]

--- origsrc/Python-3.0b3/setup.py	2008-07-17 11:23:53.000000000 -0500
+++ src/Python-3.0b3/setup.py	2008-08-20 22:27:08.000000000 -0500
@@ -1363,12 +1363,6 @@
             include_dirs.append('/usr/X11/include')
             added_lib_dirs.append('/usr/X11/lib')
 
-        # If Cygwin, then verify that X is installed before proceeding
-        if host_platform == 'cygwin':
-            x11_inc = find_file('X11/Xlib.h', [], include_dirs)
-            if x11_inc is None:
-                return
-
         # Check for BLT extension
         if self.compiler.find_library_file(lib_dirs + added_lib_dirs,
                                            'BLT8.0'):
@@ -1386,9 +1380,8 @@
         if host_platform in ['aix3', 'aix4']:
             libs.append('ld')
 
-        # Finally, link with the X11 libraries (not appropriate on cygwin)
-        if host_platform != "cygwin":
-            libs.append('X11')
+        # Finally, link with the X11 libraries
+        libs.append('X11')
 
         ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
                         define_macros=[('WITH_APPINIT', 1)] + defs,

[-- Attachment #5: python3-3.cygport --]
[-- Type: text/plain, Size: 2711 bytes --]

NAME="python3"
VERSION=3.3.2
RELEASE=3
CATEGORY="Python Interpreters"
SUMMARY="Py3K language interpreter"
DESCRIPTION="Python is an interpreted, interactive object-oriented
programming language suitable (amongst other uses) for distributed
application development, scripting, numeric computing and system
testing.  Python is often compared to Tcl, Perl, Java, JavaScript,
Visual Basic or Scheme."
HOMEPAGE="http://www.python.org/"
SRC_URI="http://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tar.xz"
SRC_DIR="Python-${VERSION}"
PATCH_URI="
	http://bugs.python.org/file31331/CVE-2013-4238-py32.patch
	3.3-dbm.patch
	3.1-enable-new-dtags.patch
	3.3-tkinter.patch
	3.0rc3-ctypes-util-find_library.patch
	3.1-PATH_MAX.patch
	3.1-ssl-threads.patch
	3.1-ncurses-abi6.patch
	3.2-export-PySignal_SetWakeupFd.patch
	3.2-cygwin-soname.patch
	3.2-distutils-shlibext.patch
	3.2-ctypes-libpython.patch
	3.3-pep3149.patch
	3.2-export-PyNode_SizeOf.patch
	3.2-thread-cygwin64.patch
        3.3-si_band.patch
"
#	3.0b3-ossaudio.patch
#	http://bugs.python.org/file31377/uuid.patch
#	3.2-format-parsetuple.patch

slot=${PV:0:3}
abi=${slot}m
pyrootdir=/usr/lib/python${slot}
pyconfdir=${pyrootdir}/config-${abi}
pydylddir=${pyrootdir}/lib-dynload

PKG_NAMES="${NAME} ${NAME}-test ${NAME}-tkinter idle3"
python3_CONTENTS="--exclude=idle3* --exclude=idlelib --exclude=_tkinter*.dll
                  --exclude=tkinter --exclude=test --exclude=tests
                  --exclude=turtle* usr/"
idle3_SUMMARY="Py3K Tkinter_based IDE"
idle3_CONTENTS="usr/bin/idle3* ${pyrootdir#/}/idlelib/"
python3_test_SUMMARY="Py3K tests"
python3_test_CONTENTS="${pyrootdir#/}/*/test*/ ${pyrootdir#/}/test/ ${pyrootdir#/}/turtledemo/"
python3_tkinter_SUMMARY="Py3K Tkinter GUI module"
python3_tkinter_REQUIRES="tcl-tix"
python3_tkinter_CONTENTS="--exclude=test ${pydylddir#/}/_tkinter*
                          ${pyrootdir#/}/tkinter/ ${pyrootdir#/}/turtle.py
                          ${pyrootdir#/}/__pycache__/turtle.*"

DIFF_EXCLUDES="plat-cygwin pyconfig.h.in"

NO_AUTOHEADER=1
CPPFLAGS+=" -I/usr/include/ncursesw"
CYGCONF_ARGS="
	--enable-shared
	--enable-ipv6
	--with-dbmliborder=gdbm
	--with-libc=
	--with-libm=
	--with-system-expat
	--with-system-ffi
	ac_cv_func_bind_textdomain_codeset=yes
"

src_install() {
	cd ${B}
	dodir /usr
	cygmake -j1 DESTDIR=${D} altinstall maninstall

	dosym python${abi}.exe /usr/bin/python3
	dosym python${abi}-config /usr/bin/python3-config
	dosym python-${slot}.pc /usr/lib/pkgconfig/python3.pc

	dosym ${pyconfdir#/usr/lib/}/libpython${abi}.dll.a /usr/lib/libpython${abi}.dll.a

	dosym idle${slot} /usr/bin/idle3
	dosym pydoc${slot} /usr/bin/pydoc3
	sed -i -e '1 s/\.exe//' ${D}/usr/bin/*${slot}
}

[-- Attachment #6: 3.3-si_band.patch --]
[-- Type: text/plain, Size: 1737 bytes --]

*** python3-3.3.2-3/src/Python-3.3.2/Modules/signalmodule.c.orig	2013-10-14 21:02:17.372115300 -0400
--- python3-3.3.2-3/src/Python-3.3.2/Modules/signalmodule.c	2013-10-14 21:03:05.506868400 -0400
***************
*** 709,722 ****
      {"si_pid",          "sending process ID"},
      {"si_uid",          "real user ID of sending process"},
      {"si_status",       "exit value or signal"},
-     {"si_band",         "band event for SIGPOLL"},
      {0}
  };
  
  PyDoc_STRVAR(struct_siginfo__doc__,
  "struct_siginfo: Result from sigwaitinfo or sigtimedwait.\n\n\
  This object may be accessed either as a tuple of\n\
! (si_signo, si_code, si_errno, si_pid, si_uid, si_status, si_band),\n\
  or via the attributes si_signo, si_code, and so on.");
  
  static PyStructSequence_Desc struct_siginfo_desc = {
--- 709,721 ----
      {"si_pid",          "sending process ID"},
      {"si_uid",          "real user ID of sending process"},
      {"si_status",       "exit value or signal"},
      {0}
  };
  
  PyDoc_STRVAR(struct_siginfo__doc__,
  "struct_siginfo: Result from sigwaitinfo or sigtimedwait.\n\n\
  This object may be accessed either as a tuple of\n\
! (si_signo, si_code, si_errno, si_pid, si_uid, si_status),\n\
  or via the attributes si_signo, si_code, and so on.");
  
  static PyStructSequence_Desc struct_siginfo_desc = {
***************
*** 742,748 ****
      PyStructSequence_SET_ITEM(result, 4, _PyLong_FromUid(si->si_uid));
      PyStructSequence_SET_ITEM(result, 5,
                                  PyLong_FromLong((long)(si->si_status)));
-     PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
      if (PyErr_Occurred()) {
          Py_DECREF(result);
          return NULL;
--- 741,746 ----


[-- Attachment #7: Type: text/plain, Size: 218 bytes --]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?]
  2013-10-15  1:10 ` Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?] Ryan Johnson
@ 2013-10-15  3:28   ` nu774
  2013-10-15 13:49     ` Ryan Johnson
  2013-10-31 18:28     ` Jason Tishler
  0 siblings, 2 replies; 9+ messages in thread
From: nu774 @ 2013-10-15  3:28 UTC (permalink / raw)
  To: cygwin

Installing libffi-devel will let python pick system libffi, so you can 
skip that libffi building part you are currently stuck.

(2013/10/15 10:10), Ryan Johnson wrote:
> "/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/command/build_ext.py",
> line 463, in build_extensions
>      self.build_extension(ext)
>    File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 279,
> in build_extension
>      if not self.configure_ctypes(ext):
>    File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 1807,
> in configure_ctypes
>      exec(f.read(), globals(), fficonfig)
>    File "<string>", line 33, in <module>
> KeyError: 'X86_WIN64'
> Makefile:505: recipe for target 'sharedmods' failed
>
> At this point I'm stuck... any advice from the gurus out there would be
> appreciated.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?]
  2013-10-15  3:28   ` nu774
@ 2013-10-15 13:49     ` Ryan Johnson
  2013-10-15 14:40       ` [Solved] " Ryan Johnson
  2013-10-31 18:28     ` Jason Tishler
  1 sibling, 1 reply; 9+ messages in thread
From: Ryan Johnson @ 2013-10-15 13:49 UTC (permalink / raw)
  To: cygwin

On 14/10/2013 11:28 PM, nu774 wrote:
> Installing libffi-devel will let python pick system libffi, so you can 
> skip that libffi building part you are currently stuck.
Thanks for the hint.

Everything compiles, and I was able to create a binary package (though 
the test target fails, see below).

Now to figure out how to make setup.exe see it...

Thanks,
Ryan

$  ./cygport --64 python3-3.3.cygport test
 >>> Testing python3-3.3.2-0
...
./python.exe 
/usr/src/python3-3.3.2-0/src/Python-3.3.2/Tools/scripts/run_tests.py
/usr/src/python3-3.3.2-0/build/python -W default -bb -E -R -m test -r -w 
-j 0 -u all,-largefile,-audio,-gui
Traceback (most recent call last):
   File 
"/usr/src/python3-3.3.2-0/src/Python-3.3.2/Tools/scripts/run_tests.py", 
line 51, in <module>
     main(sys.argv[1:])
   File 
"/usr/src/python3-3.3.2-0/src/Python-3.3.2/Tools/scripts/run_tests.py", 
line 47, in main
     os.execv(sys.executable, args)
PermissionError: [Errno 13] Permission denied
Makefile:875: recipe for target 'test' failed



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Solved] Re: Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?]
  2013-10-15 13:49     ` Ryan Johnson
@ 2013-10-15 14:40       ` Ryan Johnson
  2013-10-16  0:18         ` Jason Tishler
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan Johnson @ 2013-10-15 14:40 UTC (permalink / raw)
  To: cygwin

On 15/10/2013 9:49 AM, Ryan Johnson wrote:
> On 14/10/2013 11:28 PM, nu774 wrote:
>> Installing libffi-devel will let python pick system libffi, so you 
>> can skip that libffi building part you are currently stuck.
> Thanks for the hint.
>
> Everything compiles, and I was able to create a binary package (though 
> the test target fails, see below).
>
> Now to figure out how to make setup.exe see it...
OK, I got it installed. The procedure (inefficient but simple enough):
- copy the package files into my local package directory
- manually hack the corresponding setup.ini to point at the new files 
and their checksums
- run setup.exe to install from local directory

This isn't a permanent solution, because setup.ini gets clobbered every 
time I connect to a mirror, and setup will try to downgrade me back to 
the official python3 package.

Meanwhile, though, a cursory test suggests that everything is working:

$ python3
Python 3.3.2 (default, Oct 15 2013, 09:21:45)
[GCC 4.8.1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> 3+5
8
 >>> {1:3, 4:5}
{1: 3, 4: 5}

The cygport files and patches I sent before remain unchanged and would 
probably make a good starting point for the python3 maintainer's next 
release, though the si_band issue has yet to be worked out in a good way.

> Thanks,
> Ryan


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Solved] Re: Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?]
  2013-10-15 14:40       ` [Solved] " Ryan Johnson
@ 2013-10-16  0:18         ` Jason Tishler
  0 siblings, 0 replies; 9+ messages in thread
From: Jason Tishler @ 2013-10-16  0:18 UTC (permalink / raw)
  To: cygwin

Ryan,

On Tue, Oct 15, 2013 at 10:39:58AM -0400, Ryan Johnson wrote:
> The cygport files and patches I sent before remain unchanged and would
> probably make a good starting point for the python3 maintainer's next
> release, though the si_band issue has yet to be worked out in a good
> way.

I finally have a 64-bit Windows box.  I will begin the process of
producing 64-bit versions of my packages.  Thanks for the head start on
the python 3.3 package.

Jason

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?]
  2013-10-15  3:28   ` nu774
  2013-10-15 13:49     ` Ryan Johnson
@ 2013-10-31 18:28     ` Jason Tishler
  2013-10-31 18:54       ` Ryan Johnson
  1 sibling, 1 reply; 9+ messages in thread
From: Jason Tishler @ 2013-10-31 18:28 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 15, 2013 at 12:28:31PM +0900, nu774 wrote:
> Installing libffi-devel will let python pick system libffi, so you
> can skip that libffi building part you are currently stuck.
> 
> (2013/10/15 10:10), Ryan Johnson wrote:
> >"/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/command/build_ext.py",
> >line 463, in build_extensions
> >     self.build_extension(ext)
> >   File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 279,
> >in build_extension
> >     if not self.configure_ctypes(ext):
> >   File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 1807,
> >in configure_ctypes
> >     exec(f.read(), globals(), fficonfig)
> >   File "<string>", line 33, in <module>
> >KeyError: 'X86_WIN64'
> >Makefile:505: recipe for target 'sharedmods' failed
> >
> >At this point I'm stuck... any advice from the gurus out there would be
> >appreciated.

I get the same build failure with Python 2.7.5 and 3.2.5 under 64-bit
Cygwin even though I configure --with-system-ffi and have libffi-devel
installed.  I noticed that libffi-devel installs its headers in a
non-standard location:

$ cygcheck -l libffi-devel | fgrep .h
/usr/lib/libffi-3.0.13/include/ffi.h
/usr/lib/libffi-3.0.13/include/ffitarget.h

AFAICT, this prevents Python's build system from using the system
provided libffi and attempt to build its own causing an error like the
one above.

I can workaround the problem by creating symlinks to the libffi header
files in /usr/include:

$ ln -s /usr/lib/libffi-3.0.13/include/* /usr/include

It appears that others have successfully built Python under 64-bit
Cygwin without resorting to my workaround.  Does anyone know what I'm
missing?

Thanks,
Jason

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?]
  2013-10-31 18:28     ` Jason Tishler
@ 2013-10-31 18:54       ` Ryan Johnson
  2013-10-31 19:39         ` Jason Tishler
  0 siblings, 1 reply; 9+ messages in thread
From: Ryan Johnson @ 2013-10-31 18:54 UTC (permalink / raw)
  To: cygwin

On 31/10/2013 2:11 PM, Jason Tishler wrote:
> On Tue, Oct 15, 2013 at 12:28:31PM +0900, nu774 wrote:
>> Installing libffi-devel will let python pick system libffi, so you
>> can skip that libffi building part you are currently stuck.
>>
>> (2013/10/15 10:10), Ryan Johnson wrote:
>>> "/usr/src/python3-3.3.2-3/src/Python-3.3.2/Lib/distutils/command/build_ext.py",
>>> line 463, in build_extensions
>>>      self.build_extension(ext)
>>>    File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 279,
>>> in build_extension
>>>      if not self.configure_ctypes(ext):
>>>    File "/usr/src/python3-3.3.2-3/src/Python-3.3.2/setup.py", line 1807,
>>> in configure_ctypes
>>>      exec(f.read(), globals(), fficonfig)
>>>    File "<string>", line 33, in <module>
>>> KeyError: 'X86_WIN64'
>>> Makefile:505: recipe for target 'sharedmods' failed
>>>
>>> At this point I'm stuck... any advice from the gurus out there would be
>>> appreciated.
> I get the same build failure with Python 2.7.5 and 3.2.5 under 64-bit
> Cygwin even though I configure --with-system-ffi and have libffi-devel
> installed.  I noticed that libffi-devel installs its headers in a
> non-standard location:
>
> $ cygcheck -l libffi-devel | fgrep .h
> /usr/lib/libffi-3.0.13/include/ffi.h
> /usr/lib/libffi-3.0.13/include/ffitarget.h
>
> AFAICT, this prevents Python's build system from using the system
> provided libffi and attempt to build its own causing an error like the
> one above.
>
> I can workaround the problem by creating symlinks to the libffi header
> files in /usr/include:
>
> $ ln -s /usr/lib/libffi-3.0.13/include/* /usr/include
>
> It appears that others have successfully built Python under 64-bit
> Cygwin without resorting to my workaround.  Does anyone know what I'm
> missing?
Try installing pkg-config.

Ryan


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?]
  2013-10-31 18:54       ` Ryan Johnson
@ 2013-10-31 19:39         ` Jason Tishler
  0 siblings, 0 replies; 9+ messages in thread
From: Jason Tishler @ 2013-10-31 19:39 UTC (permalink / raw)
  To: cygwin

Ryan,

On Thu, Oct 31, 2013 at 02:44:49PM -0400, Ryan Johnson wrote:
> On 31/10/2013 2:11 PM, Jason Tishler wrote:
> >It appears that others have successfully built Python under 64-bit
> >Cygwin without resorting to my workaround.  Does anyone know what I'm
> >missing?
>
> Try installing pkg-config.

That worked.

Thanks,
Jason

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-31 19:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-14 14:17 Python 3.3 coming soon? Ryan Johnson
2013-10-15  1:10 ` Unable to compile python 3.3 [Was: Re: Python 3.3 coming soon?] Ryan Johnson
2013-10-15  3:28   ` nu774
2013-10-15 13:49     ` Ryan Johnson
2013-10-15 14:40       ` [Solved] " Ryan Johnson
2013-10-16  0:18         ` Jason Tishler
2013-10-31 18:28     ` Jason Tishler
2013-10-31 18:54       ` Ryan Johnson
2013-10-31 19:39         ` Jason Tishler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).