[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swarm-Support] R and hdf5 question on OSX
From: |
Bill Northcott |
Subject: |
Re: [Swarm-Support] R and hdf5 question on OSX |
Date: |
Tue, 22 Nov 2005 22:39:06 +1100 |
On 18/11/2005, at 5:04 PM, paul box wrote:
I am installing the hdf5 library for R on my OSX machine. The
'configure' script searches to find if hdf5 is installed on the
machine, and in my case says it is not. I have hdf5 installed in
/usr/local/hdf5_1.6.1, right next to /usr/local/swarm2.2. I obviously
don't have that directory in my library path.
The obvious solution (for a linux user) is to set PATH and
LD_LIBRARY_PATH in bash (in myh xterm window) to include these, but
when I type 'export' at the command prompt, there is no
LD_LIBRARY_PATH variable to set. Can somebody tell what needs to be
done in OSX to fix this?
From the location, I assume you have installed HDF5 from my binary
package.
So I don't understand this:
checking for library containing H5open... no
configure: error: Can't find zlib
ERROR: configuration failed for package 'hdf5'
My HDF5 package is linked against the standard zlib in /usr/lib.
Lets make a few comments about MacOS X and how it differs from Linux
that might help:
1. MacOS X does not have LD_LIBRARY_PATH. It has DYLD_LIBRARY_PATH
which is used to tell dyld (the dynamic linker) to look for libraries
in a certain location at run time. It should ONLY be used for
testing prior to installation. It has no effect on ld. ld (the
static linker) searches according to -L or -framework options. The R
configure script should work correctly if you have used the hdf
options to point to your hdf5 library. I have done this with R and
my hdf binary.
2. Every MacOS X shared library or executable stores the the full
path of the shared libraries (after following all symlinks) against
which it was linked with ld. The dynamic linker dyld will always
look for these first at runtime and if not found search for libraries
of the same file name in standard locations like /usr/lib. You can
inspect these paths with 'otool -L' and change them with
'install_name_tool'.
3. Because of this, it is a good idea to install dependencies before
linking against them. That way ld will put appropriate paths in the
linked code, and you do not need to use install_name_tool.
Hope this helps
Bill Northcott