[issue23042] Python 2.7.9 ctypes module doesn't build on FreeBSD x86

2015-03-13 Thread Danya Alexeyevsky

Danya Alexeyevsky added the comment:

Faced the same problem on FreeBSD.

I confirm: applying the reversed patch fixed it.

Thanks!

--
nosy: +Danya.Alexeyevsky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23042] Python 2.7.9 ctypes module doesn't build on FreeBSD x86

2015-01-01 Thread koobs

koobs added the comment:

@lemburg, does reverting this patch fix the regression for you?

--
nosy: +koobs
type:  -> compile error

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23042] Python 2.7.9 ctypes module doesn't build on FreeBSD x86

2014-12-18 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23042] Python 2.7.9 ctypes module doesn't build on FreeBSD x86

2014-12-12 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

The cause seems to be these changes of the file (diff between the 2.7.8 and 
2.7.9 version):

@@ -368,14 +374,21 @@ void ffi_call(ffi_cif *cif, void (*fn)(v
 #ifdef X86_WIN64
 case FFI_WIN64:
   ffi_call_win64(ffi_prep_args, &ecif, cif->bytes,
  cif->flags, ecif.rvalue, fn);
   break;
-#elif defined(X86_WIN32)
+#else
+#ifndef X86_WIN32
+case FFI_SYSV:
+  ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
+fn);
+  break;
+#else
 case FFI_SYSV:
-case FFI_STDCALL:
 case FFI_MS_CDECL:
+#endif
+case FFI_STDCALL:
   ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
 ecif.rvalue, fn);
   break;
 case FFI_THISCALL:
 case FFI_FASTCALL:
@@ -404,15 +417,10 @@ void ffi_call(ffi_cif *cif, void (*fn)(v
  abi = FFI_STDCALL;
 ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
   }
   break;
-#else
-case FFI_SYSV:
-  ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
-fn);
-  break;
 #endif
 default:
   FFI_ASSERT(0);
   break;
 }
@@ -785,14 +797,21 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(vo
 ecif.rvalue = rvalue;


   switch (cif->abi)
 {
-#ifdef X86_WIN32
+#ifndef X86_WIN32
+case FFI_SYSV:
+  ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
+ecif.rvalue, fn);
+  break;
+#else
 case FFI_SYSV:
-case FFI_STDCALL:
 case FFI_MS_CDECL:
+#endif
+#ifndef X86_WIN64
+case FFI_STDCALL:
   ffi_call_win32(ffi_prep_args_raw, &ecif, cif->abi, cif->bytes, 
cif->flags,
 ecif.rvalue, fn);
   break;
 case FFI_THISCALL:
 case FFI_FASTCALL:
@@ -821,15 +840,10 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(vo
  cif->abi = abi = FFI_STDCALL;
 ffi_call_win32(ffi_prep_args_raw, &ecif, abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
   }
   break;
-#else
-case FFI_SYSV:
-  ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
-ecif.rvalue, fn);
-  break;
 #endif
 default:
   FFI_ASSERT(0);
   break;
 }

If neither X86_WIN64 nor X86_WIN32 are defined, the #ifndefs cause the 
functions calls to be compiled in.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23042] Python 2.7.9 ctypes module doesn't build on FreeBSD x86

2014-12-12 Thread Marc-Andre Lemburg

New submission from Marc-Andre Lemburg:

With Python 2.7.8, ctypes builds fine on FreeBSD x86, but with Python 2.7.9, 
the build fails with:

*** WARNING: renaming "_ctypes" since importing it failed: 
build/lib.freebsd-8.3-RELEASE-p3-i386-2.7/_ctypes.so: Undefined symbol 
"ffi_call_win32"

Since this is FreeBSD, there shouldn't really be any calls to ffi_call_win32() 
in the _ctypes module or libffi.

Looking at the code changes in libffi/src/x86/ffi.c, it looks as if some of the 
#ifdefs for X86_WIN64 and X86_WIN32 were mixed up, causing calls to the Windows 
function to be compiled on FreeBSD x86, without also compiling the function 
definition in the same file.

--
components: Build, ctypes
messages: 232574
nosy: lemburg
priority: normal
severity: normal
status: open
title: Python 2.7.9 ctypes module doesn't build on FreeBSD x86
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com