Open Andrea-Oliveri opened 4 years ago
Good morning, Andrea!
Seems that there is some problem with linking protobuf when compiling eddl. Let's try one thing. With the environment set up as you have (and all the environment variables properly set up) try to run again the eddl cmake command line, which according to the bitácora is: $cmake -D BUILD_SHARED_LIB=ON -D BUILD_PROTOBUF=ON -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=${HOME}/installs/install_eddl -D CMAKE_PREFIX_PATH=${HOME}/installs/install_protobuf ..
After that, copy and paste here cmake output so we can see if CMAKE is detecting protobuf in your machine.
(eddl) $ cmake -D BUILD_SHARED_LIB=ON -D BUILD_PROTOBUF=ON -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=/scrap/users/oliveri/hackatlon/installs/install_eddl -D CMAKE_PREFIX_PATH=/scrap/users/oliveri/hackatlon/instal
ls/install_protobuf ..
running /scrap/users/oliveri/hackatlon/installs/install_protobuf/bin/protoc --cpp_out /scrap/users/oliveri/hackatlon/temp/pyecvl/third_party/pyeddl/third_party/eddl/src/serialization/onnx/ --proto_path /scrap/users/oliveri/hackatlon/temp/pyecvl/third_party/pyeddl/third_party/eddl/src/serialization/onnx/ onnx.proto 2>&1
-- Found OpenMP, version 4
Protobuf path: /scrap/users/oliveri/hackatlon/installs/install_protobuf/lib/libprotobuf.so;-pthread /scrap/users/oliveri/hackatlon/installs/install_protobuf/include
-- Install path: /scrap/users/oliveri/hackatlon/installs/install_eddl
-- ===========================================
-- ===========================================
-- Project name: eddl
-- Prefix path: /scrap/users/oliveri/hackatlon/installs/install_protobuf
-- Install prefix: /scrap/users/oliveri/hackatlon/installs/install_eddl
-- Archive output directory: /scrap/users/oliveri/hackatlon/temp/pyecvl/third_party/pyeddl/third_party/eddl/build/lib64
-- Library output directory: /scrap/users/oliveri/hackatlon/temp/pyecvl/third_party/pyeddl/third_party/eddl/build/lib64
-- Runtime output directory: /scrap/users/oliveri/hackatlon/temp/pyecvl/third_party/pyeddl/third_party/eddl/build/bin
-- -------------------------------------------
-- Build target: GPU
-- Build type: Release
-- Build tests: OFF
-- Build examples: ON
-- -------------------------------------------
-- Use OpenMP: ON
-- Use Protobuf: ON
-- Use HPC:
-- Use Intel-MKL:
-- -------------------------------------------
-- C++ compiler: GNU (/opt/rh/devtoolset-8/root/usr/bin/g++)
-- C++ flags: -fprofile-arcs -ftest-coverage -DEIGEN_FAST_MATH -pipe
-- C++ flags (release): -O3 -mtune=native
-- C++ flags (debug): -g -Og
-- -------------------------------------------
-- CUDA Enabled: ON
-- CUDA compiler: /usr/local/cuda-10.1/bin/nvcc
-- CUDA flags: --expt-relaxed-constexpr -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES -D__STRICT_ANSI__
-- CUDA toolkit: /usr/local/cuda-10.1/targets/x86_64-linux/include
-- -------------------------------------------
-- OpenMP version: 4
-- OpenMP gomp library: /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgomp.so
-- OpenMP pthread library: /lib64/libpthread.so
-- -------------------------------------------
-- Protobuf: /scrap/users/oliveri/hackatlon/installs/install_protobuf/include
-- Protobuf compiler: /scrap/users/oliveri/hackatlon/installs/install_protobuf/bin/protoc
-- -------------------------------------------
-- Eigen3: /home/oliveri/shares/local/scrap/miniconda3/envs/eddl/include/eigen3
-- ZLIB: /usr/include
-- ===========================================
-- ===========================================
-- Configuring done
CMake Warning at CMakeLists.txt:235 (add_library):
Cannot generate a safe linker search path for target eddl because files in
some directories may conflict with libraries in implicit directories:
link library [libgomp.so] in /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8 may be hidden by files in:
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
Some of these libraries may not be found correctly.
-- Generating done
-- Build files have been written to: /scrap/users/oliveri/hackatlon/temp/pyecvl/third_party/pyeddl/third_party/eddl/build
Perfect, Andrea. Seems that cmake is detecting protobuf properly.
Can you execute $echo $LD_LIBRARY_PATH
and send us the output?
Thanks.
(eddl) $ echo $LD_LIBRARY_PATH
/usr/local/cuda-10.1/lib64/:/usr/local/cuda-10.1/libnsight/:/usr/local/cuda-10.1/libnvvp/:/scrap/users/oliveri/hackatlon/installs/install_opencv/lib:/scrap/users/oliveri/hackatlon/installs/install_protobuf/lib:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib
It also seems good.
Let's double check also the content of $EDDL_DIR, $ECVL_DIR
and $CPATH
(eddl) $ echo $EDDL_DIR
/scrap/users/oliveri/hackatlon//installs/install_eddl
(eddl) $ echo $ECVL_DIR
/scrap/users/oliveri/hackatlon//installs/install_ecvl
(eddl) $ echo $CPATH
/scrap/users/oliveri/hackatlon//installs/install_opencv/include/opencv4/:/scrap/users/oliveri/miniconda3/envs/eddl/include/eigen3:
I installed the whole thing disabling protobuf (using -DBUILD_PROTOBUF=OFF
in the eddl cmake and export EDDL_WITH_PROTOBUF=OFF
before running python setup.py
install inside pyeddl). Now the import of pyeddl works (of course I can't use the onnx functions), however the import of pyecvl fails:
(eddl) $ python pneumothorax_segmentation_training.py
Traceback (most recent call last):
File "pneumothorax_segmentation_training.py", line 37, in <module>
import pyecvl.ecvl as ecvl
File "/home/oliveri/shares/local/scrap/miniconda3/envs/eddl/lib/python3.8/site-packages/pyecvl-0.3.0-py3.8-linux-x86_64.egg/pyecvl/ecvl.py", line 21, in <module>
from . import _core
ImportError: libopencv_core.so.4.1: cannot open shared object file: No such file or directory
Good Morning, I managed to install all libraries correctly following this. To compile everything, I always used gcc8 from the devtoolset-8. Unfortunately, when I try to run
python padchest_train.py
(and my eddl conda environment is activated) I get an error:Looking on the internet, and specifically here the issue seems to be related to different versions of gcc, or to a flag, which leads to names mismatches between the function entry points in libeddl.so and libprotobuf.so. As I said, I made sure to always use gcc8 for the whole process. I double-checked that libeddl.so was correctly linked to libprotobuf.so:
and then I checked that libprotobuf.so contained the undefined symbol:
strings /scrap/users/oliveri/hackatlon//installs/install_protobuf/lib/libprotobuf.so | grep _ZNK6google8protobuf7Message11GetTypeNameEv
had 3 matches. At this point, I really don't see where the issue could be... Thank you in advance for your help.