[MacPorts] #54049: ncview links against wrong hdf5

MacPorts noreply at macports.org
Thu Apr 27 19:25:20 UTC 2017


#54049: ncview links against wrong hdf5
--------------------------+--------------------------
  Reporter:  aaschwanden  |      Owner:  thiagoveloso
      Type:  defect       |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:
      Port:  ncview       |
--------------------------+--------------------------
Changes (by mf2k):

 * cc: thiagoveloso (removed)
 * owner:   => thiagoveloso
 * status:  new => assigned


Old description:

> This is a follow-up to: https://trac.macports.org/ticket/54035
>
> Re libpng.so vs libpng.dylib: My solution was to patch the configure
> file, replacing libpng.so with libpng.dylib
>
> Today I upgraded one of my systems and got the ncview update, which
> (again) got me into the hdf5-18 vs hdf5 port hell. I hope the pytables
> port will be updated soon so it's compatible with hdf5 1.10 (akaik,
> that's the only port that still needs hdf5-18).
>
> Anyway, while the current portfile appears to invoke the hdf5-18 libs:
>

> {{{
> # seems that nc-config doesn't provide hdf5-18's lib path?
> configure.ldflags-append -L${prefix}/lib/hdf5-18/lib
>
> }}}
>

> the compiled binary still links to the wrong hdf5:
>

> {{{
> $ otool -L  /opt/local/bin/ncview
> /opt/local/bin/ncview:
>         /opt/local/lib/libpng16.16.dylib (compatibility version 46.0.0,
> current version 46.0.0)
>         /opt/local/lib/libudunits2.dylib (compatibility version 0.0.0,
> current version 0.0.0)
>         /opt/local/lib/libexpat.1.dylib (compatibility version 8.0.0,
> current version 8.2.0)
>         /opt/local/lib/libnetcdf.11.dylib (compatibility version 11.0.0,
> current version 11.3.0)
>         /opt/local/lib/libhdf5_hl.100.dylib (compatibility version
> 101.0.0, current version 101.0.0)
>         /opt/local/lib/libhdf5.100.dylib (compatibility version 101.0.0,
> current version 101.1.0)
>
> }}}
>
> leading to
>
> {{{
>
> $ Ncview 2.1.7 David W. Pierce  29 March 2016
> http://meteora.ucsd.edu:80/~pierce/ncview_home_page.html
> Copyright (C) 1993 through 2015, David W. Pierce
> Ncview comes with ABSOLUTELY NO WARRANTY; for details type `ncview -w'.
> This is free software licensed under the Gnu General Public License
> version 3; type `ncview -c' for redistribution details.
>
> Warning! ***HDF5 library version mismatched error***
> The HDF5 header files used to compile this application do not match
> the version used by the HDF5 library to which this application is linked.
> Data corruption or segmentation faults may occur if the application
> continues.
> This can happen when an application was compiled by one version of HDF5
> but
> linked with a different version of static or shared HDF5 library.
> You should recompile the application or check your shared library related
> settings such as 'LD_LIBRARY_PATH'.
> You can, at your own risk, disable this warning by setting the
> environment
> variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
> Setting it to 2 or higher will suppress the warning messages totally.
> Headers are 1.8.18, library is 1.10.0
>             SUMMARY OF THE HDF5 CONFIGURATION
>             =================================
>
> General Information:
> -------------------
>                    HDF5 Version: 1.10.0-patch1
>                   Configured on: Wed Feb 22 14:21:02 AKST 2017
>                   Configured by: macports at bergseeschjien-2.local
>                     Host system: x86_64-apple-darwin16.3.0
>               Uname information: Darwin bergseeschjien-2.local 16.3.0
> Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016;
> root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
>                        Byte sex: little-endian
>              Installation point: /opt/local
>
> }}}
>
> I'm afraid I don't know how to fix this. For now, I'll have to restore my
> system from a backup.

New description:

 This is a follow-up to: #54035

 Re libpng.so vs libpng.dylib: My solution was to patch the configure file,
 replacing libpng.so with libpng.dylib

 Today I upgraded one of my systems and got the ncview update, which
 (again) got me into the hdf5-18 vs hdf5 port hell. I hope the pytables
 port will be updated soon so it's compatible with hdf5 1.10 (akaik, that's
 the only port that still needs hdf5-18).

 Anyway, while the current portfile appears to invoke the hdf5-18 libs:


 {{{
 # seems that nc-config doesn't provide hdf5-18's lib path?
 configure.ldflags-append -L${prefix}/lib/hdf5-18/lib
 }}}


 the compiled binary still links to the wrong hdf5:


 {{{
 $ otool -L  /opt/local/bin/ncview
 /opt/local/bin/ncview:
         /opt/local/lib/libpng16.16.dylib (compatibility version 46.0.0,
 current version 46.0.0)
         /opt/local/lib/libudunits2.dylib (compatibility version 0.0.0,
 current version 0.0.0)
         /opt/local/lib/libexpat.1.dylib (compatibility version 8.0.0,
 current version 8.2.0)
         /opt/local/lib/libnetcdf.11.dylib (compatibility version 11.0.0,
 current version 11.3.0)
         /opt/local/lib/libhdf5_hl.100.dylib (compatibility version
 101.0.0, current version 101.0.0)
         /opt/local/lib/libhdf5.100.dylib (compatibility version 101.0.0,
 current version 101.1.0)
 }}}

 leading to

 {{{
 $ Ncview 2.1.7 David W. Pierce  29 March 2016
 http://meteora.ucsd.edu:80/~pierce/ncview_home_page.html
 Copyright (C) 1993 through 2015, David W. Pierce
 Ncview comes with ABSOLUTELY NO WARRANTY; for details type `ncview -w'.
 This is free software licensed under the Gnu General Public License
 version 3; type `ncview -c' for redistribution details.

 Warning! ***HDF5 library version mismatched error***
 The HDF5 header files used to compile this application do not match
 the version used by the HDF5 library to which this application is linked.
 Data corruption or segmentation faults may occur if the application
 continues.
 This can happen when an application was compiled by one version of HDF5
 but
 linked with a different version of static or shared HDF5 library.
 You should recompile the application or check your shared library related
 settings such as 'LD_LIBRARY_PATH'.
 You can, at your own risk, disable this warning by setting the environment
 variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
 Setting it to 2 or higher will suppress the warning messages totally.
 Headers are 1.8.18, library is 1.10.0
             SUMMARY OF THE HDF5 CONFIGURATION
             =================================

 General Information:
 -------------------
                    HDF5 Version: 1.10.0-patch1
                   Configured on: Wed Feb 22 14:21:02 AKST 2017
                   Configured by: macports at bergseeschjien-2.local
                     Host system: x86_64-apple-darwin16.3.0
               Uname information: Darwin bergseeschjien-2.local 16.3.0
 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016;
 root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
                        Byte sex: little-endian
              Installation point: /opt/local
 }}}

 I'm afraid I don't know how to fix this. For now, I'll have to restore my
 system from a backup.

--

--
Ticket URL: <https://trac.macports.org/ticket/54049#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list