Building Open Grid Scheduler on CentOS/RHEL 6.2

Contents

Background & Disclaimer

This blog page attempts to clean up and organize the scattered notes I maintain on how to build Grid Engine on various platforms. This post in particular is talking about Open Grid Scheduler version 2011.11 as built on CentOS 6.2 (a binary clone of RedHat Enterprise Linux RHEL 6.2).

First round of notes will cover building on x86-64 but I’ll also try to document the same process for building 32bit executables as well.

Another reason for this document is that many of the online instructions for building Grid Engine take the “easy” way out by skipping the compilation of various features, services and subsystems. In particular I don’t like refusing to compile with Java just because it’s easier and I actually like having the java-based GUI installer present on my systems.

Skipped Build Items

The primary goal is to build as much of Grid Engine as possible. At this stage, the only things we are skipping are:
•    ARCo
•    sgeinspect binary
•    Hadoop/Herd integration

Every other feature, service and 3rd party executable should be covered.

Differences between 6.2 and prior versions of CentOS and RHEL

The primary difference is that our 6.2 OS includes an updated version of OpenSSL that breaks Grid Engine compilation. This document covers the patch necessary to complete the build on RHEL 6.2 and CentOS 6.2.

Build Environment

Unless stated otherwise, assume that the build environment is a bare-bones CentOS 6.2 machine where I’ll be building SGE as user “root” and installing many of the external dependencies into /opt/

Required Linux OS Packages

I started with a stripped down bare-bones CentOS 6.2 VM and had to install the following distro packages. I can’t claim 100% that these are all the RPMs you will need but it’s probably fairly comprehensive:

$ sudo yum -y install "openmotif openmotif-devel openmotif22 openssl-devel openssl-static make gcc \
autoconf pam-devel libXpm  libXpm-devel ncurses ncurses-devel unzip texinfo"

Download Open Grid Scheduler 2011.11

From the website: The 2011.11 release includes new features (e.g. Berkeley DB spooling improvement: removed dependency on NFSv4, hwloc support, GPU integration, ARM Linux port, gmake upgrade, Linux 3.0 support, etc), together with other enhancements and bug fixes.

See the release notes for more info!

# mkdir /opt/opengridscheduler-src
# cd /opt/opengridscheduler-src
# wget http://sourceforge.net/projects/gridscheduler/files/GE2011.11/GE2011.11.tar.gz/download?use_mirror=superb-sea2
# zcat GE2011.11.tar.gz | tar xvf -

Download & Install External Dependencies

There are a ton of them. Have patience.

Java, $JAVA_HOME and $PATH alterations

Visit http://www.oracle.com/technetwork/java/javase/downloads/index.html and grab a Java JDK. I used JDK 7u2 for x86-64 and selected the .tar.gz version for download.

# cd /opt/
# gunzip jdk-7u2-linux-x64.tar.gz
# tar xvf jdk-7u2-linux-x64.tar
# ln -s jdk1.7.0_02/ java

By making a symbolic link between /opt/jdk1.7.0_02 and /opt/java we can more easily set $JAVA_HOME to something convenient like “$JAVA_HOME=/opt/java”.

We need to set some environment variables and PATH settings next. I chose to do this by making an /etc/profile.d/sge-build.sh entry with the following contents. How you set your path and environment variables depends on your personal preference and what shell you use. Note that the sge-build.sh file also includes info about Java ANT  and JUNIT .jar files that will be installed later on.

## Java
export JAVA_HOME=/opt/java
export ANT_HOME=/opt/ant
export CLASSPATH=/opt/junit/junit3.8.1/junit.jar:/opt/ant/lib/ant.jar
export JUNIT_JAR=/opt/junit/junit3.8.1/junit.jar

 ## Path Tweaking
export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin

ANT

Visit http://ant.apache.org/index.html and grab Apache Ant. The version used in this document is 1.8.2.

# cd /opt/
# gunzip apache-ant-1.8.2-bin.tar.gz
# tar xvf apache-ant-1.8.2-bin.tar
# ln -s apache-ant-1.8.2 ant

JUNIT

This is another dependency of the various Java bits within Grid Engine, in this case I’m using junit-3.8.1:

# cd /opt/
# mkdir junit
# cd /opt/junit/
# wget http://downloads.sourceforge.net/project/junit/junit/3.8.1/junit3.8.1.zip?use_mirror=superb-sea2
# unzip junit3.8.1.zip

We will need to reference the location of junit.jar in CLASSPATH and a few other locations, those are documented elsewhere on this page.

JavaCC

This is another dependency of the various Java bits within Grid Engine, this time from http://javacc.java.net/:

# cd /opt/
# mkdir other-sge-deps
# mkdir other-sge-deps/java
# cd /opt/other-sge-deps/java/
# wget http://java.net/projects/javacc/downloads/download/javacc-5.0.tar.gz
# gunzip javacc-5.0.tar.gz
# tar xvf javacc-5.0.tar

The configuration parameters that point to javacc are documented elsewhere on this page, the primary setting is within the build.properties file in the source directory.

IzPack 1.4.4

We need IZpack which is apparently a nice cross-platform Java tool for bundling application installers. I think,  but am not 100% sure, that this dependency is required to build the graphical SGE GUI installer.

There is one small problem though. My working build environment seems to explicitly use an ancient version of IzPack that is not even available for download any more on the http://izpack.org/downloads/ website. Given that my build environment works with version 1.4.4 and I seem to also have much more modern versions laying around in “_disabled/” folders I’m guessing that SGE has a dependency on this specific (and old) version.

For convenience  I’ve uploaded version 1.4.4 here for others to use if needed:  http://bioteam.net/wp-content/uploads/misc/Izpack-1.4.4.tar.gz

# cd /opt/
# wget  http://bioteam.net/wp-content/uploads/misc/Izpack-1.4.4.tar.gz
# gunzip Izpack-1.4.4.tar.gz
# tar xvf Izpack-1.4.4.tar

The specific places where we mention the Izpack location in the SGE build & config files is highlighted elsewhere on this page.

BerkeleyDB version 4.4.20

It’s actually important to use this (old) version of BerkeleyDB. It’s the last version that supports RPC spooling to a remote BDB database and the SGE build process assumes that this functionality is present. In addition, there have been some indications on the mailing list that internal use of BDB for berkeley-db based spooling also assumes behavior and technical features associated with the older versions of the code.

Visit http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html and follow the link to “Previous Releases” where you can find the 4.4.20 version.

You will see below that we are building with “–enable-rpc” and installing into /opt/berkeley-db/ which is where the BDB bin/ and lib/ directories will end up.

# mkdir /opt/berkeley-db
# mv db-4.4.20.tar.gz berkeley-db/
# cd berkeley-db/
# gunzip -c db-4.4.20.tar.gz | tar xvf -
# cd db-4.4.20
# cd build_unix
# ../dist/configure --prefix=/opt/berkeley-db/ --enable-rpc
# make
# make install

Patch Grid Engine 2011.11 Source to support OpenSSL-1.0.0

If you see this error, you are hitting an issue with openssl-1.0 on your system:

You can see the bug report and patch at this URL:  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622849 and you can download the actual patch via this URL:  http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=622849-openssl.patch;att=1;bug=622849

Place the patch file one level above the GE2011.11 source/ folder:

[root@grunt GE2011.11]# ls -l
total 1140
-rw-r--r--.  1 root root    6763 Jan 12 14:38 622849-openssl.patch
-rw-rw-r--.  1 dag  dag     5403 Nov 14 14:01 Changelog
-rw-rw-r--.  1 dag  dag  1121679 Nov 14 14:01 Changelog.SGE
drwxrwxr-x.  7 dag  dag     4096 Nov 14 14:02 doc
drwxrwxr-x.  2 dag  dag    20480 Nov 14 14:02 review
drwxrwxr-x. 12 dag  dag     4096 Jan 12 14:30 source

Now patch the actual ./source/libs/comm/cl_ssl_framework.c file …

[root@grunt GE2011.11]#  patch -p1 < 622849-openssl.patch
patching file source/libs/comm/cl_ssl_framework.c
[root@grunt GE2011.11]#

 

Customize the aimk.site file

The local file aimk.site file contains site-specific information about where your external dependencies are installed.

