Difference between revisions of "ConfigureSUSE"

From OPeNDAP Documentation
(Initial configuration)
Line 116: Line 116:
I reverted to compiling against SZIP and moved on...
I reverted to compiling against SZIP and moved on...
==== RPM Construction Tools ====
==== RPM Construction Tools ====

Revision as of 01:17, 2 May 2012

<< back to HowTo Guides

1 How to configure SUSE for the production of RPM binaries

This describes how to set up a vanilla SUSE computer so that we can build RPM binaries for the Hyrax data server. This was taken from notes describing how I configured a machine with a fresh install of SUSE 12.1to build Hyrax. If you're installing this on a virtual host using VMware, see the section at the end of this document for some tips on making that VM run smoothly.

This assumes that the SUSE operating system install included the software development packages

2 SUSE versions

These instructions have been amended to cover:

  • SUSE-12.1 (64 bit)

3 Initial configuration

Set up general build stuff that you need:

  • zypper install java-1_6_0-openjdk
  • zypper install java-1_6_0-openjdk-devel
  • zypper install ant
  • zypper install subversion
  • zypper install gcc-c++
  • zypper install flex
  • zypper install bison
  • zypper install curl-devel
  • zypper install libxml2-devel
  • zypper install libjpeg-devel
  • zypper install libicu-devel
  • zypper install libcfitsio-devel
  • zypper install libcppunit-devel

3.1 Data type dependencies: NetCDF, HDF4, HDF5

  • zypper install libnetcdf4 libnetcdf-devel"
  • zypper install libzip-devel"
3.1.1 szip

On SUSE 12.1 zipper does not have szip. I tried building szip from source and ran into these issues:

  1. The configure found the math libs, but the examples failed to utilize the -lm flag in the link line. I edited szip-2.1/examples/Makefile.am and added the -lm flag to each of the two link lines. This allowed the code to compile.

3.1.2 hdf4

The HDF4 build was unable to detect the szip libraries until I specified them as using the --with-szip=include_dir,library_dir pattern in the configure line:

./configure --disable-fortran --enable-production --enable-shared --disable-netcdf --prefix=/home/dev/OPeNDAP/shrew/deps/hdf-4.2.5 --with-szlib=/home/dev/OPeNDAP/shrew/deps/szip-2.1/include,/home/dev/OPeNDAP/shrew/deps/szip-2.1/lib64

Running make check fails. These are the errors:

Testing  -- Multi-File Generic Raster Image Interface (mfgr) 
*** UNEXPECTED RETURN from GRsetcompress is -1 at line  135 in tszip.c
*** UNEXPECTED RETURN from GRsetcompress is -1 at line  302 in tszip.c
*** UNEXPECTED RETURN from GRsetcompress is -1 at line  469 in tszip.c
*** UNEXPECTED RETURN from GRsetcompress is -1 at line  638 in tszip.c
*** UNEXPECTED RETURN from GRsetcompress is -1 at line  807 in tszip.c
*** UNEXPECTED RETURN from GRsetchunk is -1 at line 1001 in tszip.c

Based on that I decided to try again without the SZIP library:

./configure --disable-fortran --enable-production --enable-shared --disable-netcdf --prefix=/home/dev/OPeNDAP/shrew/deps/hdf-4.2.5

Again, make check failed. The errors:

*** Testing ncrecinq ...        ok ***
*** Testing ncrecput ...        *** glibc detected *** /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/mfhdf/nctest/.libs/nctest: free(): invalid pointer: 0x0000000000637ac0 ***
======= Backtrace: =========
======= Memory map: ========
00400000-00418000 r-xp 00000000 08:02 673784                             /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/mfhdf/nctest/.libs/nctest
00617000-00618000 r--p 00017000 08:02 673784                             /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/mfhdf/nctest/.libs/nctest
00618000-0061a000 rw-p 00018000 08:02 673784                             /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/mfhdf/nctest/.libs/nctest
0061a000-0066b000 rw-p 00000000 00:00 0                                  [heap]
7fe397e4c000-7fe397e61000 r-xp 00000000 08:02 1682                       /lib64/libgcc_s.so.1
7fe397e61000-7fe398060000 ---p 00015000 08:02 1682                       /lib64/libgcc_s.so.1
7fe398060000-7fe398061000 r--p 00014000 08:02 1682                       /lib64/libgcc_s.so.1
7fe398061000-7fe398062000 rw-p 00015000 08:02 1682                       /lib64/libgcc_s.so.1
7fe398062000-7fe3981e7000 r-xp 00000000 08:02 1684                       /lib64/libc-2.14.1.so
7fe3981e7000-7fe3983e7000 ---p 00185000 08:02 1684                       /lib64/libc-2.14.1.so
7fe3983e7000-7fe3983eb000 r--p 00185000 08:02 1684                       /lib64/libc-2.14.1.so
7fe3983eb000-7fe3983ec000 rw-p 00189000 08:02 1684                       /lib64/libc-2.14.1.so
7fe3983ec000-7fe3983f1000 rw-p 00000000 00:00 0 
7fe3983f1000-7fe398408000 r-xp 00000000 08:02 1497                       /lib64/libz.so.1.2.5
7fe398408000-7fe398607000 ---p 00017000 08:02 1497                       /lib64/libz.so.1.2.5
7fe398607000-7fe398608000 r--p 00016000 08:02 1497                       /lib64/libz.so.1.2.5
7fe398608000-7fe398609000 rw-p 00017000 08:02 1497                       /lib64/libz.so.1.2.5
7fe398609000-7fe398644000 r-xp 00000000 08:02 659745                     /usr/lib64/libjpeg.so.62.0.0
7fe398644000-7fe398843000 ---p 0003b000 08:02 659745                     /usr/lib64/libjpeg.so.62.0.0
7fe398843000-7fe398844000 r--p 0003a000 08:02 659745                     /usr/lib64/libjpeg.so.62.0.0
7fe398844000-7fe398845000 rw-p 0003b000 08:02 659745                     /usr/lib64/libjpeg.so.62.0.0
7fe398845000-7fe398855000 rw-p 00000000 00:00 0 
7fe398855000-7fe3988d3000 r-xp 00000000 08:02 408273                     /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/hdf/src/.libs/libdf.so.0.0.0
7fe3988d3000-7fe398ad2000 ---p 0007e000 08:02 408273                     /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/hdf/src/.libs/libdf.so.0.0.0
7fe398ad2000-7fe398ad4000 r--p 0007d000 08:02 408273                     /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/hdf/src/.libs/libdf.so.0.0.0
7fe398ad4000-7fe398ad6000 rw-p 0007f000 08:02 408273                     /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/hdf/src/.libs/libdf.so.0.0.0
7fe398ad6000-7fe398aff000 rw-p 00000000 00:00 0 
7fe398aff000-7fe398b24000 r-xp 00000000 08:02 533429                     /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/mfhdf/libsrc/.libs/libmfhdf.so.0.0.0
7fe398b24000-7fe398d23000 ---p 00025000 08:02 533429                     /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/mfhdf/libsrc/.libs/libmfhdf.so.0.0.0
7fe398d23000-7fe398d24000 r--p 00024000 08:02 533429                     /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/mfhdf/libsrc/.libs/libmfhdf.so.0.0.0
7fe398d24000-7fe398d25000 rw-p 00025000 08:02 533429                     /home/dev/OPeNDAP/shrew/src/dependencies/src/hdf-4.2.5/mfhdf/libsrc/.libs/libmfhdf.so.0.0.0
7fe398d25000-7fe398d26000 rw-p 00000000 00:00 0 
7fe398d26000-7fe398d46000 r-xp 00000000 08:02 1555                       /lib64/ld-2.14.1.so
7fe398f22000-7fe398f26000 rw-p 00000000 00:00 0 
7fe398f43000-7fe398f46000 rw-p 00000000 00:00 0 
7fe398f46000-7fe398f47000 r--p 00020000 08:02 1555                       /lib64/ld-2.14.1.so
7fe398f47000-7fe398f48000 rw-p 00021000 08:02 1555                       /lib64/ld-2.14.1.so
7fe398f48000-7fe398f49000 rw-p 00000000 00:00 0 
7fff85bf3000-7fff85c15000 rw-p 00000000 00:00 0                          [stack]
7fff85ca5000-7fff85ca6000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
/bin/sh: line 5: 22057 Aborted                 ${dir}$tst
FAIL: nctest

I reverted to compiling against SZIP and moved on...

3.2 RPM Construction Tools

  • zypper install rpm-devel
  • zypper install devel_rpm_build This FAILED - even though zipper search found the package:
dev@linux-9nfp:~/OPeNDAP/shrew> zypper search !$
zypper search devel_rpm_build
Loading repository data...
Reading installed packages...

S | Name                              | Summary                                  | Type   
  | devel_rpm_build                   | RPM Build Environment                    | pattern
  | patterns-openSUSE-devel_rpm_build | Meta package for pattern devel_rpm_build | package
dev@linux-9nfp:~/OPeNDAP/shrew> zypper info devel_rpm_build
Loading repository data...
Reading installed packages...

package 'devel_rpm_build' not found.
dev@linux-9nfp:~/OPeNDAP/shrew> zypper info patterns-openSUSE-devel_rpm_build
Loading repository data...
Reading installed packages...

Information for package patterns-openSUSE-devel_rpm_build:

Repository: openSUSE-12.1-12.1-1.4
Name: patterns-openSUSE-devel_rpm_build
Version: 12.1-25.21.1
Arch: x86_64
Vendor: openSUSE
Installed: No
Status: not installed
Installed Size: 1.0 KiB
Summary: Meta package for pattern devel_rpm_build
This package is installed if a pattern is selected to have a working update path

3.3 Autotools

  • download the latest versions of autoconf, automake and libtool
  • ./configure, make, make install

4 VMware configuration tips

It's best if you enable a shared directory so that you can pass stuff back and forth between the host OS and the Guest OS (i.e., the Virtual machine). That will only work if you have the VMware tools installed in/on the guest.

  • Install VMware-tools. This process varies, but it's pretty easy for all platforms. On VMware Fusion, look under the Virtual Machine menu for the item that says Install VMware Tools. This will download lump of code and, for CentOS, mount it on '/media/VMware Tools' (yes, there's a space in the directory name). Copy the *.tar.gz file to some place like your home directory, unpack it and read the INSTALL file. For an initial installation, the typical process is to run vmware-install.pl.
  • Under the configuration/options menu (the little wrench thing in Fusion), choose Sharing. Make a folder with an obvious name (e.g., vmware) and turn sharing on. Now, anything you put in there when on either the OS will be available to the other OS. On linux, this directory is located at /mnt/hgfs/<<name>>.

5 problems not addressed

  • There no JUnit for the OLFS build
  • There's not graphviz so the doc targets for libdap and bes will fail; I tried adding graphviz but that did not fix the problem.