Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compliation issue: Cannot find a library with BLAS API, LAPACK API ? #29

Open
errer opened this issue May 19, 2015 · 1 comment
Open

Comments

@errer
Copy link

errer commented May 19, 2015

Hello,

On 64-bit Ubuntu machine, I have compiled & install OpenBLAS and LAPACK from source, then did export as such :

export BLAS_LIBRARY_PATH=/opt/OpenBLAS/lib
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BLAS_LIBRARY_PATH}"

cd src

Build overfeat

make all, showing message as follows :

notice these 3 lines particularly :
-- Cannot find a library with BLAS API. Not using BLAS.
-- LAPACK requires BLAS
-- Cannot find a library with LAPACK API. Not using LAPACK.

make[1]: Entering directory `./OverFeat/src'
cd TH; mkdir -p build; cd build; rm -f libTH.a; cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc ..; make; cp libTH.a ../..; cp THGeneral.h ..
-- Checking for [openblas - gfortran]
-- Library openblas: /opt/OpenBLAS/lib/libopenblas.so
-- Library gfortran: BLAS_gfortran_LIBRARY-NOTFOUND
-- Checking for [openblas - gfortran - pthread]
-- Library openblas: /opt/OpenBLAS/lib/libopenblas.so
-- Library gfortran: BLAS_gfortran_LIBRARY-NOTFOUND
-- Cannot find a library with BLAS API. Not using BLAS.
-- Checking for [openblas - gfortran]
-- Library openblas: /opt/OpenBLAS/lib/libopenblas.so
-- Library gfortran: BLAS_gfortran_LIBRARY-NOTFOUND
-- Checking for [openblas - gfortran - pthread]
-- Library openblas: /opt/OpenBLAS/lib/libopenblas.so
-- Library gfortran: BLAS_gfortran_LIBRARY-NOTFOUND
-- Cannot find a library with BLAS API. Not using BLAS.
-- LAPACK requires BLAS
-- Cannot find a library with LAPACK API. Not using LAPACK.
-- C inline is supported (inline)
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= gcc
CMAKE_CXX_COMPILER= g++

-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Looking for mmap
-- Looking for mmap - found
-- Performing Test C_HAS_SSE1_1
-- Performing Test C_HAS_SSE1_1 - Success
-- Performing Test C_HAS_SSE2_1
-- Performing Test C_HAS_SSE2_1 - Success
-- Performing Test C_HAS_SSE3_1
-- Performing Test C_HAS_SSE3_1 - Failed
-- Performing Test C_HAS_SSE3_2
-- Performing Test C_HAS_SSE3_2 - Success
-- Performing Test C_HAS_SSE4_1_1
-- Performing Test C_HAS_SSE4_1_1 - Failed
-- Performing Test C_HAS_SSE4_1_2
-- Performing Test C_HAS_SSE4_1_2 - Success
-- Performing Test C_HAS_SSE4_2_1
-- Performing Test C_HAS_SSE4_2_1 - Failed
-- Performing Test C_HAS_SSE4_2_2
-- Performing Test C_HAS_SSE4_2_2 - Success
-- Performing Test CXX_HAS_SSE1_1
-- Performing Test CXX_HAS_SSE1_1 - Success
-- Performing Test CXX_HAS_SSE2_1
-- Performing Test CXX_HAS_SSE2_1 - Success
-- Performing Test CXX_HAS_SSE3_1
-- Performing Test CXX_HAS_SSE3_1 - Failed
-- Performing Test CXX_HAS_SSE3_2
-- Performing Test CXX_HAS_SSE3_2 - Success
-- Performing Test CXX_HAS_SSE4_1_1
-- Performing Test CXX_HAS_SSE4_1_1 - Failed
-- Performing Test CXX_HAS_SSE4_1_2
-- Performing Test CXX_HAS_SSE4_1_2 - Success
-- Performing Test CXX_HAS_SSE4_2_1
-- Performing Test CXX_HAS_SSE4_2_1 - Failed
-- Performing Test CXX_HAS_SSE4_2_2
-- Performing Test CXX_HAS_SSE4_2_2 - Success
-- Checking for [openblas - gfortran]
-- Library openblas: /opt/OpenBLAS/lib/libopenblas.so
-- Library gfortran: BLAS_gfortran_LIBRARY-NOTFOUND
-- Checking for [openblas - gfortran - pthread]
-- Library openblas: /opt/OpenBLAS/lib/libopenblas.so
-- Library gfortran: BLAS_gfortran_LIBRARY-NOTFOUND
-- Cannot find a library with BLAS API. Not using BLAS.
-- Checking for [openblas - gfortran]
-- Library openblas: /opt/OpenBLAS/lib/libopenblas.so
-- Library gfortran: BLAS_gfortran_LIBRARY-NOTFOUND
-- Checking for [openblas - gfortran - pthread]
-- Library openblas: /opt/OpenBLAS/lib/libopenblas.so
-- Library gfortran: BLAS_gfortran_LIBRARY-NOTFOUND
-- Cannot find a library with BLAS API. Not using BLAS.
-- LAPACK requires BLAS
-- Cannot find a library with LAPACK API. Not using LAPACK.
-- Performing Test C_HAS_inline
-- Performing Test C_HAS_inline - Success
-- C inline is supported (inline)
-- Configuring done
-- Generating done
-- Build files have been written to: ./OverFeat/src/TH/build

seems that in the final built bin file overfeatcmd :

libopenblas.so.0 is not linked, couples of libs are missed :

The wrong version :
linux-vdso.so.1 => (0x00007ffea8dce000)
/usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f722f615000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f722f2e3000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f722f0d4000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f722eebd000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f722ec9f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f722e8da000)
/lib64/ld-linux-x86-64.so.2 (0x00007f722f91c000)

The correct one should be :
linux-vdso.so.1 => (0x00007ffc0717d000)
/usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8f1127f000)
libopenblas.so.0 => /opt/OpenBLAS/lib/libopenblas.so.0 (0x00007f8f104da000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8f101a8000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f8f0ff98000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8f0fd82000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8f0fb64000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8f0f79e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8f11586000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f8f0f485000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f8f0f248000)

Regards.

@ruiaf
Copy link

ruiaf commented Jun 15, 2015

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants