Skip to content

Undefined reference to '_gfortran_concat_string' #460

@johnmoore4

Description

@johnmoore4

Hi developers,

I am trying to link my binary statically (i.e. with the -static flag in gcc) to OpenBLAS, but I get the following error (among others):

/home/john/local/OpenBLAS/install/lib/libopenblas.a(sgesvd.o): In function sgesvd_': sgesvd.f:(.text+0x35f): undefined reference to_gfortran_concat_string'

I'm compiling with the following linking flags:
"-static-libgfortran -static-libgcc -static-libstdc++ -lpthread -Wl,--whole-archive -libverbs -Wl,--no-whole-archive -ldl"

I've tried everything I can think of, and hav been stuck on this issue for days. If I simply remove -static-libgfortran and replace it with -lgfortran, everything works fine. So, it seems like the dynamic version of libgfortran is linked to some other libraries.

I have verified that I have the static version of the libraries listed in the above linking command, so that shouldn't be the issue. Also, this only seems to effect the LAPACK routines, not BLAS.

Do you have any idea what might be going on or suggestions for me to try?

I'm compiling with gcc 4.8.1 un Ubuntu 14.04, if that helps.

Thank you for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions