View previous topic :: View next topic |
Author |
Message |
nero37 Tux's lil' helper
Joined: 15 Jun 2007 Posts: 141 Location: Ireland
|
Posted: Sat Nov 27, 2010 1:38 am Post subject: [Solved] Python fails to build modules socket and ssl |
|
|
While rebuilding all the packages on my system after some filesystem corruptions, python-2.6.5-r3 and 3.1.2-r4 fail to build with the following error:
Code: | Failed to find the necessary bits to build these modules:
_tkinter bsddb185 dl
imageop sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_socket _ssl
running build_scripts
creating build/scripts-2.6
copying and adjusting /var/tmp/portage/dev-lang/python-2.6.5-r3/work/Python-2.6.5/Tools/scripts/pydoc -> build/scripts-2.6
copying and adjusting /var/tmp/portage/dev-lang/python-2.6.5-r3/work/Python-2.6.5/Tools/scripts/idle -> build/scripts-2.6
copying and adjusting /var/tmp/portage/dev-lang/python-2.6.5-r3/work/Python-2.6.5/Tools/scripts/2to3 -> build/scripts-2.6
copying and adjusting /var/tmp/portage/dev-lang/python-2.6.5-r3/work/Python-2.6.5/Lib/smtpd.py -> build/scripts-2.6
changing mode of build/scripts-2.6/pydoc from 644 to 755
changing mode of build/scripts-2.6/idle from 644 to 755
changing mode of build/scripts-2.6/2to3 from 644 to 755
changing mode of build/scripts-2.6/smtpd.py from 644 to 755
make: *** [sharedmods] Error 1
|
I have tried rebuilding its immediate dependencies and it still fails to build. Anyone got any ideas?
Output from "emerge --info =dev-lang/python-2.6.5-r3": here
Full build log: here
Thanks _________________ Hydrogen is a light, odorless gas, which, given enough time, turns into people.
Last edited by nero37 on Sat Nov 27, 2010 2:57 am; edited 1 time in total |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21431
|
Posted: Sat Nov 27, 2010 1:51 am Post subject: |
|
|
build.log: | 823. /usr/include/bluetooth/hci.h:26:1: error: unterminated #ifndef | This header is corrupt or a broken version has been installed. Remove or reinstall it and try again. |
|
Back to top |
|
|
nero37 Tux's lil' helper
Joined: 15 Jun 2007 Posts: 141 Location: Ireland
|
Posted: Sat Nov 27, 2010 2:56 am Post subject: |
|
|
Reinstalled bluez (and its corrupted dependencies) and python is compiling fine now. Thanks _________________ Hydrogen is a light, odorless gas, which, given enough time, turns into people. |
|
Back to top |
|
|
siulian n00b
Joined: 23 Jan 2014 Posts: 3 Location: Bucharest/Romania
|
Posted: Thu Jan 23, 2014 8:31 pm Post subject: |
|
|
I will post here because this topic is very good referenced by google.(even if it's from 2010)
So, if you have old kernel or/and old gentoo and you want to install new portage you will have a dependency also new python(in my case it was python-3.3.2-r2)
If you receive an error telling you that something is wrong with _socket _ssl and the errors are :
Code: |
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c: In function âmakesockaddrâ:
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1236: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1237: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1244: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c: In function âgetsockaddrargâ:
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1660: error: âCAN_RAWâ undeclared (first use in this function)
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1660: error: (Each undeclared identifier is reported only once
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1660: error: for each function it appears in.)
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1691: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1692: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1694: error: dereferencing pointer to incomplete type
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c: In function âgetsockaddrlenâ:
/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Modules/socketmodule.c:1864: error: invalid application of âsizeofâ to incomplete type âstruct sockaddr_canâ
|
Then you need to apply the fallowing patch
Code: |
diff -r b3c2472c12a1 Modules/socketmodule.c
--- a/Modules/socketmodule.c Wed Jan 22 22:24:46 2014 +1000
+++ b/Modules/socketmodule.c Thu Jan 23 19:53:23 2014 +0100
@@ -1226,7 +1226,7 @@
}
#endif
-#ifdef AF_CAN
+#ifdef HAVE_LINUX_CAN_H
case AF_CAN:
{
struct sockaddr_can *a = (struct sockaddr_can *)addr;
@@ -1654,7 +1654,7 @@
}
#endif
-#ifdef AF_CAN
+#ifdef HAVE_LINUX_CAN_H
case AF_CAN:
switch (s->sock_proto) {
case CAN_RAW:
@@ -1859,7 +1859,7 @@
}
#endif
-#ifdef AF_CAN
+#ifdef HAVE_LINUX_CAN_H
case AF_CAN:
{
*len_ret = sizeof (struct sockaddr_can);
|
More about this patch you can find here: http://bugs.python.org/issue20065
In order to apply the patch you:
1) download the patch from : http://bugs.python.org/file33664/af_can_define.diff
2) Modify the ebuild by adding something like : epatch "${FILESDIR}/af_can_define.patch" after all the patches
3) And recreate the digest : ebuild python-3.3.2-r2.ebuild digest
I hope that will save a lot of time for people that are stuck with this error. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|