My current aimk.site has the following customizations (note that the info below is not the entire file, just the lines that I have added or changed..

Berkely-DB settings in aimk.site:

# BERKELEYDB_HOME the directory where the include and lib directory of
# Berkeley DB is installed
#
set BERKELEYDB_HOME = /opt/berkeley-db/
set BDB_INCLUDE_SUBDIR =
set BDB_LIB_SUBDIR =
set BDB_LIB_SUFFIX =

OpenSSL settings in aimk.site:

## dag (set values for openssl libs and include files)
set OPENSSL_SOVERSION = 1.0.0-10
set OPENSSL_HOME = /usr
set OPENSSL_LIB_DIR = /usr/lib64
set OPENSSL_EXTRA_LIBS = "-lkrb5 -lz "

JUNIT settings in aimk.site:

set JUNIT_JAR = '/opt/junit/junit3.8.1/junit.jar'

Customize the build.properties file

This file is where we set parameters related to the building of the java componants

JUNIT edits:

# junit jar file classpath
libs.junit.classpath=/opt/junit/junit3.8.1/junit.jar

JavaCC edits:

javacc.home=/opt/other-sge-deps/java/javacc-5.0

Customize the ./clients/gui-installer/nbproject/project.properties file

Yeah there is probably a better or cleaner way to do this but I found I had to edit the clients/gui-installer/nbproject/project.properties file in order to fix some issues with finding a certain iZpack/ant.jar file and the Java SWING layout stuff. Here are my changes

SWING edits in project.properties:

#Swing layout
#libs.swing-layout.classpath=${izpack.home}/../swing-layout-1.0.3.jar
libs.swing-layout.classpath=${izpack.home}/swing-layout-1.0.3.jar

ANT edits in project.properties:

#Ant
#libs.ant.classpath=${izpack.home}/../ant.jar
libs.ant.classpath=/opt/Izpack-1.4.4/ant.jar

Hack up the aimk build file

Note: We are really not supposed to be doing this but it’s rare that I’m able to get through an SGE build without making minor alterations to the actual “aimk” compile script. This is where we can also get into personal preferences about how to build software so your own experience may be different,

Here are my edits…

I’m pretty sure this edit is meant to get around the fact that our libcrypto OpenSSL files are in “/usr/lib64″ instead of “/usr/lib” and the KFLAGS additions are meant to proactively avoid a new and different compile error that I forgot to document in my notes …

Near line #370 in ./aimk:

#set SECLIBS_STATIC    = "$OPENSSL_HOME/lib/libssl.a $OPENSSL_HOME/lib/libcrypto.a"                                                     
#set KLFLAGS           = "-L$OPENSSL_HOME/lib"                                                                                          
set SECLIBS_STATIC    = "$OPENSSL_HOME/lib64/libssl.a $OPENSSL_HOME/lib64/libcrypto.a"
set KLFLAGS           = "-L$OPENSSL_HOME/lib64 -lkrb5 -lz"

This next edit I believe is required to let the ‘qtcsh’ binary build properly, it complains unless we add “-ltermcap” …

Near line #3043 in ./aimk:

# Dag hack for qtcsh on CentOS 6.2 ...                                                                                                                      
# set SGE_LIBS = "-lsge -lpthread"                                                                                                                        
set SGE_LIBS = "-lsge -lpthread -ltermcap"

Build Grid Engine from Source

Whew! Now that all the pre-requisites, patching and hacking is done Grid Engine should ideally build smoothly from scratch at this point.

Refer to the README.build and README.aimk text files if needed. The commands that follow are taken straight from the build docs.

 Prepwork

# ./aimk -only-depend
# scripts/zerodepend
# ./aimk depend

 Build binaries & manpages

# ./aimk
# ./aimk -man

Hack up the scripts/distinst binary staging script

The “distinst” script is used to stage the newly built binaries into a location where the “mk_dist” script can finally start building .tar.gz archives for distribution. We need to make a few edits to it first …

Edit Line #718 of scripts/distinst & set insthadoop=false to prevent failure due to missing “herd.jar”:

insthadoop=false

Edit near line #1551 to fix location of the libcrypto.so.1.0.0 file (it’s looking in lib/ instead of lib64/ )

Note the two separate edits where we make changes from “lib” to “lib64/” below …

  elif [ -f $OPENSSLBASE/lib64/$libname ]; then
    #libname=$OPENSSLBASE/lib/$libname                                                                                                        
    libname=$OPENSSLBASE/lib64/$libname
  fi

Edit the scripts/distinst.site configuration file

We need to configure some values here to fix some OpenSSL and Berkeley-DB values.

# Base directory where the openssl binary and libraries reside
OPENSSLSOVERSION=1.0.0
OPENSSLBASE=/usr/

# Base directory where BDB resides
BERKELEYDBBASE=/opt/berkeley-db/

Stage the distribution binaries by running the scripts/distinst script

I decided my staging location was going to be “/opt/opengridscheduler-src/distinst-base/” so first we do:

# mkdir /opt/opengridscheduler-src/distinst-base/

And now we can actually run the distribution staging script!

# ./scripts/distinst -v -allall -bin -libs -basedir /opt/opengridscheduler-src/distinst-base/ -vdir GE2011.11

 

Build Grid Engine binary distribution archives

Now we can actually build distributable Grid Engine archives. The documentation recommends a symbolic link be placed inside your distinst “basedir” that points back to the “mk_dist” script:

# ln -s /opt/opengridscheduler-src/GE2011.11/source/scripts/mk_dist /opt/opengridscheduler-src/distinst-base/mk_dist
# cd /opt/opengridscheduler-src/distinst-base
And now we can actually run the command:
# ./mk_dist -vdir GE2011.11 -version GE2011.11 -common -doc -bin linux-x64

Check /tmp/sge6_dist/ for the new archives

Never had time to track down, change or care about this but by default it seems that “mk_dist” is placing our new binaries into /tmp/sge6_dist/ …

If things actually worked you should see something like this:

[root@grunt distinst-base]# ls -l /tmp/sge6_dist/
total 30384
-rw-r--r--. 1 root root 28162103 Jan 12 17:31 ge-GE2011.11-bin-linux-x64.tar.gz
-rw-r--r--. 1 root root  2946660 Jan 12 17:31 ge-GE2011.11-common.tar.gz
[root@grunt distinst-base]#
[root@grunt distinst-base]#

… and these are the standard “courtesy binary” archives that many of us are long familiar with.

 

 

 

 

 

 

 

 

Filed Under: Employee PostsTech Notes

Tags:

About the Author

Chris is an infrastructure geek specializing in the applied use of IT to enable and enhance scientific research in life science informatics environments.

Comments (26)

Trackback URL | Comments RSS Feed

  1. Chris Schooley says:

    Excellent. I was finally able to build after struggling with this bear of a build. Thank you so much for the meticulously crafted and very valuable steps.

    I did have problems initially building the installer after following the above because I needed to edit the build.properties file to have izpack.home point to the /opt/Izpack-1.4.4 used above. I might missed that step if it was listed.

    Thank you so much. Now I can go do what I was *supposed* to do this week.

  2. Eric Christensen says:

    Hey Chris! Nice write-up! Thanks!!!! I guess I now need to update my build process since you’ve handled a couple things that I never got around to (notably the Java bits).

  3. Yanming says:

    Got errors:
    At RHEL 6.2, following the instructions carefully. Prepwork Run
    # ./aimk depend

    got error:
    _____Making JAVA targets_____
    Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

    Any suggestions?
    Thanks!

    • bioteam says:

      Is apache Ant installed? The java ‘ant’ binary also needs to be in the system path…

    • Seongsu Yun says:

      Your problem is ant.jar file location ERROR.

      Edit the “(source location)/source/clients/gui-installer/nbproject/project.properties”

      section
      #Ant
      libs.ant.classpath=${izpack.home}/../ant.jar <– edit

      Also check swing-layout location.
      #Swing layout
      libs.swing-layout.classpath=${izpack.home}/../swing-layout-1.0.3.jar <– edit

      • I am getting the same error but have edited the file as follows:
        diff project.properties project.properties.original_011314
        12c12
        libs.swing-layout.classpath=${izpack.home}/../swing-layout-1.0.3.jar
        16c16
        libs.ant.classpath=${izpack.home}/../ant.jar

        Furthermore, I have the following env vars set:

        ANT_HOME=/opt/ant
        PATH=/opt/java/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/java/bin:/opt/ant/bin
        JAVA_HOME=/opt/java
        CLASSPATH=/opt/junit/junit3.8.1/junit.jar:/opt/ant/lib/ant.jar
        JUNIT_JAR=/opt/junit/junit3.8.1/junit.jar

        Can you suggest anything. Thanks!

    • jlopez says:

      Just for reference to anyone else experiencing the same problem. I got this error even when using the -no-gui-inst flag, the actual reason was a conflict with the system’s ant version.

      So just check which ant you are using and if it points to /usr/bin/ant then you are using the wrong ant version.

      The easiest is just to uninstall the OS ant version.

  4. Jason Neiss says:

    Two comments:

    1) In ./source/build.properties, line 120, izpack.home needs to be changed to:

    izpack.home=/opt/Izpack-1.4.4

    2) The location for the binary distribution archives (very last step) is set in ./source/scripts/mk_dist at line 38:

    BASEDIR=/tmp/sge6_dist

    Great instructions! I’d have never gotten through without them!

  5. Jochen Rath says:

    Thank you for your instructions.
    But for me, it wasn’t sufficient to modify the “./clients/gui-installer/nbproject/project.properties”

    I had to replace the izpack.home in build.properties to be able, to compile the Open Grid Scheduler
    izpack.home=/opt/Izpack-1.4.4

  6. martijn says:

    Great writeup ! Had been struggling for some hours and this post saved my day.
    Just wanted to share two minor modifications:
    * As chris said, you need to add the adjust the izpack.home var in build.properties
    * Leave out the “-v” option when calling distint. It will add some rogue lines at the head of generated scripts [the calls to Execute starting around line 833 also echo the command line to the output file]

  7. Dale Hamel says:

    Hey everyone! If anyone would like to install Open Grid Scheduler on Gentoo you can use the ebuild that I made.

    It is available in my public overlay on github at https://github.com/dalehamel/gentoo-overlay/blob/master/sys-cluster/GE/GE-2011.11.ebuild

  8. Seongsu Yun says:

    I rellay thanks for yor post that how to install OGS/GE!!!!

    I have had many problems until compiling the cords.

    This article must will be posted the OGS/GE home page.

  9. MichaelJSeo says:

    Just built on CentOS 6.3. Very good instructions. It would’ve ran without a hitch if I read Chris Schooley’s comment.

    • Manuel says:

      Built on CentOS 6.0 after reading this comment and then the comment from Chris Schooley without a problem :D.
      Thank you so much for this. Would have never tried it or already given up without this instructions.

  10. skrish says:

    when I do ./aimk from the source directory , it does few things and throws the follwing error.
    gcc -DSGE_ARCH_STRING=\”linux-x64\” -O3 -Wall -Wstrict-prototypes -DUSE_POLL -DLINUX -DLINUXX64 -DLINUXX64 -D_GNU_SOURCE -DGETHOSTBYNAME_R6 -DGETHOSTBYADDR_R8 -DHAS_VSNPRINTF -DHAS_IN_PORT_T -DLOAD_OPENSSL -I/opt/berkeley-db//include/ -DTARGET_64BIT -DSPOOLING_dynamic -DSECURE -I/usr/include -Wno-strict-aliasing -DCOMPILE_DC -D__SGE_COMPILE_WITH_GETTEXT__ -D__SGE_NO_USERMAPPING__ -DTHREADBINDING -DHWLOC -I../common -I../libs -I../libs/uti -I../libs/juti -I../libs/gdi -I../libs/japi -I../libs/sgeobj -I../libs/cull -I../libs/rmon -I../libs/comm -I../libs/comm/lists -I../libs/sched -I../libs/evc -I../libs/evm -I../libs/mir -I../libs/lck -I../daemons/common -I../daemons/qmaster -I../daemons/execd -I../daemons/schedd -I../clients/common -I. -I/opt/java//include -I/opt/java//include/linux -I/opt/opengridscheduler-src/GE2011.11/source/3rdparty/hwloc/hwloc-1.2.2/include/ -I/opt/opengridscheduler-src/GE2011.11/source/3rdparty/hwloc/hwloc-1.2.2/LINUXX64/include -Wno-strict-prototypes -fPIC -c ../libs/comm/cl_ssl_framework.c
    ../libs/comm/cl_ssl_framework.c:238: warning: type defaults to âintâ in declaration of âSTACKâ
    ../libs/comm/cl_ssl_framework.c:238: error: expected â;â, â,â or â)â before â*â token
    ../libs/comm/cl_ssl_framework.c:239: warning: type defaults to âintâ in declaration of âSTACKâ
    ../libs/comm/cl_ssl_framework.c:239: error: expected â;â, â,â or â)â before â*â token
    ../libs/comm/cl_ssl_framework.c: In function âcl_com_ssl_destroy_symbol_tableâ:
    ../libs/comm/cl_ssl_framework.c:996: error: âcl_com_ssl_func__sk_numâ undeclared (first use in this function)
    ../libs/comm/cl_ssl_framework.c:996: error: (Each undeclared identifier is reported only once
    ../libs/comm/cl_ssl_framework.c:996: error: for each function it appears in.)
    ../libs/comm/cl_ssl_framework.c:997: error: âcl_com_ssl_func__sk_valueâ undeclared (first use in this function)
    ../libs/comm/cl_ssl_framework.c: In function âcl_com_ssl_build_symbol_tableâ:
    ../libs/comm/cl_ssl_framework.c:1703: error: âcl_com_ssl_func__sk_numâ undeclared (first use in this function)
    ../libs/comm/cl_ssl_framework.c:1703: warning: type defaults to âintâ in declaration of âSTACKâ
    ../libs/comm/cl_ssl_framework.c:1703: error: expected â;â, â,â or â)â before â*â token
    ../libs/comm/cl_ssl_framework.c:1703: error: expected â;â before âdlsymâ
    ../libs/comm/cl_ssl_framework.c:1710: error: âcl_com_ssl_func__sk_valueâ undeclared (first use in this function)
    ../libs/comm/cl_ssl_framework.c:1710: warning: type defaults to âintâ in declaration of âSTACKâ
    ../libs/comm/cl_ssl_framework.c:1710: error: expected â;â, â,â or â)â before â*â token
    ../libs/comm/cl_ssl_framework.c:1710: error: expected â;â before âdlsymâ
    make: *** [cl_ssl_framework.o] Error 1

    can you pls help out?
    thanks

    • skrish says:

      I try build open grid GE2011.11 on centos-6.3 . The above errors i got after all configuration followed as per the Doc.

  11. Jacques says:

    Whaou ! How many times did I spend to try to compile SGE? I lost my count. And suddenly I found your page. I will print it and put it on a frame above my bed !

    Thank you very much for your clear instructions.

    I confirm that it work perfectly on a centos 6.4 too.

    Jacques

  12. Damien says:

    Hi, I’m trying to install SGE.
    I’ve patched the cl_ssl_framework.c but I still have the error message mentioned before applying the patch.
    Any hint?
    Anyway, great how to, it helped a lot.

    Thanks.

  13. Joe says:

    I am receiving this error when trying to build the binaries.

    In file included from ../libs/spool/berkeleydb/sge_bdb.h:41,
    from ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:69:
    ../libs/spool/berkeleydb/sge_bdb_types.h:38:16: error: db.h: No such file or directory
    In file included from ../libs/spool/berkeleydb/sge_bdb.h:41,
    from ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:69:
    ../libs/spool/berkeleydb/sge_bdb_types.h:82: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
    ../libs/spool/berkeleydb/sge_bdb_types.h:85: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
    ../libs/spool/berkeleydb/sge_bdb_types.h:88: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
    ../libs/spool/berkeleydb/sge_bdb_types.h:101: error: expected declaration specifiers or â…â before âDB_ENVâ
    ../libs/spool/berkeleydb/sge_bdb_types.h:104: error: expected declaration specifiers or â…â before âDBâ
    ../libs/spool/berkeleydb/sge_bdb_types.h:107: error: expected declaration specifiers or â…â before âDB_TXNâ
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c: In function âspool_berkeleydb_default_write_funcâ:
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: error: âDB_TXNâ undeclared (first use in this function)
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: error: (Each undeclared identifier is reported only once
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: error: for each function it appears in.)
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: error: âtxnâ undeclared (first use in this function)
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: warning: implicit declaration of function âbdb_get_txnâ
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c: In function âspool_berkeleydb_default_delete_funcâ:
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:1131: error: âDB_TXNâ undeclared (first use in this function)
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:1131: error: âtxnâ undeclared (first use in this function)
    make: *** [sge_spooling_berkeleydb.o] Error 1
    not done

    Any ideas?

  14. AshRetallack says:

    Hi, I’m having issues trying to build with shared-libraries.

    I’m getting the same error mentioned here: http://markmail.org/thread/3iyyqwg7piamgoab#query:+page:1+mid:3iyyqwg7piamgoab+state:results

    It mentions here that it was marked as in issue with using -no-secure,

    however I am not using that flag. Here is the command line I am using after setting the config as you have mentioned.

    ./aimk -spool-classic -no-gui-inst -only-depend
    ./scripts/zerodepend
    ./aimk -spool-classic -no-gui-inst depend
    ./aimk -spool-classic -no-gui-inst -shared-libs

    and the error:

    **snip**
    gcc -DSGE_ARCH_STRING=\”linux-x64\” -O3 -Wall -Wstrict-prototypes -DUSE_POLL -DLINUX -DLINUX_NATIVE -DLINUXX64 -DLINUXX64 -D_GNU_SOURCE -DGETHOSTBYNAME_R6 -DGETHOSTBYADDR_R8 -DHAS_VSNPRINTF -DLOAD_OPENSSL -I/build/berkeleydb/include/ -DTARGET_64BIT -DSPOOLING_classic -DSECURE -I/usr/include -DCOMPILE_DC -D__SGE_COMPILE_WITH_GETTEXT__ -D__SGE_NO_USERMAPPING__ -DTHREADBINDING -DHWLOC -I../common -I../libs -I../libs/uti -I../libs/juti -I../libs/gdi -I../libs/japi -I../libs/sgeobj -I../libs/cull -I../libs/rmon -I../libs/comm -I../libs/comm/lists -I../libs/sched -I../libs/evc -I../libs/evm -I../libs/mir -I../libs/lck -I../daemons/common -I../daemons/qmaster -I../daemons/execd -I../clients/common -I. -I/net/pinot/disk1/playpen/dev/OpenGridScheduler/3rdparty/jdk1.6.0_39/include -I/net/pinot/disk1/playpen/dev/OpenGridScheduler/3rdparty/jdk1.6.0_39/include/linux -I/net/pinot/disk1/playpen/dev/OpenGridScheduler/BB_GridEngine/source/3rdparty/hwloc/hwloc-1.2.2/include/ -I/net/pinot/disk1/playpen/dev/OpenGridScheduler/BB_GridEngine/source/3rdparty/hwloc/hwloc-1.2.2/LINUXX64/include -o test_sge_object -L/build/berkeleydb/lib/ -L. -rdynamic -Wl,-rpath,\$ORIGIN/../../lib/linux-x64 -L/usr/lib64 -lkrb5 -lz test_sge_object.o libsgeobj.so libsgeobjd.so libcull.so libcomm.so libcommlists.so libuti.so librmon.so -ldl liblck.so -L/net/pinot/disk1/playpen/dev/OpenGridScheduler/BB_GridEngine/source/3rdparty/hwloc/hwloc-1.2.2/LINUXX64/src/.libs/ -lhwloc -ljemalloc -lm -lpthread
    libsgeobjd.so: undefined reference to `GE_SHORTNAME’
    libsgeobjd.so: undefined reference to `GDI_VERSION’
    libsgeobj.so: undefined reference to `sge_gdi2_send_any_request’
    libsgeobjd.so: undefined reference to `GE_LONGNAME’
    collect2: ld returned 1 exit status
    make: *** [test_sge_object] Error 1

  15. Matt Denny says:

    I am having the same Berkeley DB problem as JOE, any help would be greatly appreciated!

    when I run ./aimk file I get the following error:

    In file included from ../libs/spool/berkeleydb/sge_bdb.h:41,
    from ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:69:
    ../libs/spool/berkeleydb/sge_bdb_types.h:38:16: error: db.h: No such file or directory
    In file included from ../libs/spool/berkeleydb/sge_bdb.h:41,
    from ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:69:
    ../libs/spool/berkeleydb/sge_bdb_types.h:82: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    ../libs/spool/berkeleydb/sge_bdb_types.h:85: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    ../libs/spool/berkeleydb/sge_bdb_types.h:88: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    ../libs/spool/berkeleydb/sge_bdb_types.h:101: error: expected declaration specifiers or ‘…’ before ‘DB_ENV’
    ../libs/spool/berkeleydb/sge_bdb_types.h:104: error: expected declaration specifiers or ‘…’ before ‘DB’
    ../libs/spool/berkeleydb/sge_bdb_types.h:107: error: expected declaration specifiers or ‘…’ before ‘DB_TXN’
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c: In function ‘spool_berkeleydb_default_write_func’:
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: error: ‘DB_TXN’ undeclared (first use in this function)
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: error: (Each undeclared identifier is reported only once
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: error: for each function it appears in.)
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: error: ‘txn’ undeclared (first use in this function)
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:973: warning: implicit declaration of function ‘bdb_get_txn’
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c: In function ‘spool_berkeleydb_default_delete_func’:
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:1131: error: ‘DB_TXN’ undeclared (first use in this function)
    ../libs/spool/berkeleydb/sge_spooling_berkeleydb.c:1131: error: ‘txn’ undeclared (first use in this function)
    make: *** [sge_spooling_berkeleydb.o] Error 1
    not done

  16. Anupam says:

    Hi,

    I am trying to compile and build SGE6.2 from source on RHEL 6.0 with the following options

    -no-java -no jni -no-gui-inst -no-secure -no-qmon -spool-classic ()

    The compilation went all fine. Next with

    scripts/distint -all -local -noexit option, somehow I could make it through, though were were failed commands.

    But during installation of ./install_qmaster (-local), it says

    ******************************************************************

    missing program > …… ./bin/lx26-amd64 …… ./bin/lx26-amd64./bin/lx26-amd64./utilbin/lx26-amd64< should be:
    .
    .
    .
    opensssl
    .
    .

    Installation failed. Exit.

    ******************************************************

    I found that I haven't during compilation I had excluded qmon, openssl. However, they are being checked during installation. Is there any way to skip the same of all the packages that are not intended to be installed (perhaps from dist/util/install_modules/inst_common.sh) ?

    Thanks in advance

    Anupam

  17. Jerry Lee says:

    I followed the instruction and when I reach the ./aimk, I got the follow error messages on java. Any ideas?

    /opt/opengridscheduler-src/GE2011.11p1/source/libs/jgdi/cullconv/build.xml:26: warning: ‘includeantruntime’ was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [java] [java] [javac] Compiling 50 source files to /opt/opengridscheduler-src/GE2011.11p1/source/libs/jgdi/cullconv/build/classes
    [java] [java] [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
    [java] [java] [javac] /opt/opengridscheduler-src/GE2011.11p1/source/libs/jgdi/cullconv/build/gensrc/com/sun/grid/cull/CullTokenManager.java:1968: error: cannot find symbol
    [java] [java] [javac] default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
    [java] [java] [javac] ^
    [java] [java] [javac] symbol: variable i1
    [java] [java] [javac] location: class CullTokenManager
    [java] [java] [javac] /opt/opengridscheduler-src/GE2011.11p1/source/libs/jgdi/cullconv/build/gensrc/com/sun/grid/cull/CullTokenManager.java:1968: error: cannot find symbol
    [java] [java] [javac] default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
    [java] [java] [javac] ^
    [java] [java] [javac] symbol: variable l1
    [java] [java] [javac] location: class CullTokenManager
    [java] [java] [javac] /opt/opengridscheduler-src/GE2011.11p1/source/libs/jgdi/cullconv/build/gensrc/com/sun/grid/cull/SimpleCharStream.java:476: error: non-static variable this cannot be referenced from a static context
    [java] [java] [javac] static void setTrackLineColumn(boolean trackLineColumn) { this.trackLineColumn = trackLineColumn; }
    [java] [java] [javac] ^
    [java] [java] [javac] Note: Some input files use unchecked or unsafe operations.
    [java] [java] [javac] Note: Recompile with -Xlint:unchecked for details.

  18. Brian says:

    Thank you very much for posting this information on the network.
    It was invaluable to what I had to do. I appreciate your effort.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.