Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 84c7a3f

Browse files
committed
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.
1 parent ef7fe2e commit 84c7a3f

5 files changed

Lines changed: 24 additions & 26 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,9 @@ Windows
822822
improvement over the previous Berkeley DB 1.85, which had many
823823
bugs.
824824
XXX What are the licensing issues here?
825-
XXX The debug Python still blows up (see PCbuild/readme.txt).
825+
XXX If a user has a database created with a previous verion of
826+
XXX Python, what must they do to convert it?
827+
XXX I'm still not sure how to link this thing (see PCbuild/readme.txt).
826828
XXX The version # is likely to change before 2.3a1.
827829

828830
- The Windows distribution now ships with Tcl/Tk version 8.4.1 (it

PCbuild/_bsddb.dsp

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PCbuild/pcbuild.dsw

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Package=<5>
1111

1212
Package=<4>
1313
{{{
14+
Begin Project Dependency
15+
Project_Dep_Name pythoncore
16+
End Project Dependency
1417
}}}
1518

1619
###############################################################################

PCbuild/python20.wse

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,17 +1853,6 @@ item: Install File
18531853
end
18541854
item: Remark
18551855
end
1856-
item: Remark
1857-
Text=Oddball -- the Sleepcat DLL
1858-
end
1859-
item: Install File
1860-
Source=..\..\db-4.0.14\build_win32\Release\libdb40.dll
1861-
Destination=%MAINDIR%\DLLs\libdb40.dll
1862-
Description=Sleepycat Berekely DB DLL
1863-
Flags=0000000000000010
1864-
end
1865-
item: Remark
1866-
end
18671856
item: Install File
18681857
Source=.\python%_pymajor_%%_pyminor_%.lib
18691858
Destination=%MAINDIR%\libs\python%_PYMAJOR_%%_PYMINOR_%.lib

PCbuild/readme.txt

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ bz2
161161

162162

163163
_bsddb
164+
XXX The Sleepycat release we use will probably change before
165+
XXX 2.3a1.
164166
Go to Sleepycat's patches page:
165167
http://www.sleepycat.com/update/index.html
166168
and download
@@ -182,19 +184,21 @@ _bsddb
182184
yes, of course). Choose configuration "db_buildall - Win32 Release",
183185
and build db_buildall.exe.
184186

185-
XXX You have to copy
186-
XXX dist\db-4.0.14\build_win32\Release\libdb40.dll
187-
XXX into PCbuild (or elsewhere on your path) before the tests
188-
XXX will run.
189-
190-
XXX A debug-mode build blows up when running this, presumably because
191-
XXX I'm mixing debug-mode MS stuff with Sleepycat's release-mode
192-
XXX DLL. This gives me a headache. I would *like* to, as the old
193-
XXX bsddb 1.85 project apparently managed to do, link the Berkeley
194-
XXX DLL into the guts of our _bsddb.pyd. I don't know how to.
187+
XXX We're actually linking against Release_static\libdb40s.lib.
188+
XXX This yields the following warnings:
189+
"""
190+
Compiling...
191+
_bsddb.c
192+
Linking...
193+
Creating library ./_bsddb.lib and object ./_bsddb.exp
194+
LINK : warning LNK4049: locally defined symbol "_malloc" imported
195+
LINK : warning LNK4049: locally defined symbol "_free" imported
196+
LINK : warning LNK4049: locally defined symbol "_fclose" imported
197+
LINK : warning LNK4049: locally defined symbol "_fopen" imported
198+
_bsddb.pyd - 0 error(s), 4 warning(s)
199+
"""
200+
XXX This isn't encouraging, but I don't know what to do about it.
195201

196-
XXX The Sleepycat release we use will probably change before
197-
XXX 2.3a1.
198202

199203

200204
YOUR OWN EXTENSION DLLs

0 commit comments

Comments
 (0)