(A plea for help from a Zope newbie...) I am attempting to build the elusive "_mysqldb" module required by ZMySQLDA, from <http://www.zope.org/Members/adustman/News/MySQL_Support_20000115>, under Win98 with Borland BCC 5.5. In the post <http://mail.python.org/pipermail/distutils-sig/2000-October/001694.html>, Rene Liebscher wrote:
First convert all MSVC++ libraries you need from COFF to OMF. coff2omf python20.lib python20_bcpp.lib
I performed this step successfully
When you want to link against a library (python20), distutils checks if there is a library with _bcpp suffix and uses it, otherwise it tries the normal name for the library (python20.lib).
This failed for me, so I replaced the entry in config.h for "python20.lib" with "python20_bcpp.lib": #pragma comment(lib,"python20_bcpp.lib")
The second point is, you have to specify that you want to use the Borland compiler. python setup.py install build_ext --compiler=bcpp
(many Thanks for this obscure tip) The error file resulting from this step is posted below Can anyone provide any enlightenment as to what I could be missing, or where I should be looking for 'LIBS.OBJ'? Are the warnings shown below usual for this module? I am neither a C or Python programmer, although I was in a former life, many years ago. I found and loaded BCC just for this project. On Win98, I have loaded: -- Be-Open binary Win32 distribution/installation of Python 2.0 , BeOpen-Python-2.0.exe, with include files from BeOpen-Python-2.0.tar.gz -- MySQL-python-0.3.3.tar.gz -- ZMySQLDA-2.0.4.tar.gz (this is the package I wish to use, with LoginManager in Zope) (Next question...) My ultimate goal in using LoginManager is to enable members of a ski club to: -- Apply for membership -- Update their own information, including access passwords -- Sign up for trips and events -- Post articles, chat and view the membership list, after authentication -- Allow for management of user information and the remainder of the site by a small core of administrators Are there limitations in LoginManager that would limit its use in performing the authentication and session management required by the above? Thanks in advance.... Terry Trewitt Terry@Trewitt.org ---------------------------------------------------------------------- The creation of these 2 vital files was suggested by Gordon Williams <http://www.cyberus.ca/~g_will/pyExtenDL.shtml> (Many Thanks!) ------------------------------------------------ C:\Borland\bcc32\bin\bcc32.cfg: ------------------------------------------------ -w -I"c:\BORLAND\BCC55\INCLUDE;.\;D:\PROGRAM FILES\LSS-ZOPE\bin\PYTHON20\INCLUDE;d:\nusphere\mysql\include" -L"c:\BORLAND\BCC55\LIB;c:\Borland\Bcc55\lib\psdk;D:\PROGRAM FILES\LSS-ZOPE\bin\PYTHON20\LIBS;d:\nusphere\mysql\lib\opt" ------------------------------------------------ C:\Borland\bcc32\bin\ilink32.cfg: ------------------------------------------------ -x -L"C:\BORLAND\BCC55\LIB;C:\Borland\bcc55\lib\psdk;D:\PROGRAM FILES\LSS-ZOPE\bin\PYTHON20\LIBS" ------------------------------------------------ python setup.py install build_ext --compiler=bcpp > build.log ------------------------------------------------ _mysqlmodule.c: Warning W8060 _mysqlmodule.c 81: Possibly incorrect assignment in function _mysql_Exception Warning W8060 _mysqlmodule.c 381: Possibly incorrect assignment in function _mysql_ResultObject_New Warning W8060 _mysqlmodule.c 393: Possibly incorrect assignment in function _mysql_ResultObject_New Warning W8060 _mysqlmodule.c 455: Possibly incorrect assignment in function _mysql_connect Warning W8057 _mysqlmodule.c 489: Parameter 'self' is never used in function _mysql_connect Warning W8004 _mysqlmodule.c 461: 'conn' is assigned a value that is never used in function _mysql_connect Warning W8057 _mysqlmodule.c 524: Parameter 'self' is never used in function _mysql_debug Warning W8060 _mysqlmodule.c 627: Possibly incorrect assignment in function _escape_item Warning W8057 _mysqlmodule.c 663: Parameter 'self' is never used in function _mysql_escape Warning W8060 _mysqlmodule.c 680: Possibly incorrect assignment in function _mysql_escape_sequence Warning W8057 _mysqlmodule.c 691: Parameter 'self' is never used in function _mysql_escape_sequence Warning W8060 _mysqlmodule.c 707: Possibly incorrect assignment in function _mysql_escape_dict Warning W8057 _mysqlmodule.c 717: Parameter 'self' is never used in function _mysql_escape_dict Warning W8060 _mysqlmodule.c 731: Possibly incorrect assignment in function _mysql_ResultObject_describe Warning W8060 _mysqlmodule.c 762: Possibly incorrect assignment in function _mysql_ResultObject_field_flags Warning W8060 _mysqlmodule.c 765: Possibly incorrect assignment in function _mysql_ResultObject_field_flags Warning W8060 _mysqlmodule.c 809: Possibly incorrect assignment in function _mysql_row_to_tuple Warning W8060 _mysqlmodule.c 835: Possibly incorrect assignment in function _mysql_row_to_dict Warning W8060 _mysqlmodule.c 874: Possibly incorrect assignment in function _mysql_row_to_dict_old Warning W8012 _mysqlmodule.c 915: Comparing signed and unsigned values in function _mysql__fetch_row Warning W8008 _mysqlmodule.c 962: Condition is always false in function _mysql_ResultObject_fetch_row Warning W8060 _mysqlmodule.c 968: Possibly incorrect assignment in function _mysql_ResultObject_fetch_row Warning W8060 _mysqlmodule.c 975: Possibly incorrect assignment in function _mysql_ResultObject_fetch_row Warning W8060 _mysqlmodule.c 986: Possibly incorrect assignment in function _mysql_ResultObject_fetch_row Warning W8004 _mysqlmodule.c 957: 'r' is assigned a value that is never used in function _mysql_ResultObject_fetch_row Warning W8057 _mysqlmodule.c 1041: Parameter 'self' is never used in function _mysql_get_client_info Warning W8057 _mysqlmodule.c 1051: Parameter 'self' is never used in function _mysql_ConnectionObject_commit Warning W8060 _mysqlmodule.c 1625: Possibly incorrect assignment in function _mysql_Constant_class Warning W8060 _mysqlmodule.c 1627: Possibly incorrect assignment in function _mysql_Constant_class Warning W8060 _mysqlmodule.c 1630: Possibly incorrect assignment in function _mysql_Constant_class Warning W8060 _mysqlmodule.c 1687: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1690: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1693: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1696: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1699: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1702: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1706: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1710: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1714: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1718: Possibly incorrect assignment in function init_mysql Warning W8060 _mysqlmodule.c 1732: Possibly incorrect assignment in function init_mysql Fatal: Unable to open file 'LIBS.OBJ' running install running build running build_py copying MySQLdb.py -> build\lib.win32-2.0 copying CompatMysqldb.py -> build\lib.win32-2.0 running build_ext building '_mysql' extension C:\BORLAND\BCC55\BIN\bcc32.exe -c /tWM /O2 /q /g0 -Id:\nusphere\mysql\include "-ID:\PROGRAM FILES\LSS-ZOPE\BIN\PYTHON20\Include" -obuild\temp.win32-2.0\Release\_mysqlmodule.obj _mysqlmodule.c writing build\temp.win32-2.0\Release\_mysql.def C:\BORLAND\BCC55\BIN\ilink32.exe /Tpd /Gn /q /x /Ld:\nusphere\mysql\lib\opt "/LD:\PROGRAM FILES\LSS-ZOPE\BIN\PYTHON20\libs" /L. c0d32 build\temp.win32-2.0\Release\_mysqlmodule.obj d:\nusphere\mysql\lib\opt\mysqlclient.lib , build\lib.win32-2.0\_mysql.pyd ,, d:\nusphere\mysql\lib\opt\mysqlclient.lib d:\nusphere\mysql\lib\opt\zlib.lib msvcrt libcmt wsock32 advapi32 "D:\PROGRAM FILES\LSS-ZOPE\BIN\PYTHON20\libs\python20_bcpp.lib" import32 cw32mt , build\temp.win32-2.0\Release\_mysql.def ,
Terry@trewitt.org wrote:
(A plea for help from a Zope newbie...)
I am attempting to build the elusive "_mysqldb" module required by ZMySQLDA, from <http://www.zope.org/Members/adustman/News/MySQL_Support_20000115>, under Win98 with Borland BCC 5.5.
In the post <http://mail.python.org/pipermail/distutils-sig/2000-October/001694.html>, Rene Liebscher wrote:
First convert all MSVC++ libraries you need from COFF to OMF. coff2omf python20.lib python20_bcpp.lib
I performed this step successfully
When you want to link against a library (python20), distutils checks if there is a library with _bcpp suffix and uses it, otherwise it tries the normal name for the library (python20.lib).
This failed for me, so I replaced the entry in config.h for "python20.lib" with "python20_bcpp.lib": #pragma comment(lib,"python20_bcpp.lib")
This makes no sense because it is enclosed in an #ifdef _MSC_VER (python20_bcpp.lib was found!!! see your command line "D:\PROGRAM FILES\LSS-ZOPE\BIN\PYTHON20\libs\python20_bcpp.lib" )
The second point is, you have to specify that you want to use the Borland compiler. python setup.py install build_ext --compiler=bcpp
(many Thanks for this obscure tip) The error file resulting from this step is posted below
Can anyone provide any enlightenment as to what I could be missing, or where I should be looking for 'LIBS.OBJ'? Are the warnings shown below usual for this module? I am neither a C or Python programmer, although I was in a former life, many years ago. I found and loaded BCC just for this project. (The warnings are not a problem I think, because Borland C++ brings more warnings than most other compilers.)
I think the problem (LIBS.OBJ) is the following part of the command line C:\BORLAND\BCC55\BIN\ilink32.exe /Tpd /Gn /q /x /Ld:\nusphere\mysql\lib\opt ==> "/LD:\PROGRAM FILES\LSS-ZOPE\BIN\PYTHON20\libs" <== /L. c0d32 build\temp.win32-2.0\Release\_mysqlmodule.obj d:\nusphere\mysql\lib\opt\mysqlclient.lib , build\lib.win32-2.0\_mysql.pyd ,, d:\nusphere\mysql\lib\opt\mysqlclient.lib d:\nusphere\mysql\lib\opt\zlib.lib msvcrt libcmt wsock32 advapi32 "D:\PROGRAM FILES\LSS-ZOPE\BIN\PYTHON20\libs\python20_bcpp.lib" import32 cw32mt , build\temp.win32-2.0\Release\_mysql.def , Because of the quoting ilink might take this as an object filename. (If it is not this, it might be the similar path name in the ilink32.cfg file.) It might be help to patch distutils/bcppcompiler.py as follows ----------------------------------------------------------------------- --- bcppcompiler.py Mon Feb 12 10:46:21 2001 +++ bcppcompiler_new.py Mon Feb 19 13:18:51 2001 @@ -257,7 +257,7 @@ for l in library_dirs: - ld_args.append("/L%s" % os.path.normpath(l)) + ld_args.extend(["/L","%s" % os.path.normpath(l)]) ld_args.append("/L.") # we sometimes use relative paths # list of object files ------------------------------------------------------------------------ I don't know if it helps, because I currently have no (Windows,Borland C++) computer available to test it. If it works send me a note, so we can make it an offical patch for distutils. Kind regards Rene Liebscher
...
---------------------------------------------------------------------- The creation of these 2 vital files was suggested by Gordon Williams <http://www.cyberus.ca/~g_will/pyExtenDL.shtml> (Many Thanks!) ------------------------------------------------ C:\Borland\bcc32\bin\bcc32.cfg: ------------------------------------------------ -w -I"c:\BORLAND\BCC55\INCLUDE;.\;D:\PROGRAM FILES\LSS-ZOPE\bin\PYTHON20\INCLUDE;d:\nusphere\mysql\include" -L"c:\BORLAND\BCC55\LIB;c:\Borland\Bcc55\lib\psdk;D:\PROGRAM FILES\LSS-ZOPE\bin\PYTHON20\LIBS;d:\nusphere\mysql\lib\opt"
------------------------------------------------ C:\Borland\bcc32\bin\ilink32.cfg: ------------------------------------------------ -x -L"C:\BORLAND\BCC55\LIB;C:\Borland\bcc55\lib\psdk;D:\PROGRAM FILES\LSS-ZOPE\bin\PYTHON20\LIBS"
------------------------------------------------ python setup.py install build_ext --compiler=bcpp > build.log ------------------------------------------------ _mysqlmodule.c: Warning W8060 _mysqlmodule.c 81: Possibly incorrect assignment in function _mysql_Exception ... Warning W8060 _mysqlmodule.c 1732: Possibly incorrect assignment in function init_mysql Fatal: Unable to open file 'LIBS.OBJ' running install running build running build_py copying MySQLdb.py -> build\lib.win32-2.0 copying CompatMysqldb.py -> build\lib.win32-2.0 running build_ext building '_mysql' extension C:\BORLAND\BCC55\BIN\bcc32.exe -c /tWM /O2 /q /g0 -Id:\nusphere\mysql\include "-ID:\PROGRAM FILES\LSS-ZOPE\BIN\PYTHON20\Include" -obuild\temp.win32-2.0\Release\_mysqlmodule.obj _mysqlmodule.c writing build\temp.win32-2.0\Release\_mysql.def C:\BORLAND\BCC55\BIN\ilink32.exe /Tpd /Gn /q /x /Ld:\nusphere\mysql\lib\opt "/LD:\PROGRAM FILES\LSS-ZOPE\BIN\PYTHON20\libs" /L. c0d32 build\temp.win32-2.0\Release\_mysqlmodule.obj d:\nusphere\mysql\lib\opt\mysqlclient.lib , build\lib.win32-2.0\_mysql.pyd ,, d:\nusphere\mysql\lib\opt\mysqlclient.lib d:\nusphere\mysql\lib\opt\zlib.lib msvcrt libcmt wsock32 advapi32 "D:\PROGRAM FILES\LSS-ZOPE\BIN\PYTHON20\libs\python20_bcpp.lib" import32 cw32mt , build\temp.win32-2.0\Release\_mysql.def ,
participants (2)
-
Rene Liebscher
-
Terry@trewitt.org