Fail to install OpenBLAS library in C-API.
Created by: qingqing01
When compiling the C-API with OpenBLAS, not mkl, the OpenBLAS library failed to install. The error occurs during the peroid of make install
:
-- Up-to-date: /home/dangqingqing/github/mobile/c-api/install/third_party/openblas/include/openblas_config.h
-- Up-to-date: /home/dangqingqing/github/mobile/c-api/install/third_party/openblas/include/cblas.h
CMake Error: cmake version 3.2.2
Usage: /home/dangqingqing/.jumbo/bin/cmake -E [command] [arguments ...]
Available commands:
chdir dir cmd [args]... - run command in a given directory
compare_files file1 file2 - check if file1 is same as file2
copy file destination - copy file to destination (either file or directory)
copy_directory source destination - copy directory 'source' content to directory 'destination'
copy_if_different in-file out-file - copy file if input has changed
echo [string]... - displays arguments as text
echo_append [string]... - displays arguments as text but no new line
env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...
- run command in a modified environment
environment - display the current environment
make_directory dir - create a directory
md5sum file1 [...] - compute md5sum of files
remove [-f] file1 file2 ... - remove the file(s), use -f to force it
remove_directory dir - remove a directory and its contents
rename oldname newname - rename a file or directory (on one volume)
tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 ...]
- create or extract a tar or zip archive
sleep <number>... - sleep for given number of seconds
time command [args] ... - run command and return elapsed time
touch file - touch a file.
touch_nocreate file - touch a file but do not create it.
Available on UNIX only:
create_symlink old new - create a symbolic link new -> old
-- Installing: /home/dangqingqing/.third_party//install/openblas/lib -> /home/dangqingqing/github/mobile/c-api/install/third_party/openblas/lib
-- Up-to-date: /home/dangqingqing/github/mobile/c-api/install/bin/paddle
Then there will be a link error when using the paddle C-API library.
MathFunctions.cpp:(.text+0x95): undefined reference to `cblas_dgemm'
/home/dangqingqing/github/mobile/c-api/install/lib/libpaddle_capi_engine.a(MathFunctions.cpp.o): In function `void paddle::axpy<float>(int, float, float const*, float*)':
MathFunctions.cpp:(.text+0x5d4): undefined reference to `cblas_saxpy'
/home/dangqingqing/github/mobile/c-api/install/lib/libpaddle_capi_engine.a(MathFunctions.cpp.o): In function `void paddle::axpy<double>(int, double, double const*, double*)':
MathFunctions.cpp:(.text+0x5f4): undefined reference to `cblas_daxpy'
/home/dangqingqing/github/mobile/c-api/install/lib/libpaddle_capi_engine.a(MathFunctions.cpp.o): In function `float paddle::dotProduct<float>(int, float const*, float const*)':
MathFunctions.cpp:(.text+0x614): undefined reference to `cblas_sdot'
/home/dangqingqing/github/mobile/c-api/install/lib/libpaddle_capi_engine.a(MathFunctions.cpp.o): In function `double paddle::dotProduct<double>(int, double const*, double const*)':
MathFunctions.cpp:(.text+0x634): undefined reference to `cblas_ddot'
And I must copy the OpenBlas library to the installation package of the paddle by myself.