Comments (11)
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.
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.
@tbeu are you building hdf5 against the (optional) szip library?
from matio.
No, I don't since it is not needed (by matio to have the szip support for hdf5).
from matio.
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 -lszip
as 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.
OK, I will check it if I configure hdf5 with --with-szlib
.
from matio.
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.
@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.
@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.
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.
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)
- How to append data to a mat file? HOT 7
- Request for using test data HOT 4
- interleaved complex array HOT 1
- Appending data ocurs error
- Not able to build on Ubuntu 22.04.2 LTS HOT 1
- Compression failure caused by incorrect ChunkSize HOT 2
- Buliding with afl++ gives linker error `ld: unknown option: --retain-symbols-file` HOT 6
- A problem with corrupted files HOT 7
- Microsoft Windows minimal CMake configuration HOT 2
- HDF5 error on reading compressed v7.3 matfiles HOT 1
- cmake can not verify HDF5 version when building with VS 2022 HOT 1
- Methods to access data stored in nested variables in.mat file. HOT 2
- Failed to read from 7.3 mat file generated from hdf5storage python package HOT 6
- Does matio have documents just like API HOT 1
- Is matio capable of handle GBK string? HOT 1
- Using undefined types “matvar_internal” HOT 1
- cannot compile successfully on Windows HOT 1
- MinGW Build Regression HOT 4
- LFS support on MinGW broken HOT 4
- `READ_DATA` macro needs checks before float to int casts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matio.