jolibrain / deepdetect

Deep Learning API and Server in C++14 support for Caffe, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE
https://www.deepdetect.com/
Other
2.52k stars 560 forks source link

Error building DD on Jetson TX2 #319

Closed tdcxs closed 7 years ago

tdcxs commented 7 years ago

Hi,

I try to build DeepDetect on Ubuntu 16.04 LTS on Jetson TX2.

I followed all the steps described on your Installation page : https://www.deepdetect.com/overview/installing/ but I always have an error during "make" process due to __"arm_neon.h"__ and "detection_output_layer". I already tried this (https://github.com/BVLC/caffe/issues/4957#issuecomment-280336077) and this (https://github.com/beniz/deepdetect/issues/278#issuecomment-287520738) but it doesn't fix the problem.

Here are the steps and messages : https://gist.github.com/tdcXSun/e0a954402f99b2d1d22a679fa9d7f0c0

Does someone have any idea ? Thx

beniz commented 7 years ago

Related to https://github.com/beniz/deepdetect/issues/278

beniz commented 7 years ago

Please fill out the relevant fields of the issue template, and make sure to report your gcc version.

tdcxs commented 7 years ago

Hi, thank you for your answer.

I think the main relevant fields are here as I used the template to open this issue. Here is the gcc version : (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

beniz commented 7 years ago

Ah, you are not using baseline NVidia Ubuntu 16.04 image ?

tdcxs commented 7 years ago

Yes, I use it as I installed Linux4Tegra 27.1 (64-bit Ubuntu 16.04, Kernel 4.4) with NVIDIA JetPack 3.0 https://developer.nvidia.com/embedded/jetpack

beniz commented 7 years ago

But linaro does not come with jetpack as default, or does it now ?

tdcxs commented 7 years ago

No, I don't think so. Besides, I don't know why "Linaro" appeared here. Does it mean I have the wrong gcc version ?

I checked the Ubuntu version on my JTX2 : nvidia@tegra-ubuntu:~$ lsb_release -d Description: Ubuntu 16.04.2 LTS

beniz commented 7 years ago

Maybe this is not the issue then. We have TX1 / jetpack builds but they are not up to date, and they'll start being updated in the second part of June as someone is joining us to take care of the various platforms.

At this stage, I think the best for you is to try to identify what part of the detection_output file code is generating these errors.

tdcxs commented 7 years ago

Ok, as I tried to do "make" several times, I noticed that arm_neon.h(xx): error: identifier "__xxxxx_t" is undefined occurred randomly while building/compiling .cu files with nvcc.

I think that one #include or declaration in detection_output_layer.hpp calls arm_neon library but I don't know how to correct it and even if this is the real issue. I have no further idea.

beniz commented 7 years ago

I don't think it happens randomly: just that the make call uses multiple processes so the exact sequence of files being compiled can vary. Check whether you can get us an access to your TX2, and we'll see whether someone here can take a look at it until the multi-platform builds kick in again here.

tdcxs commented 7 years ago

Why not letting you access to the TX2. But I've never done that before. What would the procedure be ?

beniz commented 7 years ago

You'll need to make it available through ssh over the Internet. Contact me directly via gitter or email when you have set it up.

tdcxs commented 7 years ago

Finally, it worked, at least for the building of DD. It is a bug on OpenCV 3.2.0.

I found on this topic DevTalk Nvidia that OpenCV 3.2.0 has some issue with Neon library. As suggested in the topic, I removed OpenCV 3.2.0 and installed OpenCV 3.1.0.

I had issues with /usr/bin/ld: cannot find -lhdf5_hl and /usr/bin/ld: cannot find -lhdf5 and had to fix them with :

And then in deepdetect/build :

  1. cmake (check whether the version of OpenCV is 3.1.0)
  2. make clean
  3. make

May it be useful for someone else !

beniz commented 6 years ago

Jetson builds are now available from the build system via cmake, see the main README file.