Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error during make install while trying to install on new macbook #170

Open
lgazdzin opened this issue Feb 6, 2025 · 8 comments
Open

error during make install while trying to install on new macbook #170

lgazdzin opened this issue Feb 6, 2025 · 8 comments

Comments

@lgazdzin
Copy link

lgazdzin commented Feb 6, 2025

Hi,

I'm running into the following error while trying to install minc-toolkit-v2 on my new macbook (M2).

minc-toolkit-v2-build/HDF5/src/H5Fsuper.c:1397:16: error: call to undeclared function 'H5O__fsinfo_set_version'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1397 | if(H5O__fsinfo_set_version(f, &fsinfo) < 0)
| ^
1 error generated.
make[5]: *** [src/CMakeFiles/hdf5-static.dir/H5Fsuper.c.o] Error 1
make[4]: *** [src/CMakeFiles/hdf5-static.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [HDF5-prefix/src/HDF5-stamp/HDF5-build] Error 2
make[1]: *** [CMakeFiles/HDF5.dir/all] Error 2
make: *** [all] Error 2

My cmake call is this:

cmake ../minc-toolkit-v2/ -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/opt/minc/1.9.18 -DMT_BUILD_ABC:BOOL=ON -DMT_BUILD_ANTS:BOOL=ON -DMT_BUILD_C3D:BOOL=ON -DMT_BUILD_ELASTIX:BOOL=ON -DMT_BUILD_IM:BOOL=OFF -DMT_BUILD_ITK_TOOLS:BOOL=ON -DMT_BUILD_LITE:BOOL=OFF -DMT_BUILD_SHARED_LIBS:BOOL=ON -DMT_BUILD_VISUAL_TOOLS:BOOL=ON -DMT_USE_OPENMP:BOOL=ON -DUSE_SYSTEM_FFTW3D:BOOL=OFF -DUSE_SYSTEM_FFTW3F:BOOL=OFF -DUSE_SYSTEM_GLUT:BOOL=OFF -DUSE_SYSTEM_GSL:BOOL=ON -DUSE_SYSTEM_HDF5:BOOL=OFF -DUSE_SYSTEM_ITK:BOOL=OFF -DUSE_SYSTEM_NETCDF:BOOL=OFF -DUSE_SYSTEM_NIFTI:BOOL=OFF -DUSE_SYSTEM_PCRE:BOOL=OFF -DUSE_SYSTEM_ZLIB:BOOL=OFF -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison -DHDF5_ROOT=$(brew --prefix hdf5)

The HDF5 version that I think it's using is 1.14.5 (I've tried the above command with -DUSE_SYSTEM_HDF5:BOOL=ON as well, but this didn't help.

Thanks!

@lgazdzin
Copy link
Author

Hi -- I submitted this question a couple of weeks ago and haven't received a response ... Just wanted to follow up to see if anyone has any advice. Thanks!

@vfonov
Copy link
Member

vfonov commented Feb 20, 2025

try with older version of HDF5, i have tried with 1.12 so far. And use develop branch.

@lgazdzin
Copy link
Author

Thanks for your reply. I'll try to figure out how to get an older version of HDF5 and will let you know if I need help! Do you mean the develop branch for minctools?

@vfonov
Copy link
Member

vfonov commented Feb 20, 2025

develop branch of minc-toolkit-v2 , i.e develop-1.9.18

@vfonov
Copy link
Member

vfonov commented Feb 20, 2025

although, on MacOS Silicone, ITK4 will not compile, so better try https://github.com/BIC-MNI/minc-toolkit-v2/tree/develop-1.9.19

@lgazdzin
Copy link
Author

Looks like I'm still having trouble, unfortunately. I installed hdf5 version 1.10.11 using brew and ensured it was in my path:

brew install [email protected]
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
brew unlink hdf5 && brew link hdf5
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> /Users/Lisa/.bash_profile

h5cc -showconfig | grep "HDF5 Version"
HDF5 Version: 1.10.11

Downloaded minc toolkit from the develop branch like this:

git clone --recursive --branch develop-1.9.19-ITKv5.4 https://github.com/BIC-MNI/minc-toolkit-v2.git minc-toolkit-v2

And then ran cmake as shown here, followed by make && make install, but then ran into the error below yet again.

cmake ../minc-toolkit-v2/ -DCMAKE_INSTALL_PREFIX:PATH=/opt/minc/1.9.19 -DMT_BUILD_ABC:BOOL=ON -DMT_BUILD_ANTS:BOOL=ON -DMT_BUILD_C3D:BOOL=ON -DMT_BUILD_ELASTIX:BOOL=ON -DMT_BUILD_IM:BOOL=OFF -DMT_BUILD_ITK_TOOLS:BOOL=ON -DMT_BUILD_LITE:BOOL=OFF -DMT_BUILD_SHARED_LIBS:BOOL=ON -DMT_BUILD_VISUAL_TOOLS:BOOL=ON -DMT_USE_OPENMP:BOOL=ON -DUSE_SYSTEM_FFTW3D:BOOL=OFF -DUSE_SYSTEM_FFTW3F:BOOL=OFF -DUSE_SYSTEM_GLUT:BOOL=OFF -DUSE_SYSTEM_GSL:BOOL=ON -DUSE_SYSTEM_HDF5:BOOL=OFF -DUSE_SYSTEM_ITK:BOOL=OFF -DUSE_SYSTEM_NETCDF:BOOL=OFF -DUSE_SYSTEM_NIFTI:BOOL=OFF -DUSE_SYSTEM_PCRE:BOOL=OFF -DUSE_SYSTEM_ZLIB:BOOL=OFF -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison

The error:
[ 12%] Building C object src/CMakeFiles/hdf5-static.dir/H5Fspace.c.o
[ 12%] Building C object src/CMakeFiles/hdf5-static.dir/H5Fsuper.c.o
/Users/Lisa/minctoolkit-build/HDF5/src/H5Fsuper.c:1397:16: error: call to undeclared function 'H5O__fsinfo_set_version'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1397 | if(H5O__fsinfo_set_version(f, &fsinfo) < 0)
| ^
1 error generated.
make[5]: *** [src/CMakeFiles/hdf5-static.dir/H5Fsuper.c.o] Error 1
make[4]: *** [src/CMakeFiles/hdf5-static.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [HDF5-prefix/src/HDF5-stamp/HDF5-build] Error 2
make[1]: *** [CMakeFiles/HDF5.dir/all] Error 2
make: *** [all] Error 2

@vfonov
Copy link
Member

vfonov commented Feb 21, 2025

so, the fact that it's finding an error in HDF5-prefix/src/HDF5-stamp/HDF5-build means that it doesn't use system provided HDF5 library, but rather builds it's own (also indicated by DUSE_SYSTEM_HDF5:BOOL=OFF) . And it looks like the compiler is more strict that it used to be and insists on using C99 standard.

@lgazdzin
Copy link
Author

Hm ok, that makes sense. I'm not sure what the implications if the C99 standard are. But if I set DUSE_SYSTEM_HDF5:BOOL=OFF, then it can't find HDF5, so fails very quickly. Is there something else I can try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants