New submission from Prabhu Gurumurthy <pgur...@gmail.com>:

When manually building on OpenBSD 4.8 using gcc 4.2.1, I got the following 
error:

g++ -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes  -I. -IInclude 
-I/usr/home/pgurumur/temp/Python-3.1.2/Include -DTHREAD_STACK_SIZE=0x20000 
-fPIC -I/usr/include  -DPy_BUILD_CORE -o Modules/python.o 
/usr/home/pgurumur/temp/Python-3.1.2/Modules/python.ccc1plus: warning: command 
line option "-Wstrict-prototypes" is valid for C/ObjC but not for 
C++/usr/home/pgurumur/temp/Python-3.1.2/Modules/python.c: In function 'wchar_t* 
char2wchar(char*)':/usr/home/pgurumur/temp/Python-3.1.2/Modules/python.c:60: 
error: invalid conversion from 'void*' to 'wchar_t*'*** Error code 1

I changed line 60 from:
res = PyMem_Malloc(argsize*sizeof(wchar_t));

to:
res = (wchar_t *)PyMem_Malloc(argsize*sizeof(wchar_t));

I was able to compile it successfully, another thing you would notice is that, 
-Wstrict-prototypes is not a valid option with g++, (just a warning though)

My configure options:

 /usr/home/pgurumur/temp/Python-3.1.2/configure --with-fpectl --with-threads 
--srcdir=/usr/home/pgurumur/temp/Python-3.1.2 --enable-ipv6 --enable-shared 
--with-cxx_main --with-signal-module --prefix=/opt/local

----------
components: Build
messages: 120714
nosy: pgurumur
priority: normal
severity: normal
status: open
title: Error in Module/python.c when building on OpenBSD 4.8
versions: Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10349>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to