Lapack and Blas libraries (changing associated Gfortran compilers)

I work on an Ubuntu 16.04 LTS system, which comes with native gcc-5 and gfortran-5 compilers. I am working on building a project, that recommends gfortran 6.3 and above. So I installed the PPA Test Toolchain and downloaded gcc-7 and gfortran-7 compilers. And made them system default.

My program uses Lapack and Blas libraries as well, which I downloaded via apt-get (Synaptic package manager).

$ gfortran --version
GNU Fortran (Ubuntu 7.2.0-1ubuntu1~16.04) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc --version
gcc (Ubuntu 7.2.0-1ubuntu1~16.04) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

However, when compiling the program, I get the following warning:

/usr/bin/ld: warning: libgfortran.so.3, needed by /usr/lib/lapack/liblapack.so,
may conflict with libgfortran.so.4

libgfortran.so.3

$ strings /usr/lib/gcc/x86_64-linux-gnu/5.4.1/libgfortran.so | grep "GFORTRAN_"
GFORTRAN_1.0
GFORTRAN_1.1
GFORTRAN_1.2
GFORTRAN_1.3
GFORTRAN_1.4
GFORTRAN_1.5
GFORTRAN_1.6
GFORTRAN_1.7
GFORTRAN_C99_1.0
GFORTRAN_C99_1.1
GFORTRAN_STDIN_UNIT
GFORTRAN_STDOUT_UNIT
GFORTRAN_STDERR_UNIT
GFORTRAN_UNBUFFERED_ALL
GFORTRAN_SHOW_LOCUS
GFORTRAN_OPTIONAL_PLUS
GFORTRAN_DEFAULT_RECL
GFORTRAN_LIST_SEPARATOR
GFORTRAN_CONVERT_UNIT
GFORTRAN_ERROR_BACKTRACE
GFORTRAN_UNBUFFERED_PRECONNECTED

libgfortran.so.4

$ strings /usr/lib/gcc/x86_64-linux-gnu/7.2.0/libgfortran.so | grep "GFORTRAN_"
GFORTRAN_7
GFORTRAN_F2C_7
GFORTRAN_C99_7
GFORTRAN_STDIN_UNIT
GFORTRAN_STDOUT_UNIT
GFORTRAN_STDERR_UNIT
GFORTRAN_UNBUFFERED_ALL
GFORTRAN_SHOW_LOCUS
GFORTRAN_OPTIONAL_PLUS
GFORTRAN_DEFAULT_RECL
GFORTRAN_LIST_SEPARATOR
GFORTRAN_CONVERT_UNIT
GFORTRAN_ERROR_BACKTRACE
GFORTRAN_UNBUFFERED_PRECONNECTED

Is there a way to force (and I am using this term loosely as I am new to this and maybe overlooking something obvious) the lapack and blas libraries to use gfortran-7?

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like