[freetds] Notes on buiding for VMS from CVS sources

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Tue May 17 09:59:09 EDT 2005


> 
> Hi,
> 
> I don't know if anyone has built the system on VMS lately, so I just 
> thought I'd post a few notes about my experience building for 
> VMS using 
> the latest code from the CVS tree (16-May-05).
> 
> I'm building for TDS 8.0, MSSQL, without ODBC support.
> cc/version = Compaq C V6.5-001 on OpenVMS Alpha V7.2-1
> ucx show version = DIGITAL TCP/IP Services for OpenVMS Alpha Version 
> V5.0A - ECO 3
> 
> 1.  The @[.VMS]CONFIGURE.COM file requires the presence of the 
> []CONFIGURE. file (built from autoconf and included in the nightly 
> snapshot).  As far as I can tell it's only needed to get the version 
> information.  VMS doesn't have autoconf (that I know of) so I can't 
> generate it locally.
> 
> 1a.  Related to a lack of autoconf - CVS has a number of files in the 
> attic that are in the nightly snapshot that are generated by 
> autoconf.  
> Some of the attic'ed files are required for the build to work.  These 
> files are
>     src/tds/tdsver.h
>     src/tds/tds_willconvert.h
>     include/encodings.h
>     src/tds/num_limits.h
> I had to get all of these from the snapshot.
> 

This is expected, CVS build require autoconf, see INSTALL.CVS (from CVS)

> 2. In src/dblib/dblib.c the dbdatecrack function references 
> the Sybase 
> date fields.  I just commented out the MSDBLIB  compiler directive in 
> sybdb.h and it compiled OK.
> Dblib unittest T0012 fails to compile as a result, but a 
> similar change 
> there works OK.
> 
> 3.  ctlib/ct.c uses snprintf()  which generates a compiler 
> message about 
> an implicit function declaration.  This relates to my version of vms 
> (7.2-1) not having that function so I grabbed the source from 
> http://www.ijs.si/software/snprintf/ and built using that, 
> then put the 
> .obj file into the libct.olb library.
> 
> 4.  include/replacements.h has a path reference to reaspassphrase.h.  
> The compiler couldn't find the file so I changed the code as follows:
> #if !HAVE_READPASSPHRASE
> #if defined(__VMS)
> # include <./src/replacements/readpassphrase.h>
> #else
> # include <../src/replacements/readpassphrase.h>
> #endif
> 

I hope Craig have some solution...

> 5.  src/dblib/buffering.h has a function static void 
> *buffer_row_address().  The return statement generates a compiler 
> warning for doing calculations on a void pointer.  I changed 
> the return 
> statement to:
>     return (void *)((long*)buf->rows + offset);
> 

you should convert to char*, not long *, perhaps this cause corruption
in point 7 (if not please post again).
You will find buffering.h in tomorrow snapshot.

> 6.  net.c complained failed to find a declaration for 
> TCP_NODELAY (since 
> UCX uses UCX$...).  I just hardcoded a couple of values to 
> get it working.
> 
> #elif defined(TCP_NODELAY) && defined(SOL_TCP)
> #define USE_NODELAY 1
> #elif defined(__VMS)
>         #define TCP_NODELAY 1
>         #define USE_NODELAY 1
> #endif
> 

applied, see tomorrow snapshot

> 7.  When running the unittests:
>     dblib tests t0003, t0007 & t0008 crash  ("somebody 
> overwrote one of 
> the breadcrumbs" then an exception).
>     I haven't looked into why these are failing.
> 

See above (point 6)

> I hope someone finds this useful :-)
> 
> - Richard

Thanks
  freddy77



More information about the FreeTDS mailing list