Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 13eec89779171a321fe518ddb0e0fec6 > files > 532

freetds-doc-0.91-8.mga5.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML
><HEAD
><TITLE
>OS-specific Issues</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="FreeTDS User Guide"
HREF="index.htm"><LINK
REL="UP"
TITLE="Build FreeTDS"
HREF="build.htm"><LINK
REL="PREVIOUS"
TITLE="How to build: Configure and make"
HREF="config.htm"><LINK
REL="NEXT"
TITLE="Install FreeTDS"
HREF="install.htm"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="userguide.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=utf-8"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
><SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
> User Guide: A Guide to Installing, Configuring, and Running <SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
></TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="config.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 2. Build <SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="install.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="OSISSUES"
>OS-specific Issues</A
></H1
><TABLE
CLASS="SIDEBAR"
BORDER="1"
CELLPADDING="5"
><TR
><TD
><DIV
CLASS="SIDEBAR"
><P
></P
><A
NAME="AEN684"
></A
><P
>If you've recently built and installed <SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
> and noticed steps peculiar to your OS, we'll happily include your comments here.</P
><P
>One thing that can be said, if it's not too obvious:  check with your vendor or favorite download site.  <SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
> is routinely rolled up into OS install packages.  We know of packages for <SPAN
CLASS="PRODUCTNAME"
>Debian</SPAN
>, <SPAN
CLASS="PRODUCTNAME"
>Red Hat</SPAN
>, <SPAN
CLASS="PRODUCTNAME"
>FreeBSD</SPAN
>, and <SPAN
CLASS="PRODUCTNAME"
>NetBSD</SPAN
>.  The installation through the package management systems in these environments may well reduce your work to simply <B
CLASS="COMMAND"
>make install</B
>.</P
><P
></P
></DIV
></TD
></TR
></TABLE
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="WINDOWS"
>Win32 and Win64</A
></H2
><P
>Building for Windows using Microsoft's compiler is supported via the <TT
CLASS="FILENAME"
>NMakefile</TT
> included in the distribution.  Set up the command-line build environment per Microsoft's instructions, and run e.g. 

<PRE
CLASS="SCREEN"
>	<SAMP
CLASS="PROMPT"
>$ </SAMP
><KBD
CLASS="USERINPUT"
>nmake -fNmakefile -nologo apps PLATFORM=win32 CONFIGURATION=debug</KBD
></PRE
>
	
The assumed availability of standard <TT
CLASS="FILENAME"
>.h</TT
> files is captured in <TT
CLASS="FILENAME"
>win32/config.h</TT
>.  If you encounter difficulties related to missing include files, examine the indicated file for an include guard, and compare it to  	<TT
CLASS="FILENAME"
>win32/config.h</TT
>.  For example, you get an error like this:
<DIV
CLASS="EXAMPLE"
><A
NAME="AEN704"
></A
><P
><B
>Example 2-1. Missing include file in Windows</B
></P
><PRE
CLASS="SCREEN"
><SAMP
CLASS="COMPUTEROUTPUT"
>&hellip;&#13;asprintf.c
include\tds_sysdep_private.h(239) : fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory</SAMP
></PRE
></DIV
>

<TT
CLASS="FILENAME"
>src/replacements/asprintf.c</TT
>  includes <TT
CLASS="FILENAME"
>include/tds_sysdep_private.h</TT
>, where you find 

<PRE
CLASS="SCREEN"
><SAMP
CLASS="COMPUTEROUTPUT"
>238  #ifdef HAVE_INTTYPES_H
239  #include &lt;inttypes.h&gt;
240  #endif</SAMP
></PRE
>

and, sure enough, <TT
CLASS="FILENAME"
>asprintf.c</TT
> earlier includes <TT
CLASS="FILENAME"
>win32/config.h</TT
>, which says

<PRE
CLASS="SCREEN"
>91  /* Define to 1 if you have the &lt;inttypes.h&gt; header file. */
92  #define HAVE_INTTYPES_H 1</PRE
>

