Compiling Caffe SSD on Jetson TX1 (Ubuntu 16.04)

The error I get:

/usr/bin/ld: cannot find -lopenblas
collect2: error: ld returned 1 exit status
Makefile:568: recipe for target ‘.build_release/lib/libcaffe.so.1.0.0-rc3’ failed

The changes I made:

Makefile.config

#INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
#LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/aarch64-linux-gnu/hdf5/serial/

Makefile

#LIBRARIES += glog gflags protobuf boost_system boost_filesystem boost_regex m hdf5_hl hdf5
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)

NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)

Any leads will be appreciated.

Thanks

/usr/bin/ld: cannot find -lopenblas

Looks for linking libcaffe.so, the linker fails to find libopenblas.so.

Do you have openblas installed ?

sudo apt search openblas |grep installed

should tell you if you have a version installed.

If not, you have to install openblas first :

sudo apt-get install libopenblas-base

When or if already installed, you have to find in which folder is installed libopenblas.so.
If libopenblas.so is in standard /usr/lib, you can skip this step.
Otherwise, add this path to to environment variable LD_LIBRARY_PATH.
For example, if libopenblas.so is in folder /opt/openblas/lib, in your shell type

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openblas/lib

for adding this path into the dynamic libs folders.

Then retry make.

i have same problem on jetson tx2
i tried the this solution but it still have the same error
-lopenblas

as it
appear
/usr/bin/ld/:cannot find -lopenblas

Hi ehabo333,

Please file your issue into TX2 board - [url]https://devtalk.nvidia.com/default/board/188/jetson-tx2/[/url]

Thanks