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.

classification
Title: module _socket failed to build on OpenBSD
Type: Stage: resolved
Components: Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: python-dev, rpointel, vstinner
Priority: normal Keywords: patch

Created on 2011-08-23 08:54 by rpointel, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
socketmodule_build_openbsd.diff rpointel, 2011-08-23 08:54 diff to include <sys/uio.h> for OpenBSD to build _socket
socketmodule_build_error_openbsd.log rpointel, 2011-08-23 08:55 details of errors in building _socket on OpenBSD
Messages (3)
msg142799 - (view) Author: Remi Pointel (rpointel) * Date: 2011-08-23 08:54
Hello,
I try to build Python 3.3 on OpenBSD, and it failed to build these modules: _socket (so _ssl too).

Errors are:
/home/remi/dev/cpython_test/Modules/socketmodule.c: In function 'sock_recvmsg':
/home/remi/dev/cpython_test/Modules/socketmodule.c:2935: error: storage size of 'iov' isn't known
/home/remi/dev/cpython_test/Modules/socketmodule.c:2935: warning: unused variable 'iov'
/home/remi/dev/cpython_test/Modules/socketmodule.c: In function 'sock_recvmsg_into':
/home/remi/dev/cpython_test/Modules/socketmodule.c:3023: error: invalid application of 'sizeof' to incomplete type 'struct iovec' 
/home/remi/dev/cpython_test/Modules/socketmodule.c:3023: warning: division by zero
/home/remi/dev/cpython_test/Modules/socketmodule.c:3023: error: invalid application of 'sizeof' to incomplete type 'struct iovec' 
/home/remi/dev/cpython_test/Modules/socketmodule.c:3034: error: invalid use of undefined type 'struct iovec'
/home/remi/dev/cpython_test/Modules/socketmodule.c:3034: error: dereferencing pointer to incomplete type
/home/remi/dev/cpython_test/Modules/socketmodule.c:3035: error: invalid use of undefined type 'struct iovec'
/home/remi/dev/cpython_test/Modules/socketmodule.c:3035: error: dereferencing pointer to incomplete type
/home/remi/dev/cpython_test/Modules/socketmodule.c: In function 'sock_sendmsg':
/home/remi/dev/cpython_test/Modules/socketmodule.c:3332: error: invalid application of 'sizeof' to incomplete type 'struct iovec' 
/home/remi/dev/cpython_test/Modules/socketmodule.c:3332: warning: division by zero
/home/remi/dev/cpython_test/Modules/socketmodule.c:3332: error: invalid application of 'sizeof' to incomplete type 'struct iovec' 
/home/remi/dev/cpython_test/Modules/socketmodule.c:3343: error: invalid use of undefined type 'struct iovec'
/home/remi/dev/cpython_test/Modules/socketmodule.c:3343: error: dereferencing pointer to incomplete type
/home/remi/dev/cpython_test/Modules/socketmodule.c:3344: error: invalid use of undefined type 'struct iovec'
/home/remi/dev/cpython_test/Modules/socketmodule.c:3344: error: dereferencing pointer to incomplete type
*** WARNING: renaming "_ssl" since importing it failed: No module named '_socket'

If I add a #include <sys/uio.h>, these 2 modules correcly build.

Attached file are:
-the diff
-the details of errors.

Thanks,
Remi.
msg142800 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-08-23 08:57
New changeset b4b84e87dc6b by Victor Stinner in branch 'default':
Close #12826: fix socketmodule.c for OpenBSD, include sys/uio.h
http://hg.python.org/cpython/rev/b4b84e87dc6b
msg142801 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-08-23 08:59
It's surprising that it works on FreeBSD but not on OpenBSD. Thanks for your patch.
History
Date User Action Args
2022-04-11 14:57:21adminsetgithub: 57035
2011-08-23 08:59:03vstinnersetnosy: + vstinner
messages: + msg142801
2011-08-23 08:57:50python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg142800

resolution: fixed
stage: resolved
2011-08-23 08:55:31rpointelsetfiles: + socketmodule_build_error_openbsd.log
2011-08-23 08:54:48rpointelcreate