clMathLibraries / clBLAS

a software library containing BLAS functions written in OpenCL
Apache License 2.0
839 stars 240 forks source link

"undefined reference to `cdotusub_'" #184

Closed hughperkins closed 8 years ago

hughperkins commented 8 years ago

When building using the default options. Result is:

make[2]: *** [staging/test-correctness] Error 1
make[1]: *** [tests/CMakeFiles/test-correctness.dir/all] Error 2
CMakeFiles/test-short.dir/correctness/blas-lapack.c.o: In function `cdotu':
/home/user/git/clBLAS/src/tests/correctness/blas-lapack.c:658: undefined reference to `cdotusub_'
CMakeFiles/test-short.dir/correctness/blas-lapack.c.o: In function `zdotu':
/home/user/git/clBLAS/src/tests/correctness/blas-lapack.c:673: undefined reference to `zdotusub_'
CMakeFiles/test-short.dir/correctness/blas-lapack.c.o: In function `cdotc':
/home/user/git/clBLAS/src/tests/correctness/blas-lapack.c:688: undefined reference to `cdotcsub_'
CMakeFiles/test-short.dir/correctness/blas-lapack.c.o: In function `zdotc':
/home/user/git/clBLAS/src/tests/correctness/blas-lapack.c:703: undefined reference to `zdotcsub_'
collect2: error: ld returned 1 exit status

Context:

Edit: seems I have the following blas packages installed:

$ dpkg -l '*blas*' | grep ii
ii  libblas-dev                                           1.2.20110419-7                                      amd64        Basic Linear Algebra Subroutines 3, static library
ii  libblas3                                              1.2.20110419-7                                      amd64        Basic Linear Algebra Reference implementations, shared library
ii  libopenblas-base                                      0.2.8-6ubuntu1                                      amd64        Optimized BLAS (linear algebra) library based on GotoBLAS2
ii  libopenblas-dev                                       0.2.8-6ubuntu1                                      amd64        Optimized BLAS (linear algebra) library based on GotoBLAS2

Edit2: lapack packages installed:

$ dpkg -l '*lapack*' | grep ii
ii  liblapack-dev                                         3.5.0-2ubuntu1                                      amd64        Library of linear algebra routines 3 - static version
ii  liblapack3                                            3.5.0-2ubuntu1                                      amd64        Library of linear algebra routines 3 - shared version
TimmyLiu commented 8 years ago

Hi I am wondering if you are seeing the same issue as reported in issue #142 that you are using openblas (/usr/lib) instead of netlib blas (/usr/lib/libblas/)?

ghisvail commented 8 years ago

I observe the same problem as @hughperkins when using OpenBLAS. The test suite compiles fine with standard LAPACK / BLAS.

hughperkins commented 8 years ago

@TimmyLiu Yes, does look similar. And I do have openblas installed, as you see. I will close this one.

tingxingdong commented 8 years ago

This compilation bug is fix in PR #242 . It is commit in develop branch. U guys can take a look at and try.