[egenix-users] problem building egenix-mx-commercial-2.0.6

Joseph Kocherhans Joseph.Kocherhans at hsc.utah.edu
Mon Jul 26 14:13:34 CEST 2004


Thank You! The build seems to work now.

>>> "M.-A. Lemburg" <mal at egenix.com> 7/26/2004 10:51:03 AM >>>
Charlie Clark wrote:
> On 2004-07-12 at 21:27:21 [+0200], M.-A. Lemburg <mal at egenix.com>
wrote:
> 
>>Joseph Kocherhans wrote:
>>
>>>I get the following error when trying to run 'python setup.py build'
for 
>>>egenix-mx-commercial-2.0.6
>>>VS 6 sp5 on Winxp with python 2.3.4 installed from the windows
installer.
>>>Anyone see an obvious problem here?
>>
>>Why don't you use the prebuilt binary installer ?
> 
> 
> It seems you haven't replied taking into account his *initial* mail
from June.

The problem is that some compiler support code was removed
in Python 2.3. As a result, the VC++ compiler barfs at the
static arrays which don't define the number of elements explicitly
(the assumption that computers can count sometimes leads to
strange results).

Here's what you have to add to all occurrances of mx.h in the
egenix-mx-base and -commercial packages:

...
/* Include Python backward compatibility stuff */
#include "mxpyapi.h"

/* --- Compiler support
--------------------------------------------------- */

/* Support for compilers which don't like static forward declarations
    of arrays; Python 2.3 removed the support for BAD_STATIC_FORWARD
    which is why we now use our own little helpers here. */
#undef staticforward
#undef statichere
#ifdef BAD_STATIC_FORWARD
# define staticforward extern
# define statichere static
#else
# define staticforward static
# define statichere static
#endif

/* --- Declare macros
----------------------------------------------------- */
...

> Charlie
>  
> 
>>>Thanks,
>>>Joseph
>>>
>>>*-----------------------------------------------------
>>>running build
>>>running mx_autoconf
>>>C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo
/Ox 
>>>/MD /W3/GX /DNDEBUG /O2 /Gf /GB /GD /Ob2 -D_GNU_SOURCE=1 
>>>-IC:\Python23\include /Tc_configtest.c /Fo_configtest.obj
>>>_configtest.c
>>>_configtest.c(4) : error C2065: 'strptime' : undeclared identifier
>>>failure.
>>>removing: _configtest.c _configtest.obj
>>>C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo
/Ox 
>>>/MD /W3/GX /DNDEBUG /O2 /Gf /GB /GD /Ob2 -D_GNU_SOURCE=1 
>>>-IC:\Python23\include /Tc_configtest.c /Fo_configtest.obj
>>>_configtest.c
>>>_configtest.c(4) : error C2065: 'timegm' : undeclared identifier
>>>failure.
>>>removing: _configtest.c _configtest.obj
>>>C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo
/Ox 
>>>/MD /W3/GX /DNDEBUG /O2 /Gf /GB /GD /Ob2 -D_GNU_SOURCE=1 
>>>-IC:\Python23\include -IC:\Python23\include /Tc_configtest.c 
>>>/Fo_configtest.obj
>>>_configtest.c
>>>_configtest.c(5) : error C2133: 'mxarray' : unknown size
>>>failure.
>>>removing: _configtest.c _configtest.obj
>>>running build_ext
>>>building 'mx.ODBC.Windows.mxODBC' extension
>>>C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo
/Ox 
>>>/MD /W3/GX /DNDEBUG /O2 /Gf /GB /GD /Ob2 -DMS_ODBC_MANAGER 
>>>-DBAD_STATIC_FORWARD=1 -UHAVE_STRPTIME -UHAVE_TIMEGM
-Imx/ODBC/Windows 
>>>-IC:\Python23\include -IC:\Python23\PC /Tpmx/ODBC/Windows/mxODBC.cpp

>>>/Fobuild\temp.win32-2.3\Release\mx\ODBC\Windows\mxODBC\mx/ODBC/Windows/mxO
>>>DBC.obj
>>>mxODBC.cpp
>>>mx/ODBC/Windows/mxODBC.cpp(593) : error C2133: 'mxODBCursor_Methods'
: 
>>>unknown size
>>>mx/ODBC/Windows/mxODBC.cpp(5799) : error C2086:
'mxODBCursor_Methods' : 
>>>redefinition
>>>mx/ODBC/Windows/mxODBC.cpp(5870) : error C2133: 'mxODBC_Methods' : 
>>>unknown size
>>>mx/ODBC/Windows/mxODBC.cpp(6528) : error C2086: 'mxODBC_Methods' : 
>>>redefinition
>>>error: command '"C:\Program Files\Microsoft Visual 
>>>Studio\VC98\BIN\cl.exe"' failed with exit status 2
>>>
>>>
>>>
>>>_______________________________________________________________________
>>>eGenix.com User Mailing List                    
http://www.egenix.com/ 
>>>http://lists.egenix.com/mailman/listinfo/egenix-users 
>>>
>>>
>>>
------------------------------------------------------------------------
>>>
>>> Subject:
>>> Re: [egenix-users] problem building egenix-mx-commercial-2.0.6
>>> From:
>>> "Joseph Kocherhans" <Joseph.Kocherhans at hsc.utah.edu>
>>> Date:
>>> Mon, 12 Jul 2004 13:29:55 -0600
>>> To:
>>> <mal at egenix.com>
>>>
>>> To:
>>> <mal at egenix.com>
>>> CC:
>>> egenix-users at lists.egenix.com 
>>>
>>> Return-Path:
>>> <egenix-users-bounces at lists.egenix.com>
>>> X-Original-To:
>>> charlie at core.nexon.de 
>>> Delivered-To:
>>> charlie at core.nexon.de 
>>> Received:
>>> by mail.nexon.de (Postfix, from userid 1113) id 6636F124E3FF; Mon,
12 
>>> Jul 2004 21:30:25 +0200 (CEST)
>>> Received:
>>> from mail.egenix.com (ns.egenix.com [217.115.138.139]) by 
>>> mail.nexon.de (Postfix) with ESMTP id 49ED9124E38D for 
>>> <charlie at begeistert.org>; Mon, 12 Jul 2004 21:30:24 +0200 (CEST)
>>> Received:
>>> from www.egenix.com (localhost [IPv6:::1]) by mail.egenix.com 
>>> (Postfix) with ESMTP id 2416233D71; Mon, 12 Jul 2004 21:30:23 +0200

>>> (CEST)
>>> Received:
>>> (from spambayes at localhost)i6CJULA21589 for 
>>> egenix-users at lists.egenix.com; Mon, 12 Jul 2004 21:30:21 +0200
>>> Received:
>>> (from nobody at localhost)i6CJUL721581 for spambayes; Mon, 12 Jul 2004

>>> 21:30:21 +0200
>>> X-Original-To:
>>> egenix-users at lists.egenix.com 
>>> Delivered-To:
>>> egenix-users at lists.egenix.com 
>>> Received:
>>> from zix1.med.utah.edu (zix1.med.utah.edu [155.100.238.42]) by 
>>> mail.egenix.com (Postfix) with ESMTP id 8DBA633D64 for 
>>> <egenix-users at lists.egenix.com>; Mon, 12 Jul 2004 21:30:20 +0200
(CEST)
>>> Received:
>>> from zix1.med.utah.edu (ZixVPM [127.0.0.1]) by
Outbound.med.utah.edu 
>>> (Proprietary) with ESMTP id 272741A40CD for 
>>> <egenix-users at lists.egenix.com>; Mon, 12 Jul 2004 13:45:38 -0600
(MDT)
>>> Received:
>>> from gwdom2-med.med.utah.edu (gwdom2-med.med.utah.edu 
>>> [155.100.100.43]) by zix1.med.utah.edu (Proprietary) with ESMTP id

>>> D2FC01A0058 for <egenix-users at lists.egenix.com>; Mon, 12 Jul 2004 
>>> 13:45:36 -0600 (MDT)
>>> Received:
>>> from GWY-MTA by gwdom2-med.med.utah.edu with Novell_GroupWise; Mon,

