Eu trabalho em um sistema Ubuntu 16.04 LTS, que vem com compiladores gcc-5
e gfortran-5
nativos. Eu estou trabalhando na construção de um projeto, que recomenda gfortran 6.3 e acima. Então eu instalei o PPA Test Toolchain e baixei gcc-7
e gfortran-7
compiladores. E fez deles padrão do sistema.
Meu programa também usa bibliotecas Lapack e Blas, que eu baixei via apt-get
(gerenciador de pacotes Synaptic).
$ 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.
No entanto, ao compilar o programa, recebo o seguinte aviso:
/usr/bin/ld: warning: libgfortran.so.3, needed by /usr/lib/lapack/liblapack.so,
may conflict with libgfortran.so.4
$ 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
$ 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
Existe uma maneira de forçar (e eu estou usando este termo livremente como eu sou novo nisso e talvez ignorando algo óbvio) as bibliotecas lapack e blas para usar gfortran-7
?