xianyi/OpenBLAS — Issue #74: symbol definition error at runtime
Author: olmjo
Created: 2011-12-20 21:58:02+00:00
State: open

I really can't seem to figure out where the problem is. I've built both openblas and gotoblas2 on this hardware (albeit on a different OS version) and both now give me problems (but very different ones).

I am on Ubuntu 11.10. AMD x86_64. I've used GCC 4.6 and 4.4 (same problems with both). I am building openblas version 0.1 alpha2.4 (18-Sep-2011).

I am building a shared object to have the OS link to so that calls to the OS' BLAS go to openblas. I can build the library without a hitch.

OpenBLAS build complete.

OS ... Linux
Architecture ... x86_64
BINARY ... 64bit
C compiler ... GCC (command line : gcc)
Fortran compiler ... GFORTRAN (command line : gfortran)
Library Name ... libopenblas_opteronp-r0.1alpha2.4.a (Multi threaded; Max num-threads is 2)

At runtime, I get

/usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/libblas.so.3gf: undefined symbol: _gfortran_compare_string

but the binary version of openblas that someone packages for Ubuntu works fine. I'd love to figure this problem out.

Because it may be related (how different could the code base be from Goto, yet?), here is the error I get when building GotoBLAS2-1.13. It does not complete successfully.

gcc -O2 -DEXPRECISION -m128bit-long-double -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DMAX_CPU_NUMBER=2 -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -I.. -w -o linktest linktest.c ../libgoto2_opteronp-r1.13.so -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1 -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../.. -l -l -lgfortran -lm -lquadmath -lm -lc && echo OK.
/usr/bin/ld: cannot find -l-l
collect2: ld returned 1 exit status
make[1]: *** [../libgoto2_opteronp-r1.13.so] Error 1
make[1]: Leaving directory `/home/olmjo/tmp/gotoblas/new/GotoBLAS2/exports'
make: *** [shared] Error 2

I know that some people have experienced some unexpected behavior on Ubuntu 11.10 when building other software from source, but I thought it had to do with changes in the version of gcc. I tried version 4.6, and the problem persisted, so this doesn't seem to be the cause of my problem.

I am going to try to build this on Ubuntu 11.04 in a virtual environment, but I wanted to submit this before I had those results.