Message75227
Attached patch fixes build problem of math and mmap.
Apparently, FreeBSD 4 does not make some math functions available when
_XOPEN_SOURCE is defined and unlike newer FreeBSD, it cannot be fixed
with __BSD_VISIBLE macro.
As for readline, it just because
FreeBSD's readline does not have erl_compentry_func_t and Python 2.6
started to use it. When I cp Python-2.5.2/Modules/readline.c
Python-2.6/Modules/readline.c, it built successfully.
Probably this is not a good fix. I would be glad if someone suggests me
a better one.
Lastly, multiprocessing.
First I needed a patch like this to get rid of the warnings.
"""
--- Modules/_multiprocessing/multiprocessing.h.orig Tue Oct 14
14:43:01 2008
+++ Modules/_multiprocessing/multiprocessing.h Tue Oct 14 14:48:59 2008
@@ -20,7 +20,10 @@
# define SEM_VALUE_MAX LONG_MAX
#else
# include <fcntl.h> /* O_CREAT and O_EXCL */
+# include <netinet/in.h>
# include <sys/socket.h>
+# include <arpa/inet.h>
+# include <sys/uio.h>
# include <arpa/inet.h> /* htonl() and ntohl() */
# if HAVE_SEM_OPEN
# include <semaphore.h>
"""
With this patch applied, I tried the build again and got the following
error.
"""
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
building '_multiprocessing' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1
-DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I.
-I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include
-I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include
-I/usr/home/build/dev/Python-2.6 -c
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c -o
build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.o
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1
-DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I.
-I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include
-I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include
-I/usr/home/build/dev/Python-2.6 -c
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.c
-o
build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.o
In file included from
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.c:190:
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h: In
function `connection_new':
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h:51:
warning: unknown conversion type character `z' in format
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h: In
function `connection_repr':
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h:401: warning:
unknown conversion type character `z' in format
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1
-DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I.
-I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include
-I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include
-I/usr/home/build/dev/Python-2.6 -c
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.c -o
build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.o
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.c: In
function `semlock_acquire':
/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.c:314:
warning: implicit declaration of function `sem_timedwait'
gcc -shared
build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.o
build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.o
build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.o
-L/usr/local/lib -o
build/lib.freebsd-4.11-RELEASE-i386-2.6/_multiprocessing.so
*** WARNING: renaming "_multiprocessing" since importing it failed:
build/lib.freebsd-4.11-RELEASE-i386-2.6/_multiprocessing.so: Undefined
symbol "sem_timedwait"
"""
Yes, sem_timedwait is not supported on FreeBSD 4.
I would like to find the replacement for that,
but I'm not sure how I could solve this at this time. |
|
Date |
User |
Action |
Args |
2008-10-26 14:20:39 | akitada | set | recipients:
+ akitada, loewis |
2008-10-26 14:20:39 | akitada | set | messageid: <1225030839.09.0.33618530808.issue4204@psf.upfronthosting.co.za> |
2008-10-26 14:20:38 | akitada | link | issue4204 messages |
2008-10-26 14:20:36 | akitada | create | |
|