Which shouldn't be defined unless <TT
CLASS="FILENAME"
>inttypes.h</TT
> exists on your system.  </P
><P
>Let's review: <TT
CLASS="FILENAME"
>config.h</TT
> has preprocessor definitions that (try to) describe the build environment to the compiler.  In this example, it got one wrong, causing the compiler to look for a file that isn't present, creating the error.  The solution is <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
> not</I
></SPAN
> to change the <SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
> source code, but merely to comment out line 92 in <TT
CLASS="FILENAME"
>config.h</TT
>.   </P
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Perhaps you're shaking your head at such an <SPAN
CLASS="QUOTE"
>"old school"</SPAN
> approach.  Over the years, Microsoft's proprietary project-configuration files have proved difficult to support.  Every version is different, and there are a great many versions in use <SPAN
CLASS="QUOTE"
>"in the wild"</SPAN
> at any one time.  As the project changes, it becomes impossible to maintain these kinds of files.  </P
><P
>For Windows applications that use <SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
> the hard-won wisdom is <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>just use the <TT
CLASS="FILENAME"
>NMakefile</TT
>, please, thanks!</I
></SPAN
>  If you like a visual environment and visual debugging, no problem: Microsoft's tools support <SPAN
CLASS="QUOTE"
>"Makefile projects"</SPAN
>.  The author has direct knowledge of developers for whom that arrangement works quite well. </P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN730"
>Other ways to build under Windows&reg;</A
></H3
><P
></P
><UL
><LI
><P
>Visual Studio.  Project files are included in the <TT
CLASS="FILENAME"
>win32</TT
> directory.   See above note for why these might be out of date.</P
></LI
><LI
><P
>Dev-C++</P
></LI
><LI
><P
>MingW</P
></LI
><LI
><P
><SPAN
CLASS="APPLICATION"
>gcc</SPAN
> under <SPAN
CLASS="APPLICATION"
>cygwin</SPAN
>.</P
></LI
><LI
><P
>The Borland Builder 6.0 compiler is also reported to work, but requires some tweaking of the <TT
CLASS="LITERAL"
>#include</TT
> statements.  We would apply any patches that make this work cleanly.</P
></LI
></UL
><P
>From the Department of Double Emulation: <SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
> builds as a <TT
CLASS="FILENAME"
>.dll</TT
> under <SPAN
CLASS="PRODUCTNAME"
>WINE</SPAN
> and as a <TT
CLASS="FILENAME"
>.a</TT
> under <SPAN
CLASS="PRODUCTNAME"
>Interix</SPAN
>.  See the mailing list archives (second half of 2003) for details.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="VMS"
>VMS&reg;</A
></H2
><P
><SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
> will probably build and run on most versions of OpenVMS Alpha 7.0 and later with DEC/Compaq C 6.0 or later.  Other prerequisites:
				
				<P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
><SPAN
CLASS="APPLICATION"
>gunzip</SPAN
></TD
></TR
><TR
><TD
><SPAN
CLASS="APPLICATION"
>vmstar</SPAN
></TD
></TR
><TR
><TD
><SPAN
CLASS="APPLICATION"
>MMS</SPAN
> or <SPAN
CLASS="APPLICATION"
>MMK</SPAN
></TD
></TR
></TBODY
></TABLE
><P
></P
></P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN765"
>Build Instructions</A
></H3
><P
>Decompress and unpack the source archive using gunzip and vmstar.  If
					you are untarring on an ODS-5 disk, you should use the <CODE
CLASS="PARAMETER"
>/ODS2</CODE
> or <CODE
CLASS="PARAMETER"
>-o</CODE
>
					option to create universally VMS-friendly filenames; otherwise the build will fail to locate some files.</P
><P
>Set default to the top-level source directory and run the configuration
					script:</P
><PRE
CLASS="SCREEN"
>	<SAMP
CLASS="PROMPT"
>$</SAMP
> <KBD
CLASS="USERINPUT"
>@[.vms]configure</KBD
></PRE
><P
> This creates a <TT
CLASS="FILENAME"
>descrip.mms</TT
> in the top-level source
					directory which you may execute by simply running MMS (if you have the Module Management System that
					is part of DECset) or MMK (a freeware MMS alternative available from <A
HREF="http://www.madgoat.com"
TARGET="_top"
>www.madgoat.com</A
>).</P
><P
>Further information can be found in the <TT
CLASS="FILENAME"
></TT
> in the source distribution.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="OSX"
>OS X&reg;</A
></H2
><P
>As of this writing ($Date: 2011/05/21 18:31:37 $), the regular distribution compiles on OS X.  </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AIX"
>AIX&reg;</A
></H2
><P
>AIX&reg; can induce linker indigestion.  libtool doesn't always understand that a <TT
CLASS="FILENAME"
>.a</TT
> file
				can be a shared library.  One solution is to build only static libraries with the <CODE
CLASS="OPTION"
>--disable-shared</CODE
>
				configure option.</P
><P
>Another problem seems to be that the linker isn't asked to pull in all the requisite libraries.  Cf. this helpful
				<A
HREF="http://lists.ibiblio.org/pipermail/freetds/2004q3/016748.html"
TARGET="_top"
>mailing list message</A
>.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="RPM"
>GNU/Linux distributions that use RPMs</A
></H2
><P
>You may find it convenient to make an RPM from the source distribution, in which case you'll be glad to
				know it is easily done:
				
<PRE
CLASS="SCREEN"
>	<SAMP
CLASS="PROMPT"
>$ </SAMP
><KBD
CLASS="USERINPUT"
>rpmbuild -ta freetds-0.63RC9.tar.gz</KBD
></PRE
></P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="config.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.htm"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="install.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>How to build: Configure and make</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="build.htm"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Install <SPAN
CLASS="PRODUCTNAME"
>FreeTDS</SPAN
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>