When compiling against the static release of hdf5 (which the
bootstrapper seems to recommend), I get the following error when trying
to build Alembic:
/.../lib/hdf5-1.8.7-linux-x86_64-static/lib/libhdf5.a(H5Z.o): In
function `H5Z_init_interface':
H5Z.c:(.text+0x257): undefined reference to `SZ_encoder_enabled'
I think this is because it cant find hdf5/lib/libsz.a. If I manually
compile and point it at libsz.a, it works fine.
Building against the shared HDF5 release works as expected without any
intervention, but I figured I would post this in case anyone else has
the same problem.
--
Jeremy
Hey Jeremy, I'm 99% certain that's because you're building hdf5 in a
way we don't recommend. We count on szip being disabled by default, and
zlib being enabled by default, so here's how we configure our HDF5 build:
setenv LDFLAGS "-fPIC" ; \
setenv CFLAGS "-m64 -fPIC" ; \
./configure \
--prefix=/usr/local/hdf5-1.8.7/ \
--with-pic \
--disable-shared \
--enable-production \
--disable-debug \
--enable-threadsafe --with-pthread=/usr/include,/usr/lib
-Joe
http://www.hdfgroup.org/HDF5/release/obtain5.html
Seems like a good thing to add to the build notes in README.txt.
--
Jeremy
________________________________________
From: Jeremy Cowles [jco...@pixar.com]
Sent: 14 June 2011 01:08
To: alembic-d...@googlegroups.com
Subject: Re: [alembic-discussion] Static linking of HDF5 not supported?
http://www.hdfgroup.org/HDF5/release/obtain5.html
--
Jeremy
--
You received this message because you are subscribed to the Google
Groups "alembic-discussion" group.
To post to this group, send email to alembic-d...@googlegroups.com
To unsubscribe from this group, send email to
alembic-discuss...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/alembic-discussion?hl=en
For RSS or Atom feeds related to Alembic, see:
It's already there :)
"""
They may be installed in their default system locations (typically somewhere
under /usr/local), or some other centralized directory at
your discretion; it's best to not install your dependencies under the
Alembic
source root. Look in your Alembic source root's "doc" directory for
instructions on building Boost and HDF5; see next step for details.
1) Untar the Alembic source into your desired directory:
$ cd ~/ ; tar xzf Alembic_0_9_3_-xxxxxxxx.tgz
This will create a directory, ~/Alembic_0.9.3, that contains the Alembic
source code (if you're reading this, you've probably already done this).
As alluded to in Step 0, ~/Alembic_0.9.3/doc/ will contain instructional
files for building Boost and HDF5. Mostly, those packages' libraries just
need a little encouragement to build static archives and with -fPIC.
"""
Then in the doc directory, there are Boost-howtobuild.txt and
HDF5-howtobuild.txt, which contain the configure line as well as a plain
English description of what we're trying to do with it.
But, as Rob Pieke points out, if you use the standard binary distro,
all it means is you need to link in libsz too.
Anyway, thank you for looking into this!
-Joe
--
Jeremy