I'm trying to install the HDF5 compression libraries with the Intel Compilers suite (Intel Parallel Studio XE 2018.2.046).
With the same suite I've compiled both szip and zlib and I'm proceeding to configure HDF with the command:
./configure --prefix=/home/modelstation/Software/Intel_Compiled/hdf5 --enable-fortran --enable-cxx --with-szip=/home/modelstation/Software/Intel_Compiled/szip --with-zlib=/home/modelstation/Software/Intel_Compiled/zlib
Configuration stops with the error:
checking size of size_t... configure: error: in `/home/modelstation/Downloads/hdf5-1.10.2': configure: error: cannot compute sizeof (size_t)
Following this solution on the Intel Developer forum it seems that it should be possible to circumvent this error (which is apparently due to a conflict between HDF5 configure scripts and the new shiny Ubuntu version) by downgrading the GNU compiler suite used in autotools with the commands:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-6
But that command produces the following error:
update-alternatives: error: alternative path /usr/bin/gcc-6 doesn't exist
I thought that the mistake was that I had to actually install some previous version of the packages before updating alternatives, therefore I tried:
sudo apt-get install gcc-4.6
But the result is:
Package gcc-4.6 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: cpp-4.8 cpp-4.8:i386 E: Package 'gcc-4.6' has no installation candidate
So is it possible under ubuntu 18.04 to downgrade gcc g++ and gfortran to version 4.6 or not?
If the answer is "no" I will have to format everything and install Ubuntu 16.04, in which none of these issues existed.
Thanks
gcc-6
?gcc-4.6
? Which is it?sudo apt install g++-6
update-alternatives
- just setCC=/usr/bin/gcc-6
(or whatever) in the./configure
command.