From: Alexander L. <le...@ed...> - 2013-05-02 16:14:24
|
On Thu, 2 May 2013, Andrew P Jones wrote: > Apologies in advance: I haven't written any c for 10 years so although I > believe I have identified the bug I have not yet succeeded in building / > testing a fix. Configure tells me I need glib2 but that is a different > issue. > > The meat of this mail is also on the linux mint forum as I am not sure > if the problem is packaging or mdbtools itself > > http://forums.linuxmint.com/viewtopic.php?f=47&t=132702 > > The problem is that in src/libmdb/file.c mdb_find_file() fails if > stat(Filename, &status) fails. > > Broadly speaking, the Windows server returns a 64 bit stat structure > which exceeds the length of the 32-bit stat structure allocated on the > linux box and causes stat() to fail. > > The above sentence was both inaccurate and garbled - a much better > explanation can be found here: > > https://bugzilla.samba.org/show_bug.cgi?id=7707#c1 > > The above link recommends building with: > > -D_FILE_OFFSET_BITS=64 > > I did wonder if it would be cleaner to change > struct stat status; > to use a GStatBuf and use the corresponding g_stat () call, but if I > have understood this page correctly... > https://developer.gnome.org/glib/2.35/glib-File-Utilities.html#GStatBuf > ... that will continue to use a 32 bit structure. > > Sorry if this reads like "Here's your problem - go fix it." I have > tried several times to build the code downloaded from sourceforge > without success. If anyone has seen and worked around the error below > and can tell me how to without breaking the linux Mint box which I am > accessing remotely I will gladly experiment further. > > checking for GLIB - version >= 2.0.0... no > *** Could not run GLIB test program, checking why... > *** The test program failed to compile or link. See the file config.log > for the > *** exact error that occured. This usually means GLIB is incorrectly > installed. > > glib 2.0 is required by MDB Tools. > It can be downloaded at www.gtk.org. > Not quite sure whether I understand your problems: You seem to have a working binary of libmdb but that one only supports 32 bit. You want to build it on your own for 64 bit. The build failed due to the missing glib installation. If you don't want to install glib (no idea what dependencies that pulls in, but I guess you will not screw up your machine with that): I had to build libmdb without glib for myself. What I did was replacing the few glib functions beeing used by my own implementation. That were mostly some hash tables which I replaced by simply using the STL, so it is no longer plain C code. Also, that step requires some knowledge of autobuild, or you compile and link the libmdb sources for yourself, which is not such big trouble. If that helps, I can share my code. Alex. |