[pybsddb] Windows compilation error?
hasanyasin
hasanyasin at cubicpen.com
Mon Mar 28 18:01:09 CEST 2011
It is not about the exe. It fails at the same test with the same error
on other platforms too. I didn't look at the tests; but it looks like
the problem is in tests itself. Here is the debian exception traceback:
Traceback (most recent call last):
File "test_compare.py", line 273, in <module>
unittest.main (defaultTest = 'suite')
File "/usr/local/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/usr/local/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/usr/local/lib/python2.7/unittest/main.py", line 158, in
createTests
self.module)
File "/usr/local/lib/python2.7/unittest/loader.py", line 128, in
loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/local/lib/python2.7/unittest/loader.py", line 100, in
loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'suite'
On 03/28/2011 08:23 AM, sujoy chaudhuri wrote:
> Hi Hasanyasin/Jesus:
>
> On a clean machine (Windows 7 professional) with Python 2.7 using your
> exe, test_all.py fails - causing an app crash.
>
> Ran each test individually:
>
> test_associate pass
> test_basic crash
> test_compare
>
> Traceback (most recent call last):
> File "test_compare.py", line 273, in <module>
> unittest.main (defaultTest = 'suite')
> File "c:\python27\lib\unittest\main.py", line 94, in __init__
> self.parseArgs(argv)
> File "c:\python27\lib\unittest\main.py", line 149, in parseArgs
> self.createTests()
> File "c:\python27\lib\unittest\main.py", line 158, in createTests
> self.module)
> File "c:\python27\lib\unittest\loader.py", line 128, in
> loadTestsFromNames
> suites = [self.loadTestsFromName(name, module) for name in names]
> File "c:\python27\lib\unittest\loader.py", line 100, in
> loadTestsFromName
> parent, obj = obj, getattr(obj, part)
> AttributeError: 'module' object has no attribute 'suite'
>
> test_compat crash
> test_cursor_pget_bug crash
> test_db pass
> test_dbenv crash
> test_dbobj crash
> test_dbshelve crash
> test_dbtables crash
> test_distributed_transactions Ran 4 tests in 16.974 secs but crashes
> test_early_close crash
> test_fileid pass
> test_get_none pass
> test_join pass (no output)
> test_lock pass
> test_misc pass
> test_pickle pass
> test_queue crash
> test_recno crash
> test_replication crash
> test_sequence crash
> test_thread pass
>
> Just thought i'd let you know...
>
> Best
> Sujoy
>
> On Thu, Mar 10, 2011 at 3:08 PM, sujoy chaudhuri
> <chaudhuri.sujoy at gmail.com <mailto:chaudhuri.sujoy at gmail.com>> wrote:
>
> Hasanyasin.phila wrote:
>
> You can download the binary from:
> http://code.google.com/p/pybsddb-win/downloads/list
>
> Thanks! Also followed your instructions on building. Works
> brilliantly.
>
> A friendly suggestion: Leave windows as soon as possible switching to a free posix system such as bsd or linux.
>
>
> I am. Clients are another story...need to convince them first. But
> writing in Python means the shift will be easier when they do get
> convinced! ;)
>
> Sujoy
>
> On Wed, Mar 9, 2011 at 2:19 PM, sujoy chaudhuri
> <chaudhuri.sujoy at gmail.com <mailto:chaudhuri.sujoy at gmail.com>> wrote:
>
> Hi Hasanyasin | Jesus,
>
>
> hasanyasin.phila wrote:
>
> Run: python setup.py bdist --formats=wininst
>
>
>
>
> Followed your instructions using the free (and no longer available) MSVC++ 2003 Toolkit...and get the message:
>
>
> "error: Python was built with Visual Studio 2003;extensions must be built with a compiler than can generate compatible binaries.Visual Studio 2003 was not found on this system. If you have Cygwin installed,you can try compiling with MingW32, by passing "-c mingw32" to setup.py."
>
>
>
>
> Dont have Visual Studio 2003. Tried with Visual Studio 2008 with the same result...thats the reason i was trying with mingw - but since the headers are incompatible... :(
>
>
>
>
> Help!
>
> On Tue, Mar 8, 2011 at 7:15 PM, sujoy chaudhuri
> <chaudhuri.sujoy at gmail.com <mailto:chaudhuri.sujoy at gmail.com>>
> wrote:
>
> Jesus wrote:
>
> I am not familiar with Windows compilation. I have spend some time
> trying to find a Windows developer, without success so far :-(
>
> Could you possibly show us the line 104 of
> "/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/sys/types.h",
> and the line 135 of "db/include/db.h"?.
>
> Thanks for the quick response Jesus. The relevant lines are:
>
> ...from types.h (under mingw/include/sys)
>
> #ifndef_NO_OLDNAMES
> typedef _ssize_t ssize_t;
> #endif
> #endif /* Not _SSIZE_T_ */
>
> (the offending line is typedef _ssize_t ssize_t;)
>
> ...and from db.h (under .../bsddb3-5.1.1/db/include)
>
> #defineoff_t__db_off_t
> typedef int64_t off_t;
> typedef int pid_t;
> #ifdef _WIN64
> typedef int64_t ssize_t;
> #else
> typedef int32_t ssize_t;
> #endif
>
> (line 138 is typedef int32_t ssize_t;)
>
> Thanks for the help!
>
> Sujoy
>
> On Tue, Mar 8, 2011 at 12:53 PM, sujoy chaudhuri
> <chaudhuri.sujoy at gmail.com
> <mailto:chaudhuri.sujoy at gmail.com>> wrote:
>
> Hi:
>
> Am trying to install on windows with:
>
> $ python setup.py build -c mingw32
>
> ...and am getting an error:
>
> In file included from Modules/bsddb.h:99,
>
> from Modules/_bsddb.c:95:
>
> db/include/db.h:135: error: conflicting types for 'ssize_t'
>
> /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/sys/t
> ypes
>
> .h:104: error: previous declaration of 'ssize_t' was here
>
> error: command 'gcc' failed with exit status 1
>
> This was reported by Lynton on Nov 10th, 2009.
>
> Any fix for this issue?
>
> Thanks
>
> Sujoy
>
>
>
>
>
>
> _______________________________________________
> pybsddb mailing list
> pybsddb at jcea.es
> https://mailman.jcea.es/listinfo/pybsddb
> http://www.jcea.es/programacion/pybsddb.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20110328/a7c30571/attachment.htm>
More information about the pybsddb
mailing list