Login Register Actian.com  

Actian Community Wiki

Navigation
Learn About
Developing With
Ingres Talk
Information
Toolbox

Building Ingres FAQ

From Ingres Community Wiki

Jump to: navigation, search

Building Ingres for Linux FAQ

Contents


Q: Where is the Building Ingres FAQ?

A. You're looking at it. You can get the latest copy from http://community.ingres.com/wiki/Building_Ingres_FAQ

Q: Where do I get the source code?

A. The easiest way to get Ingres source code is to pull it from Ingres' code repositories.

To get the latest code:

svn co http://code.ingres.com/ingres/main ~/ingres/server

OR, alternatively if you prefer git:

git clone http://github.com/ingres/Ingres.git ~/ingres/server

(either of these will create a copy of the latest code in ~/ingres/server)


You can also download a snapshot of the source code from The Ingres Community Products Download Page

Q: Where can I find the instructions for building Ingres on Linux?

A. When you untar the source tarball you'll find a file called INSTALL in the src directory. This file includes the instructions for building and installing Ingres on LINUX and UNIX

Q: Are OGC standard Geospatial features included with Ingres?

A. Yes, as of November 29, 2010, OGC compliant geospatial features are built into Ingres. They are not a plugin. As a result, there are a few additional prerequisites - the GEOS and Proj.4 libraries from OSGeo. See instructions on acquiring them.

Q: Is the source for Ingres VectorWise available?

A. No. Access to Ingres VectorWise source code is currently limited. We do have a research partnership program in which partners are granted access under special license terms.


Q: What are the prerequisites for building Ingres?

A. To unpack the archive, you'll need tar and gzip. Requirement which are included in the download itself are xerces 2.5 and pax. External requirements are:

  1. gcc (GNU C compiler)
  2. g++ (GNU C++ compiler)
  3. krb5-libs
  4. jam
  5. pkg-config
  6. gtk2 >= 2.4
  7. gtk2-devel >= 2.4
  8. pango-devel
  9. cairo-devel
  10. atk-devel
  11. xorg-x11-devel

Note that it is possible to remove the graphical installer build from the process, which eliminates all but the first three requirements:

--- ingres-9.2.0/src/front/st/specials_unix_vms/release.ccpp    2007-03-08 11:00:24.000000000 -0800
+++ ingres-9.2.0.new/src/front/st/specials_unix_vms/release.ccpp        2007-05-10 12:22:23.000000000 -0700
@@ -670,10 +670,10 @@
    PART raat
       DEFINITION raat.prt

-# ifdef LNX
+/* # ifdef LNX
    PART packman
       DEFINITION packman.prt
-# endif
+# endif */

Xerces Versions

Note that as of writing Ingres must build with Xerces-C 2.7, no other version will work. Many newer Linux distributions contain Xerces-C 2.8 or later. If you distribution does not make Xerces-C 2.7 available you will need to download it from the Apache archive site here and build it from source:

http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_7_0/

The built libraries should be placed in a directory named "xerces-c-src_2_7_0" under the root of the Ingres source tree ($ING_ROOT). To make life easier you should extract the above downloaded archive into that location and build it there.

There are some reports of build success (on Linux) with Xerces-C 2.8 on 32 bit ONLY. However this has yet to be tested and 64 bit platforms are known to have problems with Xerces-C 2.8. This is hopefully a minor/small project for someone to work on.

Ingres has been built 64bit with Xerces 3.0 on Mac OS/X. It was necessary to build a 64 bit version of Ingres and 3.0 was the first Xerces that was 64 bit capable on OS/X. There are basically 3 change items using Xerces 3.0.

  • Minor library name change: libxerces-c-3.0.dylib instead of libxerces-c.3.0.dylib
  • Changing certain "unsigned int" occurrences to XMLSize_t
  • Adding DARWIN to #if where LINUX is present

See http://community.ingres.com/w/files/4/46/MacOSX-Xerces3.0-Svndiff.txt for an "svn diff" example of changes against the community SVN repository. You can contact daryl.monge@ingres.com about Mac ports or using Xerces 3.0.

Note for Ubuntu users

Ubuntu Linux from 8.0 onwards links the bourne shell to "dash", you can see this if you run "ls -l /bin/sh". "dash" is a lightweight shell that does not fully support all bourne shell syntax; some bourne shell syntax used in the Ingres scrips will not work in "dash"; More information is available in Building_ingres_on_ubuntu, the suggestion below of clobbering settings is NOT recommended.....

Ubuntu users may wish to re-link "sh" to "bash". Also, on some Ubuntu distributions the program "basename" is not found in /bin, but in /usr/bin; the Ingres scripts (as of 30 July 2009) expect it to be in /bin, so it could be linked there. As root you could:

(as root)
rm /bin/sh
ln -s /bin/bash /bin/sh
ln -s /usr/bin/basename /bin/basename

Q: What compiler versions are supported?

A. As of Ingres 9.3, gcc 3.4 has been tested and is used to create production Ingres builds. gcc versions 4.1.2 and 4.2.1 have been used successfully in the community for x86_64 builds.

WARNING -- gcc 4.x versions must use -O as the optimization level, not -O2. If -O2 is used, you must also include the -fwrapv and -fno-strict-aliasing flags in the compile string.

gcc version 4.3 will only build revisions later than svn revision 1910. Earlier code will build, but will fail the QA tests in numerous ways. Also the Ubuntu default -D_FORTIFY_SOURCE=2 will cause run-time buffer overflow errors with Ingres programs.

Ubuntu users see this site:

https://wiki.ubuntu.com/CompilerFlags

If you are running Ubuntu, it is advised that you use Synaptic to get the down-rev gcc 3.4, which is available on Ubuntu 8.1 (and possibly others). This will not remove gcc 4.3, and simply places the program gcc-3.4 in /usr/bin. Having obtained gcc 3.4, you should either fix the Jamfile.int_lnx in src/tools/port/jam to use this version of gcc, or you can re-link gcc as root using

(as root)
cd /usr/bin
rm gcc
ln -s gcc-3.4 gcc

Q: Building on Linux 64 bit?

By default Ingres tries to do a hybrid build which includes 32bit support libraries. If you're running a 64 bit system and don't have any requirements for a 32 bit Ingres then you should build a pure 64 bit version of Ingres. To accomplish this make the following change to src/tools/port/conf/VERS.a64_lnx or more preferably you can copy VERS.a64_lnx to VERS in the same directory and do this change

 # Hybridization...
 # a64_lnx normally builds reverse hybrid
-BUILD_ARCH = "64+32" ;	#set: arch 64+32
+BUILD_ARCH = "64" ;	#set: arch 64
 XERCES_ARCH ?= 64 ;
 
 PAX_CHECK = TRUE ;

Notice that #set: arch 64+32 was also changed, this is important otherwise buildrel and the install will fail.

(More questions and answers as I get them ...)

Personal tools
© 2011 Actian Corporation. All Rights Reserved