Problem connecting to Access Database on Windows Server from 32 bit Linux

Andrew P Jones <[email protected]> Thu, 02 May 2013 17:27:48 +0200
Newsgroups gmane.comp.db.mdb-tools.devel
Message-ID <[email protected]>
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.

Thanks and best regards,

Andrew Jones

BTW - Thanks for the great application.  Where do I send the postcard?


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1