Reputation: 1
I tried to install gcc-9.1.0 version with gcc-5 and the following configure
options:
../gcc-9.1.0/configure --prefix=local/gcc/9.1.0-all \
--program-suffix='-10' \
--without-included-gettext \
--enable-threads=posix \
--enable-libstdcxx-time=yes \
--enable-shared \
--enable-languages=c,c++,fortran,go,objc,obj-c++ \
--with-mpfr="$MPFR_DIR" \
--with-mpc=$MPC_DIR\
--with-gmp=$GMP_DIR\
--with-isl=$ISL_DIR\
--enable-host-shared \
--disable-libquadmath --disable-libquadmath-support --disable-werror\
CC=gcc-5 CXX=g++-5
However, I always get the error:
../gcc-9.1.0/libgfortran/runtime/string.c:96:1: error: static declaration of ‘strnlen’ follows non-static declaration
How can I resolve this error? Can't I install gfortran
under current system?
My installation system is Ubuntu 16.04.5 LTS (Xenial Xerus)
and CPU is Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
.
After install gcc-9 and g++-9, I try to install only gfortran
as following configuration:
../gcc-9.1.0/configure --prefix=$EXTERNALPACKAGES/$PACKAGE/$VER-fortran \
--program-suffix='-9' \
--without-included-gettext \
--enable-threads=posix \
--enable-libstdcxx-time=yes \
--with-system-zlib \
--disable-browser-plugin \
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu \
--enable-shared \
--enable-languages=fortran \
--with-mpfr="$MPFR_DIR" \
--with-mpc=$MPC_DIR\
--with-gmp=$GMP_DIR\
--with-isl=$ISL_DIR\
--enable-host-shared \
--disable-multilib \
--disable-libquadmath --disable-libquadmath-support --disable-werror\
CC=gcc-9 CXX=g++-9
However, I got same error:
../../../gcc-9.1.0/libgfortran/runtime/string.c:96:1: error: static dec
laration of ‘strnlen’ follows non-static declaration
Upvotes: 0
Views: 249