JetsonHacksNano / installLibrealsense

Build and install Intel's librealsense for the NVIDIA Jetson Nano Developer Kit
MIT License
153 stars 68 forks source link

/librealsense/common/fw-update-helper.cpp:15:10:fatal error:common/fw/D4xx_fw_Image.h:No such file or directory #18

Open leelaser opened 5 years ago

leelaser commented 5 years ago

fatal error:common/fw/D4xx_fw_Image.h:No such file or directory

lights0123 commented 5 years ago

I was able to build this when I changed LIBREALSENSE_VERSION in install-librealsense.sh to LIBREALSENSE_VERSION=v2.25.0. I also changed the cmake line to:

/usr/bin/cmake ../ -DBUILD_WITH_CUDA="$USE_CUDA" -DCMAKE_BUILD_TYPE=release -DBUILD_PYTHON_BINDINGS=bool:true -DBUILD_EXAMPLES=OFF -DIMPORT_DEPTH_CAM_FW=OFF -DBUILD_WITH_TM2=OFF

I also changed patches/model-views.patch to:

diff --git a/common/fw-update-helper.cpp b/common/fw-update-helper.cpp
index 4ad9737c..d069f9ce 100644
--- a/common/fw-update-helper.cpp
+++ b/common/fw-update-helper.cpp
@@ -11,13 +11,8 @@

 #include "os.h"

-#ifdef INTERNAL_FW
-#include "common/fw/D4XX_FW_Image.h"
-#include "common/fw/SR3XX_FW_Image.h"
-#else
 #define FW_D4XX_FW_IMAGE_VERSION ""
 #define FW_SR3XX_FW_IMAGE_VERSION ""
-#endif // INTERNAL_FW

 namespace rs2
 {
@@ -45,7 +40,7 @@ namespace rs2
     std::map<int, std::vector<uint8_t>> create_default_fw_table()
     {
         std::map<int, std::vector<uint8_t>> rv;
-
+#if 0
         if ("" != FW_D4XX_FW_IMAGE_VERSION)
         {
             int size = 0;
@@ -61,7 +56,7 @@ namespace rs2
             auto vec = std::vector<uint8_t>(hex, hex + size);
             rv[RS2_PRODUCT_LINE_SR300] = vec;
         }
-
+#endif
         return rv;
     }

diff --git a/common/model-views.cpp b/common/model-views.cpp
index b3c29b97..0d79ffab 100644
--- a/common/model-views.cpp
+++ b/common/model-views.cpp
@@ -3131,6 +3131,7 @@ namespace rs2
                 }
             }
             catch (...) {}
+            std::this_thread::sleep_for(std::chrono::milliseconds(5));
         }
     }

Note that this disables the firmware upgrade feature and all examples, but that's a temporary workaround.

HomeLH commented 5 years ago

use this command ~/librealsense/build$ cmake ..

Details at https://github.com/IntelRealSense/librealsense/issues/4420