classification
Title: ctypes compilation fails on FreeBSD: Undefined symbol "ffi_call_win32"
Type: compile error Stage:
Components: ctypes Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol "ffi_call_win32"
View: 23042
Assigned To: Nosy List: Arfrever, Dmitry.Sivachenko, koobs, pitrou, vstinner
Priority: normal Keywords: buildbot

Created on 2014-09-30 11:15 by vstinner, last changed 2015-03-18 14:08 by vstinner. This issue is now closed.

Messages (6)
msg227878 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-09-30 11:15
On buildbots FreeBSD 6.4 and 7.2, the compilation of the ctypes module fails because the function "ffi_call_win32" is missing. I don't understand why a "win32" function would be needed on FreeBSD!?

http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x/builds/5618/steps/test/logs/stdio

http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x/builds/5060/steps/compile/logs/stdio

*** WARNING: renaming "_ctypes" since importing it failed: build/lib.freebsd-6.4-RELEASE-i386-3.5-pydebug/_ctypes.so: Undefined symbol "ffi_call_win32"
msg227880 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-09-30 11:17
> I don't understand why a "win32" function would be needed on FreeBSD!?

I see the function defined in libffi, but I don't see it used in the ctypes module.

Note: the system libffi is not used, these buildbots compile the embedded version of libffi: "checking for --with-system-ffi... no" in configure logs.
msg227886 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-09-30 12:23
Those FreeBSD versions are totally obsolete, perhaps we should simply ignore any failures on them.
msg230448 - (view) Author: Dmitry Sivachenko (Dmitry.Sivachenko) Date: 2014-11-01 14:25
On modern FreeBSD version (10/stable) on i386 arch it fails with the following error:
build/temp.freebsd-10.0-RELEASE-p10-i386-3.4/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.o: In function `.LBB4_4':
/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.c:(.text+0x661): undefined reference to `ffi_closure_THISCALL'
build/temp.freebsd-10.0-RELEASE-p10-i386-3.4/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.o: In function `.LBB4_3':
/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.c:(.text+0x673): undefined reference to `ffi_closure_FASTCALL'
build/temp.freebsd-10.0-RELEASE-p10-i386-3.4/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.o: In function `.LBB4_5':
/usr/ports/lang/python34/work/Python-3.4.2/Modules/_ctypes/libffi/src/x86/ffi.c:(.text+0x685): undefined reference to `ffi_closure_STDCALL'
/usr/bin/ld: build/lib.freebsd-10.0-RELEASE-p10-i386-3.4/_ctypes.so: hidden symbol `ffi_closure_FASTCALL' isn't defined

There is no such a problem on amd64.

--with-system-ffi it works fine (system libffi is the same version: 3.0.13)
msg238442 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-03-18 13:44
FreeBSD 6.4 buildbot is broken (hg update fails), FreeBSD 7.2 is offline. I close the issue.
msg238445 - (view) Author: Kubilay Kocak (koobs) (Python triager) Date: 2015-03-18 13:55
FWIW, see #23042
History
Date User Action Args
2015-03-18 14:08:17vstinnersetsuperseder: ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol "ffi_call_win32"
resolution: out of date -> duplicate
2015-03-18 13:55:39koobssetmessages: + msg238445
2015-03-18 13:44:08vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg238442
2014-11-01 14:25:27Dmitry.Sivachenkosetnosy: + Dmitry.Sivachenko
messages: + msg230448
2014-10-15 00:05:34Arfreversetnosy: + Arfrever
2014-09-30 12:23:12pitrousetnosy: + pitrou
messages: + msg227886
2014-09-30 11:17:54vstinnersetmessages: + msg227880
2014-09-30 11:15:15vstinnersetkeywords: + buildbot
components: + ctypes
2014-09-30 11:15:10vstinnercreate