Code Monkey home page Code Monkey logo

Comments (11)

emmenlau avatar emmenlau commented on May 20, 2024

Hmm, I guess it needs a slightly more clever fix, because its really not clear if HDF5 was built
with szip support or not? One solution is of course pkg-config that was meant exactly for this
kind of problem. An alternative might be to try without szip and add -ldl -lszip as a fallback if
linking fails without it?
Just my two cents...

from matio.

tbeu avatar tbeu commented on May 20, 2024

I regularly build HDF5 from source and test it on Travis CI and never met the issue. Can you please provide yout HDF5 config (call).

from matio.

emmenlau avatar emmenlau commented on May 20, 2024

@tbeu are you building hdf5 against the (optional) szip library?

from matio.

tbeu avatar tbeu commented on May 20, 2024

No, I don't since it is not needed (by matio to have the szip support for hdf5).

from matio.

emmenlau avatar emmenlau commented on May 20, 2024

This is the reason. I think many people build hdf5 with szip because its one of the "official"
filters. Maybe even the official Windows dll is linked against szip?
In any case, I would not add -ldl -lszipas a default, but it might be good to have a way to
add it for users who need it. @bxwllzz did you try adding it to LD_LIBS or LD_FLAGS
when running configure?

from matio.

tbeu avatar tbeu commented on May 20, 2024

OK, I will check it if I configure hdf5 with --with-szlib.

from matio.

bxwllzz avatar bxwllzz commented on May 20, 2024

I build HDF5 with cmake as HDF5 - Building HDF5-1.8 With CMake which is "RECOMMENDED by HDF5". Following the Build Instructions in that page, I run build-unix.sh to built HDF5.
I just noticed it says
These files will build the static HDF5 C and C++ libraries with SZIP and ZLIB compression included.
But I stiil don't know how to use cmake to build HDF5 without SZIP?

@emmenlau Adding -ldl -lszip to LD_LIBS or LD_FLAGS when running configure didn't solve this problem.

from matio.

emmenlau avatar emmenlau commented on May 20, 2024

@bxwllzz I did not test this myself but here are cmake instructions from HDF5:
https://support.hdfgroup.org/HDF5/release/chgcmkbuild.html
According to my understanding -DHDF5_ENABLE_SZIP_SUPPORT=OFF should disable
SZIP. If you want to be double sure, add also -DHDF5_ENABLE_SZIP_ENCODING=OFF.
I did not test it, but it seems promising. Does it help?

from matio.

bxwllzz avatar bxwllzz commented on May 20, 2024

@emmenlau build-unix.sh run ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log
In HDF5config.cmake, I found some options:

...
### disable ext libs building
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
...

After uncomment these lines, I can make HDF5 without SZIP. Thanks for your advice.

from matio.

tbeu avatar tbeu commented on May 20, 2024

It is all working for me - using plain configure and not cmake.

curl https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz -O -J
tar -zxf szip-2.1.1.tar.gz
cd szip-2.1.1
./configure --quiet CFLAGS="-w"
make install -C src
cd ..
git clone --depth 1 --branch hdf5_1_8_18 https://bitbucket.hdfgroup.org/scm/hdffv/hdf5.git hdf5_1_8_18
cd hdf5_1_8_18
./configure --quiet --enable-shared --disable-production --enable-debug=all --with-pic --disable-deprecated-symbols --disable-hl --disable-strict-format-checks --disable-clear-file-buffers --disable-instrument --disable-parallel --disable-trace --with-default-api-version=v18 --with-szlib=~/szip-2.1.1/szip CFLAGS="-w"
make install -C src

from matio.

tbeu avatar tbeu commented on May 20, 2024

You can run cmake -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF ./ to disable szlib in hdf5.

from matio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.