Bug 872781 - Octave can't find libhdf5
Summary: Octave can't find libhdf5
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: octave
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Susi Lehtola
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-03 03:45 UTC by Steve Watson
Modified: 2018-04-26 06:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-03 17:03:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steve Watson 2012-11-03 03:45:51 UTC
Description of problem:octave fails to launch: can't find libhdf5.so.6


Version-Release number of selected component (if applicable):3.4.3


How reproducible:always


Steps to Reproduce:
1.yum install octave from epel repository
2.type "octave" from command line
3.
  
Actual results:
$ octave 
octave: error while loading shared libraries: libhdf5.so.6: cannot open shared object file: No such file or directory


Expected results:
$ octave 
GNU Octave, version 3.4.3 Copyright (C) 2011 John W. Eaton and others. 
... 
octave:1> 

Additional info:
Reported to gnu savannah, then to RedHat Support; latter suggested reporting to epel.

Using:
System: RedHat RHEL Client, Release 6.3 
Kernel: Linux 2.6.32-279.11.1.el6.x86_64, Gnome 2.28.2 

Found this workaround that works:
# cd /usr/lib64/octave/3.4.3/ 
# ln -s /usr/lib64/mpich2/lib/libhdf5.so.6 . 
# ls -l libhdf5.so.6 
lrwxrwxrwx. 1 root root 34 Oct 31 21:52 libhdf5.so.6 -> /usr/lib64/mpich2/lib/libhdf5.so.6

Comment 1 Susi Lehtola 2012-11-03 10:14:42 UTC
Ugh, looks like this is something we forgot to take into account in the MPI guidelines.

It seems that you have installed the MPICH2 flavor of hdf5, but don't have the serial version installed. RPM then deems that the library dependencies are fulfilled, since libhdf5.so.6 is provided by hdf5-mpich2.

Just remove your workaround and install the hdf5 package.

Comment 2 Steve Watson 2012-11-03 16:44:46 UTC
Thanks, I think I understand what you are suggesting, but I'm not getting it to work. I removed my symlink and installed the hdf5 package from Redhat:

================================================================================
 Package       Arch            Version                  Repository         Size
================================================================================
Installing:
 hdf5          x86_64          1.8.7-1.el6.rf           rpmforge          3.4 M

Result: octave fails again, can't find libhdf5.so.6

I enabled epel and removed the mpich2 version of hdf5, but it insisted that octave depended on it, so I let it remove both.

================================================================================
 Package            Arch          Version                    Repository    Size
================================================================================
Removing:
 hdf5-mpich2        x86_64        1.8.5.patch1-7.el6         @epel        6.8 M
Removing for dependencies:
 octave             x86_64        6:3.4.3-1.el6              @epel         43 M

then reinstalled octave, which again installed hdf5-mpich2:

# yum --enablerepo=epel install octave
...
================================================================================
 Package            Arch          Version                     Repository   Size
================================================================================
Installing:
 octave             x86_64        6:3.4.3-1.el6               epel        9.1 M
Installing for dependencies:
 hdf5-mpich2        x86_64        1.8.5.patch1-7.el6          epel        1.4 M

and again octave failed to launch.

I now seem to have libhdf5.so.7 installed in /usr/lib64/, and libhdf5.so.6  installed in /usr/lib64/mpich2/lib/:

