Try linking the static Sleepycat lib into _bsddb.pyd. Hard to say

whether this is a correct thing to do:

+ There are linker warnings (see PCbuild\readme.txt).
+ test_bsddb passes, in both release and debug builds now.
+ test_bsddb3 has several failures, but it did before too.

Also made pythoncore a dependency of the _bsddb project, updated
build instructions, added database conversion XXX to NEWS, and fiddled
the Windows installer accordingly.
This commit is contained in:
Tim Peters 2002-11-23 18:48:06 +00:00
parent ef7fe2e813
commit 84c7a3f328
5 changed files with 24 additions and 26 deletions

View File

@ -822,7 +822,9 @@ Windows
improvement over the previous Berkeley DB 1.85, which had many
bugs.
XXX What are the licensing issues here?
XXX The debug Python still blows up (see PCbuild/readme.txt).
XXX If a user has a database created with a previous verion of
XXX Python, what must they do to convert it?
XXX I'm still not sure how to link this thing (see PCbuild/readme.txt).
XXX The version # is likely to change before 2.3a1.
- The Windows distribution now ships with Tcl/Tk version 8.4.1 (it

View File

@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\db-4.0.14\build_win32\Release\libdb40.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /out:"./_bsddb.pyd"
# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\db-4.0.14\build_win32\Release_static\libdb40s.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"./_bsddb.pyd"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "_bsddb - Win32 Debug"
@ -82,7 +82,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\db-4.0.14\build_win32\Release\libdb40.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"MSVCRT" /out:"./_bsddb_d.pyd" /pdbtype:sept
# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\db-4.0.14\build_win32\Release_static\libdb40s.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd" /out:"./_bsddb_d.pyd" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF

View File

@ -11,6 +11,9 @@ Package=<5>
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name pythoncore
End Project Dependency
}}}
###############################################################################

View File

@ -1853,17 +1853,6 @@ item: Install File
end
item: Remark
end
item: Remark
Text=Oddball -- the Sleepcat DLL
end
item: Install File
Source=..\..\db-4.0.14\build_win32\Release\libdb40.dll
Destination=%MAINDIR%\DLLs\libdb40.dll
Description=Sleepycat Berekely DB DLL
Flags=0000000000000010
end
item: Remark
end
item: Install File
Source=.\python%_pymajor_%%_pyminor_%.lib
Destination=%MAINDIR%\libs\python%_PYMAJOR_%%_PYMINOR_%.lib

View File

@ -161,6 +161,8 @@ bz2
_bsddb
XXX The Sleepycat release we use will probably change before
XXX 2.3a1.
Go to Sleepycat's patches page:
http://www.sleepycat.com/update/index.html
and download
@ -182,19 +184,21 @@ _bsddb
yes, of course). Choose configuration "db_buildall - Win32 Release",
and build db_buildall.exe.
XXX You have to copy
XXX dist\db-4.0.14\build_win32\Release\libdb40.dll
XXX into PCbuild (or elsewhere on your path) before the tests
XXX will run.
XXX We're actually linking against Release_static\libdb40s.lib.
XXX This yields the following warnings:
"""
Compiling...
_bsddb.c
Linking...
Creating library ./_bsddb.lib and object ./_bsddb.exp
LINK : warning LNK4049: locally defined symbol "_malloc" imported
LINK : warning LNK4049: locally defined symbol "_free" imported
LINK : warning LNK4049: locally defined symbol "_fclose" imported
LINK : warning LNK4049: locally defined symbol "_fopen" imported
_bsddb.pyd - 0 error(s), 4 warning(s)
"""
XXX This isn't encouraging, but I don't know what to do about it.
XXX A debug-mode build blows up when running this, presumably because
XXX I'm mixing debug-mode MS stuff with Sleepycat's release-mode
XXX DLL. This gives me a headache. I would *like* to, as the old
XXX bsddb 1.85 project apparently managed to do, link the Berkeley
XXX DLL into the guts of our _bsddb.pyd. I don't know how to.
XXX The Sleepycat release we use will probably change before
XXX 2.3a1.
YOUR OWN EXTENSION DLLs