| Issue 105: | Installation on Mac OSX 10.6 (snow leopard) and MacPorts Python 2.4 | |
| 4 people starred this issue and may be notified of changes. | Back to list |
Hi, I got a compilation issue on the above mentioned platform. See the attached installation log. Regards and many thanks for your support. -- Gilles Lenfant
Jun 25, 2010
#1
gilles.l...@gmail.com
Sep 4, 2010
If possible, can you test this with the v2unicode branch? Most of the Linux & OS/X issues were due to incorrect handling of UCS4 which I've corrected on that branch. As soon as I'm sure it has been tested enough, it will become 2.1.8.
Status:
Investigating
Sep 6, 2010
Can you test this with 2.1.8? Thanks.
Sep 8, 2010
Sorry to answer late (coming back from vacations). I tried again and got this with 2.1.8 (other errors). The full console log is in attachment of this comment. Thank you again for your support.
Sep 8, 2010
OK, it looks like Python 4 is not using "const char*" where it should. Most of the time a string literal is used which results in the warning "deprecated conversion from string constant to ‘char*’" and the compiler performs the cast for us. However, the one time I pass a "const char*" variable, the compiler won't (and shouldn't), so there is an error. My first question is, is Python 2.4 the version that comes with OS/X? I do support 2.4, but am wondering how common this will be. Second, I'll make the appropriate cast to "char*" on that line and make 2.1.9. I guess I'll have to buy a Mac :)
Labels:
OpSys-OSX
Sep 8, 2010
What a fast answer... ;) I'm familiar with this deprecation warning that does not prevent having C extensions that work on Mac. The real errors are stated in lines 226 and 227 of my last attachment. <quoting> .../pyodbc-2.1.8/src/pyodbcmodule.cpp:919: error: invalid conversion from ‘const char*’ to ‘char*’ .../pyodbc-2.1.8/src/pyodbcmodule.cpp:919: error: initializing argument 3 of ‘int PyModule_AddStringConstant(PyObject*, char*, char*)’ </quoting> I'm using Python 2.4 installed with MacPorts that works perfectly with lots of complex Python apps (Zope, ...) and C based eggs (python-ldap, lxml, ...) http://trac.macports.org/browser/trunk/dports/lang/python24 The default compiler is gcc-4.2. If you need more investigation I could give you an ssh access to my macbook.
Sep 29, 2010
FYI: I am building for CentOS 5.4 and I get the same error in pyodbcmodule.cpp at line 919. OS: CentOS 5.4 Python: 2.4.3 gcc: 4.1.2 Thanks.
Nov 14, 2010
Same here, it fails to compile with: Python 2.4.3 CentOS release 5.5 (Final) gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) I compiled a newer Python and it worked: Python 2.6.6
Nov 21, 2010
Fixed in 2.1.9-beta06
Status:
Complete
Mar 20, 2011
May I ask to release such version, 2.1.9? I'm using 2.4 with older version of zope. I fixed the bug manually in 2.1.8, but it would be convenient to have an official package. |