facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

Build fails on AWS Deep Learning AMI Ubuntu 16.04 #1804

Open Mastergalen opened 6 years ago

Mastergalen commented 6 years ago

If this is a build issue, please fill out the template below.

System information

I'm on AWS running the Deep Learning AMI (Ubuntu) v2.0, within the source activate caffe2_p27 environment.

I'm trying to update the already installed caffe2, in order to get the Detectron module.

CMake summary output

Steps to reproduce:

cd caffe2
mkdir build && cd build
cmake .. # Succeeds, no errors
make # Fails, output below:
....
Scanning dependencies of target speed_benchmark
[ 94%] Building CXX object caffe2/binaries/CMakeFiles/speed_benchmark.dir/speed_benchmark.cc.o
[ 94%] Linking CXX executable ../../bin/speed_benchmark
[ 94%] Built target speed_benchmark
Scanning dependencies of target print_registered_core_operators
[ 94%] Building CXX object caffe2/binaries/CMakeFiles/print_registered_core_operators.dir/print_registered_core_operators.cc.o [ 94%] Linking CXX executable ../../bin/print_registered_core_operators
[ 94%] Built target print_registered_core_operators
Scanning dependencies of target inspect_gpus
[ 94%] Building CXX object caffe2/binaries/CMakeFiles/inspect_gpus.dir/inspect_gpus.cc.o
[ 94%] Linking CXX executable ../../bin/inspect_gpus
/usr/bin/ld: /usr/local/cuda/lib64/libcudart_static.a(libcudart_static.a.o): undefined reference to symbol 'shm_unlink@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/librt.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [caffe2/binaries/CMakeFiles/inspect_gpus.dir/build.make:120: bin/inspect_gpus] Error 1
make[1]: *** [CMakeFiles/Makefile2:4956: caffe2/binaries/CMakeFiles/inspect_gpus.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
pjh5 commented 6 years ago

@pietern do you know any specifics about the AWS setup?

Mastergalen commented 6 years ago

Using the Deep Learning Base AMI, which does not have Caffe2 pre-installed, I was able to build from source without issue.