Libdap On Leopard: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 46: Line 46:


Looks like all tests pass now!
Looks like all tests pass now!
http://scm.opendap.org/trac/ticket/1146
https://scm.opendap.org/trac/ticket/1146


==MacBook Pro==
==MacBook Pro==
Line 81: Line 81:
* cppunit: /usr/local
* cppunit: /usr/local
:: version: cppunit-1.12.1 from source
:: version: cppunit-1.12.1 from source
* Checked libdap out from subversion (I am currently working on the ''xmlrequest'' branch: http://scm.opendap.org/svn/branch/xmlrequest) so I took the libdap located there.
* Checked libdap out from subversion (I am currently working on the ''xmlrequest'' branch: https://scm.opendap.org/svn/branch/xmlrequest) so I took the libdap located there.


In the top level of libdap ran:
In the top level of libdap ran:
Line 149: Line 149:




== Building All Dependancies For PackageMaker ==
== [[ Hyrax-1.6.2 Packages for OS-X| Building Hyrax-1.6.2 Package Installer(s) for OS-X 10.5 (Leopard)]] ==


In an effort to build a binary distribution for Hyrax I built all of our dependancies from source and rolled them up with PackageMaker. Here's the story:
== Snow Leopard 2.6.8 ==


;Operating System
# Update to SnowLeopard
: OS-X 10.5.8
# Update autoconf from 2.61 to 2.68
 
;Hardware
: MacBook Pro, 2.53GHz Intel Core 2 Duo, 4GB RAM
 
=== Downloads ===
* hdf-4.2r3.tar.gz
* hdf5-1.8.1.tar.gz
* icu4c-3_6-src.tgz
* jpegsrc.v6b.tar.gz
* netcdf-3.6.3.tar.gz
* szip-2.1.tar.gz*
* zlib-1.2.3.tar.gz
 
=== Builds ===
 
In order:
 
==== szip ====
;szip-2.1.tar.gz*
: ./configure --prefix=$prefix
: make
: make check
: make install
 
==== zlib ====
;zlib-1.2.3.tar.gz
: ./configure --prefix=$prefix
: make
: make check
: make install
 
==== jpeg ====
;jpegsrc.v6b.tar.gz
: ./configure --prefix=$prefix
: make
: make check
: mkdir -p /usr/local/opendap/servers/hyrax-1.6.2/bin
: mkdir -p /usr/local/opendap/servers/hyrax-1.6.2/man/man1
: make install
: cp libjpeg.a $prefix/lib
: cp *.h $prefix/include
 
==== hdf5 ====
;hdf5-1.8.5-patch1.tar.gz
: ./configure --prefix=$prefix
: make
: make check
: make install
 
==== netcdf ====
 
;netcdf-3.6.3.tar.gz
: Failed to work - thge tests for netcdf in fileout_netcdf and netcdf_handler do not work correctly for 3.6.3
 
;netcdf-4.1.1.tar.gz
: Failed to build - depends on TeX.
 
;netcdf-4.0.1.tar.gz
: ./configure --prefix=$prefix --with-hdf5=$prefix
: make
: make check
: make install
 
==== hdf4 ====
;hdf-4.2.5.tar.gz
:./configure --prefix=$prefix --disable-fortran --with-szlib=$prefix --with-netcdf=$prefix --enable-production --enable-shared -with-jpeg=$prefix
: make
: make check
: make install
 
==== icu ====
;icu4c-3_6-src.tgz
 
ICU failed to link correctly. Using <code>otool -L</code> we could see in our libraries all of the ICU dependancies were shown like:
:<code>libicui18n.dylib.36 (compatibility version 36.0.0, current version 36.0.0)</code>
 
When all the other libs had a full path like this:
:<code>/usr/local/opendap/servers/hyrax-1.6.2/lib/libbes_dap.3.dylib (compatibility version 5.0.0, current version 5.5.0)</code>
The ICU build was producing only dynamic libraries where the links were only to the package name (no path). This also caused programs linking to one of theICU libs to get "path free" links.
 
James found the following in the last reply to this thread: http://bugs.php.net/bug.php?id=34089 (Thanks James!)
 
:: ''The icu build system produces MAC platform libraries with an install name which does not include a path, this can be seen by running "otool -L" on any of the libraries or anything you build that links against any of the libraries.''
::
::''My solution was to edit icu's darwin config file found at "<icu-source-directory>/config/mh-darwin" ''
::
:: ''By changing line 28 from:''
::
::: ''<code>LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))</code>''
::
::''To:''
::
::: ''<code>LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET))</code>''
 
