Home | History | Annotate | only in /webstack/webstack/trunk/src/unixODBC-2.2.12
Up to higher level directory
NameDateSize
acinclude.m408-Dec-200822.8K
aclocal.m408-Dec-2008244.5K
AUTHORS08-Dec-20081.8K
autotest/08-Dec-2008
ChangeLog08-Dec-200851K
config.guess08-Dec-200842.5K
config.sub08-Dec-200831K
configure08-Dec-2008905.8K
configure.in08-Dec-200814.4K
contrib/08-Dec-2008
COPYING08-Dec-200823.9K
cur/08-Dec-2008
DataManager/08-Dec-2008
DataManagerII/08-Dec-2008
depcomp08-Dec-200811.8K
doc/08-Dec-2008
DriverManager/08-Dec-2008
Drivers/08-Dec-2008
DRVConfig/08-Dec-2008
exe/08-Dec-2008
extras/08-Dec-2008
gODBCConfig/08-Dec-2008
include/08-Dec-2008
ini/08-Dec-2008
INSTALL08-Dec-20088.2K
install-sh08-Dec-20085.5K
Interix/08-Dec-2008
libltdl/08-Dec-2008
log/08-Dec-2008
lst/08-Dec-2008
ltmain.sh08-Dec-2008182.4K
make_solaris.sh08-Dec-2008746
Makefile.am08-Dec-20087.1K
Makefile.in08-Dec-200826.6K
missing08-Dec-200810K
mkinstalldirs08-Dec-2008733
NEWS08-Dec-20081.1K
ODBCConfig/08-Dec-2008
odbcinst/08-Dec-2008
odbcinstQ/08-Dec-2008
odbctest/08-Dec-2008
qt.m408-Dec-200811.2K
README08-Dec-20081.8K
README.AIX08-Dec-20082.6K
README.GTK08-Dec-2008210
README.INTERIX08-Dec-2008512
README.OSX08-Dec-20083.2K
README.QNX08-Dec-20081.2K
README.SOLARIS08-Dec-20081.4K
README.VMS08-Dec-20085.1K
samples/08-Dec-2008
sqp/08-Dec-2008
unixODBC-sr.spec08-Dec-200813K
unixODBC.spec08-Dec-20084K
vms/08-Dec-2008
vmsbuild.com08-Dec-20087.3K

README

      1 +-------------------------------------------------------------+
      2 | unixODBC                                                    |
      3 +-------------------------------------------------------------+
      4 
      5 README
      6 ---------------------------------------------------------------
      7 
      8 Description:
      9 
     10 	unixODBC is an Open Source ODBC sub-system and an ODBC SDK
     11 	for Linux, Mac OSX, and UNIX. 
     12 	
     13 License:
     14 	
     15 	All libraries are LGPL except the News Server driver which 
     16 	is GPL. LGPL libraries can be used by commercial software.
     17 	
     18 	All programs are GPL.
     19 
     20 Parts:
     21 	unixODBC includes the following;
     22 	
     23 	- Driver Manager
     24 	- Installer Library and command line tool
     25 	- Drivers and Driver Setup libraries
     26 	- Graphical tools to admin ODBC, test drivers and browse 
     27 	  data sources
     28 	- Command Line Tools to help install a driver and work with SQL
     29 	
     30 
     31 How To Start:
     32 
     33 	Look for and read README files with extensions of interest. Then
     34 	read the INSTALL file.
     35 	
     36 	You can also jump into the doc directory and browse information 
     37 	there. And do not forget the online stuff.
     38 	
     39 	Some documentation may be a bit out of date the vast majority of
     40 	it should be ok.
     41 	
     42 Config Files:
     43 
     44 	The ODBC Installer Library is responsible for reading and writing
     45 	the unixODBC config files. 
     46 	
     47 	The savy can look at;
     48 	 
     49 	_odbcinst_SystemINI.c
     50 	_odbcinst_UserINI.c
     51 	
     52 	In anycase; you can override where unixODBC looks for its system
     53 	config files by setting the ODBCSYSINI enviroment variable during 
     54 	the use of unixODBC.
     55       
     56 
     57 Resources:
     58 
     59         http://sourceforge.net/projects/unixodbc/
     60 	
     61 +-------------------------------------------------------------+
     62 | Peter Harvey <pharvey (a] codebydesign.com>                     |
     63 | 14.DEC.01                                                   |
     64 +-------------------------------------------------------------+
     65  
     66 

