[issue10349] Error in Module/python.c when building on OpenBSD 4.8

2010-11-07 Thread Prabhu Gurumurthy

New submission from Prabhu Gurumurthy :

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=0x2 
-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 
<http://bugs.python.org/issue10349>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10349] Error in Module/python.c when building on OpenBSD 4.8

2010-11-08 Thread Prabhu Gurumurthy

Prabhu Gurumurthy  added the comment:

I was building it just the way python2.x is being built, should I try it 
without cxx-main? But, does it solve the actual problem?

--

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



[issue10349] Error in Module/python.c when building on OpenBSD 4.8

2010-11-08 Thread Prabhu Gurumurthy

Prabhu Gurumurthy  added the comment:

You may be correct, (since I have not tested it), but isn't the error that gcc 
complains about, an issue? a minor one I am sure.  I have gotten around it by 
just updating the file. Correct me if I am wrong here please, --with-cxx_main 
is not a supported option for compiling in OpenBSD? Ill test it without 
cxx_main option tonight.

Thanks!

--

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



[issue10349] Error in Module/python.c when building on OpenBSD 4.8

2010-11-08 Thread Prabhu Gurumurthy

Prabhu Gurumurthy  added the comment:

I understand, Ill run it without cxx_main option tonight.

--

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



[issue10349] Error in Module/python.c when building on OpenBSD 4.8

2010-11-08 Thread Prabhu Gurumurthy

Prabhu Gurumurthy  added the comment:

I ran the build "without" cxx_main, I did _not_ see the same error.

--

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