I made the recommended change, then
: ./runConfigureICU MacOSX --prefix=$prefix
: make
: make check
: make install
 
=== PackageMaker ===
 
* When I built the package I got a large number warnings that the target install location had different owner/group than the install source.
* I used <code>chown</code> and <code>chgrp</code> to change to install source files and folders to the same user as the target directories. This caused PackageMaker to hang permanently. Required a force quit (<code>kill -9</code>).  This was repeatable.
* I changed back the ownership of the files to my user and group.
* In the contents "tab" on the Package I attempted to set the Owner and group to root / wheel.
* I still got the same warnings when building the package.
* I tested it on another mac
** It unpacked to <code>/usr/local/</code> as directed.
** The files were all owned by root/wheel
 
 
=== Hyrax ===
'''URL:''' http://scm.opendap.org/svn/branch/shrew/hyrax_1.6.2_release<br/>
'''Revision:''' 23904
 
; Summary
:I patched all of the Makefile.am targets for the OS-X packages (''<code>make pkg</code>''). I found numerous problems with small details such as incorrect package names for PackageMaker, Failure to preserve configure options in the package build. The code works now, but there are soma caveats for some of the packages. Details in each section below.
 
==== libdap ====
: ./configure --prefix=$prefix
: make pkg
: make check
: make install
 
==== bes ====
: ./configure --prefix=$prefix
: make pkg
: make check
: make install
 
==== dap-server ====
: ./configure --prefix=$prefix
: make pkg
: make check
: make install
 
==== fileout_netcdf ====
The <code>configure</code> command accepts:
<code>
 
</code>
'''However for OS-X packages ONLY <code>--icu-prefix</code> will work!'''
 
: ./configure --prefix=$prefix --with-netcdf=$prefix/deps/netcdf-3.6.3
: make
: make check
: make install
 
==== freeform_handler ====
: ./configure --prefix=$prefix
: make
: make check
: make install
 
==== hdf4_handler ====
The <code>configure</code> command accepts:
<code>
:  --with-hdf4=ARG        hdf4 directory
:  --with-hdf4-include=ARG hdf 4 include directory
:  --with-hdf4-libdir=ARG  hdf 4 library directory
</code>
'''However for OS-X packages ONLY <code>--with-hdf4</code> will work!'''
 
:./configure --prefix=$prefix --with-hdf4=$prefix/deps/hdf-4.2.5
: make
: make check
: make install
 
==== hdf5_handler ====
The <code>configure</code> command accepts:
<code>
:  --with-hdf5=ARG        hdf5 directory
:  --with-hdf5-include=ARG hdf5 include directory
:  --with-hdf5-libdir=ARG  hdf5 library directory
</code>
'''However for OS-X packages ONLY <code>--with-hdf5</code> will work!'''
 
:./configure --prefix=$prefix --with-hdf5=$prefix/deps/hdf5-1.8.5-patch1
: make
: make check
: make install
 
====nectdf_handler ====
The <code>configure</code> command accepts:
<code>
:--with-netcdf=ARG      netcdf directory
:--with-netcdf-include=ARG
:::netcdf include directory
:--with-netcdf-libdir=ARG
:::netcdf library directory
</code>
'''However for OS-X packages ONLY <code>--with-netcdf</code> will work!'''
 
: ./configure --prefix=$prefix --with-netcdf=$prefix/deps/netcdf-3.6.3
: make pkg
: make check
: make install
 
==== ncml_handler ====
The <code>configure</code> command accepts:
<code>
:--with-icu-prefix=PREFIX
:::Prefix where icu is installed (optional)
: --with-icu-exec-prefix=EPREFIX
:::Exec prefix where icu is installed (optional)
</code>
'''However for OS-X packages ONLY <code>--with-icu-prefix</code> will work!'''
 
 
: ./configure --prefix=$prefix--with-icu-prefix=$prefix/deps/icu-3.6
: make pkg
: make check
: make install

Latest revision as of 17:32, 29 April 2013

libdap on OS-X 10.5.3 (Leopard)

PowerPC

June 5th, 2008

Installed Leopard (OS-X 10.5) n a newly formatted disk.

System: PowerMac quad core G5, 6GB RAM


Installed:

  • bison: /usr/local/bin/bison
