3 Replies Latest reply on Jun 4, 2009 6:11 PM by r.lopez.negrete

    linking problems with gcc version 4.2

    r.lopez.negrete

      Hi all,

      I've been having some problems linking the library version libacml-4.2.0 to another thirdparty solver (Ipopt). I'm using ubuntu 7.10 with gnu-gcc/gfortran version

      $ gfortran-4.2 -v
      Using built-in specs.
      Target: x86_64-linux-gnu
      Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
      Thread model: posix
      gcc version 4.2.1 (Ubuntu 4.2.1-5ubuntu4)

      I've been getting the following problem. and the question is if I need gcc version 4.3 for this to work?

      /usr/bin/ld: warning: libgfortran.so.3, needed by /opt/acml4.2.0/gfortran64/lib/libacml.so, not found (try using -rpath
       or -rpath-link)
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_compare_string@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_transfer_character@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_transfer_integer@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_stop_numeric@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_st_write_done@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_pow_i4_i4@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_transfer_real@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_st_read@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_st_read_done@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_st_write@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_internal_pack@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_concat_string@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_internal_unpack@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_runtime_error@GFORTRAN_1.0'
      /opt/acml4.2.0/gfortran64/lib/libacml.so: undefined reference to `_gfortran_string_index@GFORTRAN_1.0'

      Thanks!

      Rodrigo

        • linking problems with gcc version 4.2
          chipf
          We did use GCC/GFORTRAN 4.3 to build the new ACML version, so that is the recommended compiler.
          We had done some testing that seemed to indicate the new version now worked with older GCC versions, including 4.2 and 4.1.2, but this must have been a artifact of the system used for testing.

          There is a slightly older thread that discusses creating a link to satisfy the libgfortran requirement. It would be worth looking at to see if it helps.
            • linking problems with gcc version 4.2
              joost

              Hello Rodrigo,

              did you find the solution to your problem? I'm having the same problem,

              :: warning: libgfortran.so.3, needed by libacml.so, not found

              ::libacml.so: undefined reference to `_gfortran_compare_string@GFORTRAN_1.0'

              etc etc

              and I can't locate the older thread which chipf refers to.

              -J

               

                • linking problems with gcc version 4.2
                  r.lopez.negrete

                  Hi Joost,

                  I never did find those posts, but fortunately when I upgraded my Ubuntu and therefore the gcc version I had, the problems went away. Now I'm using the following gfortran version without problems.

                  gfortran -v
                  Using built-in specs.
                  Target: x86_64-linux-gnu
                  Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
                  Thread model: posix
                  gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)

                   

                  I hope this helps you.

                  Cheers!