# find / -name *hdf5*
/var/lib/yum/yumdb/h/aa6c7365147a16e317183eb4fc5d0d5395bc27f4-hdf5-mpich2-1.8.5.patch1-7.el6-x86_64
/var/lib/yum/yumdb/h/b260bb88c29aa2427182b78eee259f9ce1697371-hdf5-1.8.7-1.el6.rf-x86_64
/usr/lib64/libhdf5hl_fortran.so.7
/usr/lib64/libhdf5_hl.so.7.0.1
/usr/lib64/libhdf5.so.7.0.1
/usr/lib64/libhdf5.so.7
/usr/lib64/libhdf5_hl.so.7
/usr/lib64/libhdf5_cpp.so.7.0.1
/usr/lib64/libhdf5_fortran.so.7.0.1
/usr/lib64/libhdf5hl_fortran.so.7.0.1
/usr/lib64/mpich2/lib/libhdf5hl_fortran.so.6.0.4
/usr/lib64/mpich2/lib/libhdf5_hl.so.6.0.4
/usr/lib64/mpich2/lib/libhdf5_fortran.so.6
/usr/lib64/mpich2/lib/libhdf5.so.6
/usr/lib64/mpich2/lib/libhdf5_hl.so.6
/usr/lib64/mpich2/lib/libhdf5.so.6.0.4
/usr/lib64/mpich2/lib/libhdf5_fortran.so.6.0.4
/usr/lib64/mpich2/lib/libhdf5hl_fortran.so.6
/usr/lib64/libhdf5_cpp.so.7
/usr/lib64/libhdf5_hl_cpp.so.7
/usr/lib64/libhdf5_hl_cpp.so.7.0.1
/usr/lib64/libhdf5_fortran.so.7
/usr/share/doc/hdf5-1.8.7
/usr/share/doc/hdf5-mpich2-1.8.5.patch1

but octave doesn't seem to be looking in any of these places:

$ strace octave 2>&1 | grep open.*libhdf5.*ENOENT | sed 's/^.*(\"//;s/\".*$//'
/usr/lib64/octave/3.4.3/libhdf5.so.6
/lib64/tls/x86_64/libhdf5.so.6
/lib64/tls/libhdf5.so.6
/lib64/x86_64/libhdf5.so.6
/lib64/libhdf5.so.6
/usr/lib64/tls/x86_64/libhdf5.so.6
/usr/lib64/tls/libhdf5.so.6
/usr/lib64/x86_64/libhdf5.so.6
/usr/lib64/libhdf5.so.6

So here's a new workaround that works:
# ln -s /usr/lib64/libhdf5.so.7 /usr/lib64/libhdf5.so.6
# ls -l /usr/lib64/libhdf5.so*
lrwxrwxrwx. 1 root root      23 Nov  3 12:39 /usr/lib64/libhdf5.so.6 -> /usr/lib64/libhdf5.so.7
lrwxrwxrwx. 1 root root      16 Nov  3 09:52 /usr/lib64/libhdf5.so.7 -> libhdf5.so.7.0.1
-rwxr-xr-x. 1 root root 9646932 Aug  9  2011 /usr/lib64/libhdf5.so.7.0.1

Can you make sense of this, or am I off in the wrong direction? Thanks for taking the time.

--Steve