README.AIX

      1 Building on AIX
      2 ===============
      3 
      4 Install
      5 =======
      6 
      7 AIX seems to ship with a install tool /usr/bin/bsdinstall, unfortunatly
      8 the version of autoconf that unixODBC uses doesn't seem to like this, so
      9 make sure it doesn't find this. It may be best to define INSTALL as a 
     10 empty string before building, forcing it to use the builtin install-sh.
     11 
     12 Threads
     13 =======
     14 
     15 You need to decide to build with or without threads, if you want threads
     16 I would do this
     17 
     18 export CC=xlc_r
     19 export CXX=xlC_r
     20 ./configure 
     21 
     22 If you don't want threads, do this
     23 
     24 export CC=xlc
     25 export CXX=xlC
     26 ./configure --enable-threads=no
     27 
     28 Shared Libs
     29 ===========
     30 
     31 Because of the way that AIX builds its shared libs there are a couple of 
     32 points to remember
     33 
     34 1. All drivers need changing into .so
     35 
     36 The drivers will be build as a .a, containing a .so, BUT dlopen only is 
     37 able to open a .so, so to fix this, for each driver that is needed, do
     38 the following (in this case the postgres driver).
     39 
     40 Go to the target lib directory
     41 
     42 	cd /usr/local/lib
     43 
     44 extract the .so from the .a
     45 
     46 	ar -x libodbcpsql.a
     47 
     48 This will create libodbcpsql.so.2
     49 
     50 The same will need doing for the seyup libs
     51 
     52 	ar -x libodbcpsqlS.a
     53 
     54 2. Shared libs containing C++ are special
     55 
     56 This is only a issue with the libodbcinstQ.a lib that is opened by
     57 ODBCConfig. There are two things, first because libtool decides that 
     58 shared libs ar lib*.a the code trys to load libodbcinstQ.a, and also
     59 we maye have to rebuild the lib using the IBM util makeC++SharedLib 
     60 (the name gives its away :-)
     61 
     62 I have tried this with a current AIX, and it seems that all is needed is to extract the .so 
     63 from the .a by running ar -x libodbcinstQ.a to get the .so
     64 
     65 If that doesn't help, or on older AIX's the following may need doing.
     66 
     67 After the make install is done, go into the odbcinstQ dir on thE
     68 build tree, and do the following
     69 
     70 	makeC++SharedLib -p 0 -o libodbcinstQ.so.1.0 -L$QTDIR/lib -lqt -L$PREFIX/lib -lodbc -lodbcinst  .libs/libodbcinstQ.lax/libodbcextraslc.al/strcasecmp.o  *.o ../ini/*.lo
     71 
     72 where QTDIR is set to the top of the qt tree, so $QTDIR/lib will contain libqt.a 
     73 and PREFIX is set to the unixODBC install tree, so $PREFIX/lib contains libodbc.a.
     74 Ignore any duplicate symbol warnings they are due to the same things being in libodbc.a
     75 and libodbcinst.a
     76 
     77 this will then build a libodbcinstQ.so.1.0, we can copy that to the target lib dir,
     78 and delete the existing lib, and link it (again replace $PREFIX with the correct path
     79 
     80 	cp libodbcinstQ.so.1.0 $PREFIX/lib
     81 	cd $PREFIX/lib
     82 	rm libodbcinstQ.a
     83 	ln -s libodbcinstQ.so.1.0 libodbcinstQ.a
     84 
     85 Then all should be OK with ODBCConfig
     86 
     87 Nick Gorham
     88 
     89 

README.GTK

      1 The GTK+ version of gODBCConfig must be built and installed after the main
      2 unixODBC distrib has been built. 
      3 
      4 Just cd to gODBCConfig and ./configure; make; make install as you would 
      5 any GTK/Gnome application.
      6 

README.INTERIX

      1 Some notes on building UnixODBC on Microsoft Interix
      2 
      3 First use the modified configure and config.guess
      4 included in the Interix directory, copy them up into the main 
      5 directory.
      6 
      7 Then build with the following line
      8 
      9 CFLAGS="-D_ALL_SOURCE -I/usr/local/include" CPPFLAGS="-D_ALL_SOURCE 
     10 -I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure
     11 
     12 After running configure, copy libtool from the Interix directory
     13 into the build directory
     14 
     15 Thanks to the MS group for supplying this info.
     16 
     17 Thats all for now.
     18 
     19 Nick.
     20 

README.OSX

      1 +-------------------------------------------------------------+
      2 | unixODBC                                                    |
      3 | Mac OSX                                                     |
      4 +-------------------------------------------------------------+
      5 
      6 README
      7 ---------------------------------------------------------------
      8 
      9 Building With GNU Auto Tools (by Nick):
     10 
     11 	It looks as if Darwin (Mac OSX) doesn't support the normal
     12 	dlopen type process that unixODBC requires. However help is
     13 	at hand in the form of dlcompat-20010831.tar.gz. This file
     14 	contains wrappers to emulate the calls. I have put this in
     15 	
     16 	ftp://ftp.easysoft.com/pub/beta/unixODBC/dlcompat-20010831.tar.gz
     17 	
     18 	It should be downloaded, unpacked then run make install
     19 	
     20 	This should be done before configuring unixODBC
     21 	
     22 	This file was created by Christoph Pfisterer <cp (a] chrisp.de> and
     23 	the original copy can be found at 
     24 	
     25 	    http://fink.sourceforge.net
     26 	
     27 	If you get a "ld: multiple definitions of symbol " error, 
     28 	then you should edit the file libtool in the unixODBC base 
     29 	directory and find the line
     30 	
     31 	    whole_archive_flag_spec="-all_load \$convenience"
     32 	
     33 	and replace it with
     34 	
     35 	    whole_archive_flag_spec=
     36 	
     37 	As at the time of writing, Qt is not available on OSX, its best to
     38 	disable the search for X libs that may fail, by configuring with
     39 	
     40 	    ./configure --enable-gui=no
     41 
     42 
     43 Building With Qt qmake (by Peter):
     44 
     45 	Qt is now availible for OSX but unixODBC may not detect your Qt
     46 	libs... worse yet you may not be able sort out the GNU auto-tools
     47 	required to build on OSX.
     48 	
     49 	If you want to build using qmake then read README.qmake.
     50 	
     51 
     52 Creating Install Packages:
     53 
     54 	unixODBC contains a number of directories and files to help create
     55 	OSX Packages. The process of doing so is not nearly as automated 
     56 	as creating RPM files using the GNU auto tools. Look for the
     57 	mac-install and mac-package directories.
     58 
     59 Cursor LIB
     60 
     61 The cursor lilb needs a manual stage build to create it as a OSX bundle
     62 it needs to be like that so the DM can load it at run time.
     63 
     64 To do this, after the "make" and "make install" have finished, go to the
     65 cur directory in the build tree. Then there issue these commands
     66 
     67 cc -bundle -flat_namespace -undefined suppress -o libodbccr.1.0.0.so *.lo
     68 cp libodbccr.1.0.0.so /usr/local/lib/libodbccr.1
     69 
     70 Replace /usr/local/lib/ in the above with whatever your actual unixODBC 
     71 lib path is.
     72 
     73 You may also have to do the same with any driver you build. You can check
     74 this by testing the type of the lib, for example.
     75 
     76 file /usr/local/lib/libodbcpsql.2.0.0.so
     77 /usr/local/lib/libodbcpsql.2.0.0.so: Mach-O dynamically linked shared library ppc
     78 
     79 This is not the correct type.
     80 
     81 So to get it as you need :-
     82 
     83 cd Drivers/Postgre7.1
     84 cc -bundle -flat_namespace -undefined suppress -o libodbcpsql.2.0.0.so *.lo
     85 cp libodbcpsql.2.0.0.so /usr/local/lib/libodbcpsql.2.0.0.so
     86 
     87 Now to check
     88 
     89 file /usr/local/lib/libodbcpsql.2.0.0.so
     90 /usr/local/lib/libodbcpsql.2.0.0.so: Mach-O bundle ppc
     91 
     92 Thats how it should be to work under the driver manager
     93 
     94 +-------------------------------------------------------------+
     95 | Peter Harvey <pharvey (a] codebydesign.com>                     |
     96 | Added to by Nick Gorham <nick (a] easysoft.com>                 |
     97 +-------------------------------------------------------------+
     98 		
     99 	
    100 

README.QNX

      1 Building unixODBC on QNX
      2 ========================
      3 
      4 This has been tested on the QNX 6.1 x86 release.
      5 
      6 1. unpack the distribution, and cd into the distribution dir
      7 
      8 2. Add any missing files
      9 
     10 	automake --add-missing
     11 
     12 3. Configure unixODBC
     13 	
     14 	./configure --sysconfdir=/etc --enable-gui=no --prefix=/opt
     15 
     16 4. run libtooloze using the QNX version of libtool, then update aclocal.m4
     17 
     18 	libtoolize --force
     19 	aclocal
     20 
     21 5. We now need to alter the flags dlopen uses
     22 
     23 	cd libltdl
     24 	sed "s/RTLD_GLOBAL/RTLD_GROUP/" ltdl.c > ltdl.c.new
     25 	sed "s/RTLD_LAZY/RTLD_NOW/" ltdl.c.new > ltdl.c
     26 	cd ..
     27 
     28 6. Force a reconfigure
     29 
     30 	rm config.cache
     31 
     32 7. Make, then install
     33 
     34 	make
     35 	make install
     36 
     37 And with luck and a trailing wind, that should be that.
     38 
     39 EXTRA STUFF for QNX 6.2, if the wind is head on...
     40 
     41 If you find that it segfaults, its worth going into the libltdl
     42 directory, editing the Makefile, and changing the line
     43 
     44 CFLAGS = -g -O2
     45 
     46 to 
     47 
     48 CFLAGS = -g -O2 -DPIC -fPIC
     49 
     50 then touch ltdl.c to force a rebuild
     51 
     52 You may also get a error when building in the exe directory, to
     53 fix this, go to the exe directory, edit Makefile, and change
     54 
     55 OBJEXT = @OBJEXT@
     56 
     57 to 
     58 
     59 OBJEXT = o
     60 
     61 And
     62 
     63 EXEEXT = @EXEEXT@
     64 
     65 to
     66 
     67 EXEEXT =
     68 
     69 
     70 
     71 

README.SOLARIS

      1 Building unixODBC on Solaris
      2 ----------------------------
      3 
      4 This should just work, however I have had the following helpfull
      5 hints sent to me by David Brown of Starquest. The suggested change
      6 has been made to the code in __info.c
      7 
      8 "Last fall, I had problems running on Solaris 7, because my system did have
      9 an iconv conversion between ISO8859-1 and UCS-2.
     10 
     11 I discovered two things:
     12 
     13 * the missing iconv tables are available by a patch for Solaris 7 (there is
     14 also a corresponding patch for Solaris 8, that fixes a lot in this area -
     15 seems recommended to use that as well)
     16 
     17 * Solaris uses the name 8859-1 in its tables rather than ISO8859-1 or
     18 ISO-8859-1.
     19 
     20 
     21 So what I've done is:
     22 
     23 1) make the following change to DriverManager/__info.c:
     24 
     25 diff __info.c __info.c.orig
     26 385c385
     27 <     char *asc[] = { "char", "ISO8859-1", "ISO-8859-1", "8859-1", "ASCII", NULL
     28  };
     29  ---
     30 
     31  >>     char *asc[] = { "char", "ISO8859-1", "ISO-8859-1", "ASCII", NULL };
     32 
     33  2) tell customers to apply the following Solaris patches:
     34 
     35  Solaris 7:
     36  Patch-ID# 112689-02
     37  Keywords: UTF-8 ICONV
     38  Synopsis: SunOS 5.7: UTF-8 locale ICONV patch
     39  Date: Aug/28/2002
     40 
     41  Solaris 8:
     42  Patch-ID# 113261-01
     43  Keywords: UTF-8 ICONV
     44  Synopsis: SunOS 5.8: UTF-8 locale ICONV patch
     45  Date: Oct/11/2002
     46 
     47  this has since been superceded by 11326-02, but I think unixODBC should
     48  function fine with 113261-01
     49 
     50  Patch-ID# 113261-02
     51  Keywords: UTF-8 ICONV
     52  Synopsis: SunOS 5.8: UTF-8 locale ICONV patch
     53  Date: Feb/21/2003"
     54 

README.VMS

      1 Building unixODBC on OpenVMS (Alpha only)
      2 =========================================
      3 
      4 Here's an initial go at building unixODBC on OpenVMS, at present this will 
      5 only run on alpha but if anyone requires use of this on VAX drop me an email
      6 (jason (a] easysoft.com) and I'll do the necessary transfer vector macro's to export 
      7 the required symbols from the two shared objects (ODBC.EXE and ODBCINST.EXE).
      8 
      9 Current components which have been built on OpenVMS
     10 
     11 LIBODBC.OLB 	   Driver manager as an OpenVMS static object library 	
     12 LIBODBCINST.OLB    ODBC installer / setup static object library
     13 LIBODBCPSQL.OLB    Postgres 6.5 driver static object library
     14 LIBODBC.EXE        Driver manager shareable image
     15 LIBODBCINST.EXE    ODBC installer / setup shareable image
     16 LIBODBCPSQL.EXE    Postgres 6.5 driver shareable image
     17 ISQL.EXE           Command line SQL tool
     18 DLTEST.EXE         Program to test loading shared libraries
     19 
     20 Additional components included to perform building on OpenVMS
     21 
     22 VMSBUILD.COM - DCL script which compiles, links and installs unixODBC
     23 [.EXTRAS]VMS.C  - Contains OpenVMS specific wrappers (dlopen, etc..)
     24 [.VMS]INSTALL_IMAGE.COM - DCL script to install shareable images 
     25 [.VMS]ODBCINST_AXP.OPT - Linker options file for ODBC installer shared image 
     26 [.VMS]ODBC_AXP.OPT - Linker options file for Driver manager shared image
     27 [.VMS]ODBC2_AXP.OPT - Linker options file for ODBC 2 drivers
     28 [.VMS]ODBC_SETUP.COM - DCL script to set up logicals and commands
     29 
     30 Building unixODBC on OpenVMS
     31 ============================
     32 
     33 After unpacking the archive, change into the unixodbc directory and perform
     34 the following functions.
     35 
     36 COMPILING
     37 
     38 $ @vmsbuild compile
     39 
     40 LINKING 
     41 
     42 $ @vmsbuild link
     43 
     44 COPYING SHARED LIBRARIES TO THEIR INSTALLED LOCATION
     45 
     46 Define the logical name ODBC_LIBDIR to point to wherever you would like the 
     47 libraries to reside and run the build procedure again with the "install" option 
     48 as in the following example:
     49 
     50 $ define ODBC_LIBDIR DISK$DBSTUFF:[ODBCLIB]  ! will be created if it doesn't exist
     51 $ @vmsbuild install
     52 
     53 If the ODBC_LIBDIR logical is not defined, it will be defined for you
     54 and a [.odbclib] directory will be created under the top level of the
     55 source directory.
     56 
     57 Note that the build procedure can be run in batch if you prefer.  It is
     58 also possible to specify ALL as the parameter and do the compile, link,
     59 and install in one fell swoop.  For example:
     60 
     61 $ submit/noprint/param=all vmsbuild.com
     62 
     63 Post-installation tasks
     64 ======================================
     65 
     66 To use the installed software, you need to run the command procedure
     67 ODBC_SETUP.COM, which will have been installed in the same directory as
     68 the libraries.  This procedure defines the ODBC_LIBDIR logical name and
     69 additional logical names that are needed for the image activator to
     70 locate the libraries.  It also defines the ISQL command.  Put a line
     71 similar to the following (with your own disk and directory
     72 specification) in your LOGIN.COM, or (to make the software available
     73 system-wide) in SYS$MANAGER:SYLOGIN.COM:
     74 
     75 $ @disk$dbstuff:[odbclib]odbc_setup
     76 
     77 N.B.  It may be tempting to simply dump the libraries into SYS$SHARE and
     78 depend on the image activator's default behavior to locate the images.
     79 That works, but it's the surest way to what is known on another popular
     80 platform as DLL hell.
     81 
     82 If you'll be programming with ODBC rather than just using ISQL, be sure
     83 to hang on to the contents of the [.include] and [.doc] directories. 
     84 Look at the compiler flags and link commands in vmsbuild.com for
     85 examples of what you need to do to build programs using the libraries.
     86 
     87 For performance reasons it may be desireable to install the libraries as
     88 known images (which has nothing to do with "install" in the sense of
     89 copying software to its target location).  See the documentation to the
     90 INSTALL command or use the command procedure [.vms]install_image.com
     91 provided with this kit.  Installing the images with privileges is not
     92 recommended unless there is a compelling reason (Hint: failure to set up
     93 file permissions properly on your .ini files is not a compelling
     94 reason).
     95 
     96 Locations of ODBC.INI and ODBCINST.INI
     97 ======================================
     98 
     99 After running the @VMSBUILD INSTALL command a blank odbc.ini and odbcinst.ini
    100 will be created in ODBC_LIBDIR. To override the default locations of the user 
    101 odbc.ini or the directory where the system odbc.ini and odbcinst.ini reside 
    102 define the following logicals.
    103 
    104 $ define/log ODBCINI "DKA100:[MYDIR.ODBC]ODBC.INI"
    105 $ define/log ODBCSYSINI "DKA100:[MYDIR.SYS]"
    106 
    107 Example Setup With Postgres 6.5
    108 ===============================
    109 
    110 ODBC_LIBDIR:ODBCINST.INI
    111 
    112 [PostgreSQL]
    113 Description = Postgres SQL Driver
    114 Driver      = LIBODBCPSQL
    115 Setup       =
    116 FileUsage   = 1
    117 
    118 ODBC_LIBDIR:ODBC.INI
    119 [Postgres]
    120 Description         = Test to Postgres
    121 Driver              = PostgreSQL
    122 Trace               = No
    123 Database            = sample
    124 Servername          = myserver.mydomain.com
    125 UserName            = postgres
    126 Password            = password
    127 Port                = 5432
    128 Protocol            = 6.4
    129 ReadOnly            = No
    130 RowVersioning       = No
    131 ShowSystemTables    = No
    132 ShowOidColumn       = No
    133 FakeOidIndex        = No
    134 ConnSettings        =
    135 
    136 Jason
    137 
    138 last updated 7-NOV-2002 by Craig A. Berry -- craigberry (a] mac.com
    139