title: Possible conflict when linking with two versions of libgfortran at the same time?
body: <p>Is it safe to link with both <code>libgfortran.3.0.0</code> and <code>libgfortran.1.0.0</code>, or does these libraries conflict each other?</p>
  
  <h1>Edit 0: some more info to answer the comments</h1>
  
  <p>My context is building packages with the conda package manager.</p>
  
  <p>I would like to build the packages using the <a href="http://anaconda.org/asmeurer/gcc" rel="nofollow">gcc 4.8.5</a> conda package. This <code>gcc</code> has been build on <code>centos 5</code> (with this <a href="https://github.com/conda/conda-recipes/tree/master/gcc-4.8" rel="nofollow">recipe</a>) so it depends on a <code>glibc</code> version compatible with most GNU/Linux distrib. It depends on <code>libgfortran.3.0.0</code>. I want to use it to build the packages, and to let users use it to link libraries provides by the packages I've build.</p>
  
  <p>I would also like to link the packages with <a href="https://repo.continuum.io/pkgs/free/linux-64/" rel="nofollow">openblas 0.2.14</a>, which depends on <code>libgfortran.1.0.0</code>. A solution would be to rebuild <code>openblas</code> with <code>gcc 4.8.5</code>, but the problem would remain for other conda packages that depend on this <code>openblas</code> (like <code>numpy</code>).</p>
  
  <p>I just tried to build <code>scalpack</code> using these conda packages<code>gcc 4.8.5</code> and <code>openblas 0.2.14</code>, and then compile an <a href="http://acts.nersc.gov/scalapack/hands-on/etc/pdpttr_2/pdpttr_2.f.html" rel="nofollow">example</a>.</p>
  
  <p>I get an error message:</p>
  
  <pre><code>/usr/bin/ld: warning: libgfortran.so.1, needed by /home/vagrant/miniconda3/envs/sca/lib/libopenblas.so, may conflict with libgfortran.so.3
  </code></pre>
  
  <p>The execution of the executable seems correct.</p>
  
  <h1>Edit 1</h1>
  
  <p>On the resulting executable,</p>
  
  <pre><code>$ 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
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$ ldd main
  
  linux-vdso.so.1 =&gt;  (0x00007fffdf5a2000)
  libopenblas.so.0 =&gt; /home/vagrant/miniconda3/envs/sca/lib/libopenblas.so.0 (0x00002b0e7cf62000)
  libmpi_usempi.so.1 =&gt; /home/vagrant/miniconda3/envs/sca/lib/libmpi_usempi.so.1 (0x00002b0e7ddc9000)
  libmpi_mpifh.so.2 =&gt; /home/vagrant/miniconda3/envs/sca/lib/libmpi_mpifh.so.2 (0x00002b0e7dfcc000)
  libmpi.so.1 =&gt; /home/vagrant/miniconda3/envs/sca/lib/libmpi.so.1 (0x00002b0e7e223000)
  libgfortran.so.3 =&gt; /home/vagrant/miniconda3/envs/sca/lib/libgfortran.so.3 (0x00002b0e7e71b000)
  libm.so.6 =&gt; /lib64/libm.so.6 (0x0000003b15c00000)
  libgcc_s.so.1 =&gt; /home/vagrant/miniconda3/envs/sca/lib/libgcc_s.so.1 (0x00002b0e7ea4b000)
  libquadmath.so.0 =&gt; /home/vagrant/miniconda3/envs/sca/lib/libquadmath.so.0 (0x00002b0e7ec61000)
  libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x0000003b14c00000)
  libc.so.6 =&gt; /lib64/libc.so.6 (0x0000003b14400000)
  libgfortran.so.1 =&gt; /home/vagrant/miniconda3/envs/sca/lib/./libgfortran.so.1 (0x00002b0e7ee9e000)
  libopen-rte.so.7 =&gt; /home/vagrant/miniconda3/envs/sca/lib/./libopen-rte.so.7 (0x00002b0e7f136000)
  libopen-pal.so.6 =&gt; /home/vagrant/miniconda3/envs/sca/lib/./libopen-pal.so.6 (0x00002b0e7f42d000)
  libdl.so.2 =&gt; /lib64/libdl.so.2 (0x0000003b14800000)
  librt.so.1 =&gt; /lib64/librt.so.1 (0x0000003b15000000)
  libutil.so.1 =&gt; /lib64/libutil.so.1 (0x0000003b17400000)
  /lib64/ld-linux-x86-64.so.2 (0x0000003b14000000)
  </code></pre>