version: bison (GNU Bison) 2.3
  • libtool: /usr/local/bin/libtool
version: ltmain.sh (GNU libtool) 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
  • autoconf: /usr/local/bin/autoconf
version: autoconf (GNU Autoconf) 2.62
  • automake: /usr/local/bin/automake
version: automake (GNU automake) 1.10.1
  • m4: /usr/local/bin/m4
version: m4 (GNU M4) 1.4.11


In the top level of libdap ran:

gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=--dir=. --aux-dir=conf --lgpl --libtool --macro-prefix=gl regex
autoreconf
./configure
make
make check

libdap fails 3 tests:

  • FAIL: test.yb
  • FAIL: test.yd
  • FAIL: test.yg

But I think that happened under Tiger (10.4.x) too.

Same results for trunk and 3.8.0 source release.

Update

Looks like all tests pass now! https://scm.opendap.org/trac/ticket/1146

MacBook Pro

October 26th, 2008

Installed Leopard (OS-X 10.5) on a newly formatted disk.

System: MacBook Pro, 2.53GHz Core 2 Duo, 4GB RAM.


Installed:

  • bison: /usr/local/bin/bison
version: bison (GNU Bison) 2.3
  • libtool: /usr/local/bin/libtool
version: ltmain.sh (GNU libtool) 2.2.6b from source
  • autoconf: /usr/local/bin/autoconf
version: autoconf (GNU Autoconf) 2.65 from source
  • automake: /usr/local/bin/automake
version: automake (GNU automake) 1.11 from source
  • m4: /usr/local/bin/m4
version: m4 (GNU M4) 1.4.13 from source
  • subversion: /usr/local/bin/svn
version: subversion-1.5.2 from Collab.net binary
  • dejagnu: /usr/local/bin/runtest (and others)
version: dejagnu-1.4.4 from source
  • cppunit: /usr/local
version: cppunit-1.12.1 from source

In the top level of libdap ran:

autoreconf
./configure
make
make check

And it failed one test:

..F...


!!!FAILURES!!!
Test Results:
Run:  5   Failures: 1   Errors: 0


1) test: DODSFilterTest::get_das_last_modified_time_test (F) line: 195 DODSFilterTest.cc 
assertion failed
- Expression: df3->get_das_last_modified_time() == st.st_mtime


FAIL: DODSFilterTest
installed it anyway...
  • szip: /usr/local
version: szip-2.1 from source (./configure --prefix=/usr/local)
  • zlib: /usr/local
version: zlib-1.2.3 from source
  • jpeg lib: /usr/local
version: jpeg-6b from source (ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz)
[note: jpeg-7 is now shipping, but hdf as of hdf4.2r4 won't pass tests with it! If you need 7, best to install it in it's own dir and NOT /usr/local ... (mjohnson 1 oct 2009)]
Notes:
- Doing a make install will only install the executable files. To install the libraries do the following:
cp libjpeg.a /usr/local/lib
cp *.h /usr/local/include
- You must install the jpeg library and includes in /usr/local or the ./configure script for the hdf4_handler won't find it.
  • netcdf: /usr/local
version netcdf-3.6.3 from source (./configure --prefix=/usr/local)
  • HDF4: /usr/local
version: HDF4.2r3 from source, (./configure --disable-fortran --with-jpeg=/usr/local --with-szlib=/usr/local --prefix=/usr/local)
Updated
Configure with: ./configure --disable-fortran --with-szlib=/usr/local --disable-netcdf --enable-production --enable-shared
If you don't configure this correctly it's possible to install the HDF4 version of netcdf on top of the regular version and that will make all kinds of trouble.
Notes on libjpeg and hdf4.2r4 [mjohnson 1 oct 2009]: HDF4.2r4 won't pass tests with jpeg-7, the new dist. If you have it installed, you need to remove it and install jpeg-6b. Also, 4.2r4 fails to build with --enable-shared.



  • hdf5: /usr/local
version hdf5-1.8.1 from source (./configure --prefix=/usr/local --with-szlib=/usr/local --enable-cxx)

Continuing in the xmlrequest branch I checked out, built, and installed:

  • bes
  • dap-server
  • freeform_handler
  • hdf4_handler
  • hdf5_handler
  • netcdf_handler


Building Hyrax-1.6.2 Package Installer(s) for OS-X 10.5 (Leopard)

Snow Leopard 2.6.8

  1. Update to SnowLeopard
  2. Update autoconf from 2.61 to 2.68