Comment 3 Susi Lehtola 2012-11-03 17:03:41 UTC
(In reply to comment #2)
> Thanks, I think I understand what you are suggesting, but I'm not getting it
> to work. I removed my symlink and installed the hdf5 package from Redhat:
> 
> =============================================================================
> ===
>  Package       Arch            Version                  Repository        
> Size
> =============================================================================
> ===
> Installing:
>  hdf5          x86_64          1.8.7-1.el6.rf           rpmforge         
> 3.4 M
> 
> Result: octave fails again, can't find libhdf5.so.6

You're using the rpmforge repository, which results in you having a Frankenstein system. Unlike Fedora EPEL, rpmforge updates system core packages. The problems you are having are probably a symptom of this.

Closing as NOTABUG.

Comment 4 Steve Watson 2012-11-03 20:33:21 UTC
Oops, I think you're right. I didn't realize I had left rpmforge enabled. 

Thought Halloween was over, but here I am with a Frankensystem. Can't say I wasn't warned. Thanks again and sorry to be a bother.

--Steve

Comment 5 gengli 2018-04-25 12:18:20 UTC
I run following codes and succeed:
sudo yum install mpich2
cd /usr/lib64/octave/3.4.3/
ln -s /usr/lib64/libhdf5.so.7
mv libhdf5.so.7 libhdf5.so.6

Because I find libhdf5.so.7 in /usr/lib64

Comment 6 Susi Lehtola 2018-04-26 05:28:49 UTC
(In reply to gengli from comment #5)
> I run following codes and succeed:
> sudo yum install mpich2
> cd /usr/lib64/octave/3.4.3/
> ln -s /usr/lib64/libhdf5.so.7
> mv libhdf5.so.7 libhdf5.so.6
> 
> Because I find libhdf5.so.7 in /usr/lib64

That's just wrong. Libraries with different sonames are incompatible.

I'll say the same thing to you: remove all third-party packages and use the ones from RHEL and Fedora EPEL. Those work and don't mess up your system, like yours has been messed up as well.

Comment 7 gengli 2018-04-26 05:34:33 UTC
(In reply to Susi Lehtola from comment #6)
> (In reply to gengli from comment #5)
> > I run following codes and succeed:
> > sudo yum install mpich2
> > cd /usr/lib64/octave/3.4.3/
> > ln -s /usr/lib64/libhdf5.so.7
> > mv libhdf5.so.7 libhdf5.so.6
> > 
> > Because I find libhdf5.so.7 in /usr/lib64
> 
> That's just wrong. Libraries with different sonames are incompatible.
> 
> I'll say the same thing to you: remove all third-party packages and use the
> ones from RHEL and Fedora EPEL. Those work and don't mess up your system,
> like yours has been messed up as well.

Action speaks louder than words, I just know after I do that, it works.

Comment 8 gengli 2018-04-26 05:36:50 UTC
(In reply to gengli from comment #7)
> (In reply to Susi Lehtola from comment #6)
> > (In reply to gengli from comment #5)
> > > I run following codes and succeed:
> > > sudo yum install mpich2
> > > cd /usr/lib64/octave/3.4.3/
> > > ln -s /usr/lib64/libhdf5.so.7
> > > mv libhdf5.so.7 libhdf5.so.6
> > > 
> > > Because I find libhdf5.so.7 in /usr/lib64
> > 
> > That's just wrong. Libraries with different sonames are incompatible.
> > 
> > I'll say the same thing to you: remove all third-party packages and use the
> > ones from RHEL and Fedora EPEL. Those work and don't mess up your system,
> > like yours has been messed up as well.
> 

I wrote comment6
reply comment7
> Action speaks louder than words, I just know after I do that, it works.

Comment 9 gengli 2018-04-26 05:38:18 UTC
(In reply to gengli from comment #8)
> (In reply to gengli from comment #7)
> > (In reply to Susi Lehtola from comment #6)
> > > (In reply to gengli from comment #5)
> > > > I run following codes and succeed:
> > > > sudo yum install mpich2
> > > > cd /usr/lib64/octave/3.4.3/
> > > > ln -s /usr/lib64/libhdf5.so.7
> > > > mv libhdf5.so.7 libhdf5.so.6
> > > > 
> > > > Because I find libhdf5.so.7 in /usr/lib64
> > > 
> > > That's just wrong. Libraries with different sonames are incompatible.
> > > 
> > > I'll say the same thing to you: remove all third-party packages and use the
> > > ones from RHEL and Fedora EPEL. Those work and don't mess up your system,
> > > like yours has been messed up as well.
> > 
> 
> I wrote comment5
> reply comment7
> > Action speaks louder than words, I just know after I do that, it works.

Comment 10 Susi Lehtola 2018-04-26 06:40:02 UTC
(In reply to gengli from comment #7)
> Action speaks louder than words, 

Indeed. Hacking the compatibility checks in the shared library dependency system beats fixing the problem that you have installed incompatible software which could be easily fixed by installing the distribution package, or if it does not suit your needs, compiling the software from sources.

This is not Windows, where you had to Altavista for missing DLLs.


Note You need to log in before you can comment on or make changes to this bug.