与libgfortran.3.0.0
和libgfortran.1.0.0
链接是否安全,或者这些库是否相互冲突?
我的上下文是使用conda包管理器构建包。
我想使用gcc 4.8.5 conda包构建包。此gcc
已基于centos 5
(使用此recipe)构建,因此它取决于与大多数GNU / Linux发行版兼容的glibc
版本。这取决于libgfortran.3.0.0
。我想用它来构建包,并让用户使用它来链接我提供的包提供的库。
我还想将这些软件包与openblas 0.2.14相关联,这取决于libgfortran.1.0.0
。解决方案是使用openblas
重建gcc 4.8.5
,但问题仍然存在于依赖此openblas
的其他conda包(如numpy
)。
我刚尝试使用这些conda包scalpack
和gcc 4.8.5
构建openblas 0.2.14
,然后编译example。
我收到错误消息:
/usr/bin/ld: warning: libgfortran.so.1, needed by /home/vagrant/miniconda3/envs/sca/lib/libopenblas.so, may conflict with libgfortran.so.3
可执行文件的执行似乎是正确的。
在生成的可执行文件上,
$ objdump -x main | grep gfortran
NEEDED libgfortran.so.3
required from libgfortran.so.3:
0000000000000000 F *UND* 0000000000000005 _gfortran_transfer_integer_write@@GFORTRAN_1.4
0000000000000000 F *UND* 0000000000000005 _gfortran_transfer_character_write@@GFORTRAN_1.4
0000000000000000 F *UND* 000000000000003f _gfortran_stop_string@@GFORTRAN_1.0
0000000000000000 F *UND* 00000000000000d0 _gfortran_runtime_error@@GFORTRAN_1.0
0000000000000000 F *UND* 00000000000000d0 _gfortran_runtime_error_at@@GFORTRAN_1.0
0000000000000000 F *UND* 0000000000000015 _gfortran_set_args@@GFORTRAN_1.0
0000000000000000 F *UND* 0000000000000014 _gfortran_st_write@@GFORTRAN_1.0
0000000000000000 F *UND* 0000000000000078 _gfortran_os_error@@GFORTRAN_1.0
0000000000000000 F *UND* 0000000000000139 _gfortran_set_options@@GFORTRAN_1.0
0000000000000000 F *UND* 0000000000000005 _gfortran_transfer_array_write@@GFORTRAN_1.4
0000000000000000 F *UND* 00000000000000ae _gfortran_st_write_done@@GFORTRAN_1.0
和
$ ldd main
linux-vdso.so.1 => (0x00007fffdf5a2000)
libopenblas.so.0 => /home/vagrant/miniconda3/envs/sca/lib/libopenblas.so.0 (0x00002b0e7cf62000)
libmpi_usempi.so.1 => /home/vagrant/miniconda3/envs/sca/lib/libmpi_usempi.so.1 (0x00002b0e7ddc9000)
libmpi_mpifh.so.2 => /home/vagrant/miniconda3/envs/sca/lib/libmpi_mpifh.so.2 (0x00002b0e7dfcc000)
libmpi.so.1 => /home/vagrant/miniconda3/envs/sca/lib/libmpi.so.1 (0x00002b0e7e223000)
libgfortran.so.3 => /home/vagrant/miniconda3/envs/sca/lib/libgfortran.so.3 (0x00002b0e7e71b000)
libm.so.6 => /lib64/libm.so.6 (0x0000003b15c00000)
libgcc_s.so.1 => /home/vagrant/miniconda3/envs/sca/lib/libgcc_s.so.1 (0x00002b0e7ea4b000)
libquadmath.so.0 => /home/vagrant/miniconda3/envs/sca/lib/libquadmath.so.0 (0x00002b0e7ec61000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003b14c00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003b14400000)
libgfortran.so.1 => /home/vagrant/miniconda3/envs/sca/lib/./libgfortran.so.1 (0x00002b0e7ee9e000)
libopen-rte.so.7 => /home/vagrant/miniconda3/envs/sca/lib/./libopen-rte.so.7 (0x00002b0e7f136000)
libopen-pal.so.6 => /home/vagrant/miniconda3/envs/sca/lib/./libopen-pal.so.6 (0x00002b0e7f42d000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003b14800000)
librt.so.1 => /lib64/librt.so.1 (0x0000003b15000000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000003b17400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b14000000)