>>> 12 Jul 2004 13:30:08 -0600
>>> Message-ID:
>>> <s0f29260.093 at gwdom2-med.med.utah.edu>
>>> X-Mailer:
>>> Novell GroupWise Internet Agent 6.5.2 Beta
>>> MIME-Version:
>>> 1.0
>>> Content-Type:
>>> text/plain; charset=US-ASCII
>>> Content-Transfer-Encoding:
>>> 7bit
>>> Content-Disposition:
>>> inline
>>> X-Spambayes-Classification:
>>> ham; 0.00
>>> X-BeenThere:
>>> egenix-users at lists.egenix.com 
>>> X-Mailman-Version:
>>> 2.1
>>> Precedence:
>>> list
>>> List-Id:
>>> eGenix.com User Mailinglist <egenix-users.lists.egenix.com>
>>> List-Unsubscribe:
>>> <http://lists.egenix.com/mailman/listinfo/egenix-users>, 
>>> <mailto:egenix-users-request at lists.egenix.com?subject=unsubscribe>
>>> List-Archive:
>>> </mailman-archives/egenix-users>
>>> List-Post:
>>> <mailto:egenix-users at lists.egenix.com>
>>> List-Help:
>>> <mailto:egenix-users-request at lists.egenix.com?subject=help>
>>> List-Subscribe:
>>> <http://lists.egenix.com/mailman/listinfo/egenix-users>, 
>>> <mailto:egenix-users-request at lists.egenix.com?subject=subscribe>
>>> Sender:
>>> egenix-users-bounces at lists.egenix.com 
>>> Errors-To:
>>> egenix-users-bounces at lists.egenix.com 
>>> X-Spam-Checker-Version:
>>> SpamAssassin 2.63 (2004-01-11) on mail.nexon.de
>>> X-Spam-Status:
>>> No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham
version=2.63
>>>
>>>
>>>*Sigh* I knew that question was coming and I should have put in the
>>>original email :) I want to build it with support for longer column
>>>names as per your email on this list a few weeks ago.
>>>
>>>
>>>>>>"M.-A. Lemburg" <mal at egenix.com> 7/12/2004 1:27:21 PM >>>
>>>
>>>Joseph Kocherhans wrote:
>>>
>>>>I get the following error when trying to run 'python setup.py
build'
>>>
>>>for egenix-mx-commercial-2.0.6
>>>
>>>>VS 6 sp5 on Winxp with python 2.3.4 installed from the windows
>>>
>>>installer.
>>>
>>>>Anyone see an obvious problem here?
>>>
>>>
>>>Why don't you use the prebuilt binary installer ?
>>>
>>>
>>>>Thanks,
>>>>Joseph
>>>>
>>>>*-----------------------------------------------------
>>>>running build
>>>>running mx_autoconf
>>>>C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c
/nologo
>>>
>>>/Ox /MD /W3/GX /DNDEBUG /O2 /Gf /GB /GD /Ob2 -D_GNU_SOURCE=1
>>>-IC:\Python23\include /Tc_configtest.c /Fo_configtest.obj
>>>
>>>>_configtest.c
>>>>_configtest.c(4) : error C2065: 'strptime' : undeclared identifier
>>>>failure.
>>>>removing: _configtest.c _configtest.obj
>>>>C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c
/nologo
>>>
>>>/Ox /MD /W3/GX /DNDEBUG /O2 /Gf /GB /GD /Ob2 -D_GNU_SOURCE=1
>>>-IC:\Python23\include /Tc_configtest.c /Fo_configtest.obj
>>>
>>>>_configtest.c
>>>>_configtest.c(4) : error C2065: 'timegm' : undeclared identifier
>>>>failure.
>>>>removing: _configtest.c _configtest.obj
>>>>C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c
/nologo
>>>
>>>/Ox /MD /W3/GX /DNDEBUG /O2 /Gf /GB /GD /Ob2 -D_GNU_SOURCE=1
>>>-IC:\Python23\include -IC:\Python23\include /Tc_configtest.c
>>>/Fo_configtest.obj
>>>
>>>>_configtest.c
>>>>_configtest.c(5) : error C2133: 'mxarray' : unknown size
>>>>failure.
>>>>removing: _configtest.c _configtest.obj
>>>>running build_ext
>>>>building 'mx.ODBC.Windows.mxODBC' extension
>>>>C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c
/nologo
>>>
>>>/Ox /MD /W3/GX /DNDEBUG /O2 /Gf /GB /GD /Ob2 -DMS_ODBC_MANAGER
>>>-DBAD_STATIC_FORWARD=1 -UHAVE_STRPTIME -UHAVE_TIMEGM
-Imx/ODBC/Windows
>>>-IC:\Python23\include -IC:\Python23\PC
/Tpmx/ODBC/Windows/mxODBC.cpp
>>>/Fobuild\temp.win32-2.3\Release\mx\ODBC\Windows\mxODBC\mx/ODBC/Windows/mxODBC.obj
>>>
>>>>mxODBC.cpp
>>>>mx/ODBC/Windows/mxODBC.cpp(593) : error C2133:
'mxODBCursor_Methods'
>>>
>>>: unknown size
>>>
>>>>mx/ODBC/Windows/mxODBC.cpp(5799) : error C2086:
'mxODBCursor_Methods'
>>>
>>>: redefinition
>>>
>>>>mx/ODBC/Windows/mxODBC.cpp(5870) : error C2133: 'mxODBC_Methods' :
>>>
>>>unknown size
>>>
>>>>mx/ODBC/Windows/mxODBC.cpp(6528) : error C2086: 'mxODBC_Methods' :
>>>
>>>redefinition
>>>
>>>>error: command '"C:\Program Files\Microsoft Visual
>>>
>>>Studio\VC98\BIN\cl.exe"' failed with exit status 2
>>>
>>>>
>>>>
>>>>
>>>_______________________________________________________________________
>>>
>>>>eGenix.com User Mailing List                    
>>>
>>>http://www.egenix.com/ 
>>>
>>>>http://lists.egenix.com/mailman/listinfo/egenix-users 
>>>
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>
>>>_______________________________________________________________________
>>>eGenix.com User Mailing List                    
http://www.egenix.com/ 
>>>http://lists.egenix.com/mailman/listinfo/egenix-users 

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jul 26
2004)
 >>> Python/Zope Consulting and Support ...       
http://www.egenix.com/ 
 >>> mxODBC.Zope.Database.Adapter ...            
http://zope.egenix.com/ 
 >>> mxODBC, mxDateTime, mxTextTools ...       
http://python.egenix.com/ 
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free !
::::

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/

http://lists.egenix.com/mailman/listinfo/egenix-users


More information about the egenix-users mailing list