build error of aditof_sdk for jetson nano

Hello,

I have a problem with  Jetson Nano SD card image for AD-96TOF1-EBZ, can you help me please?

===========================================================

case #1

-------

git pull
mkdir build && cd build
cmake -DJETSON=1 -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" ..
make
------
Result : Build error as below
------


=====================================================================================================

case #2

git clone github.com/.../aditof_sdk
cd aditof_sdk
mkdir build && cd build
cmake -DJETSON=1 -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" ..
make
-----
Result : Built error as below
-----
analog@analog-desktop:~/workspace/github$ git clone github.com/.../aditof_sdk
Cloning into 'aditof_sdk'...
remote: Enumerating objects: 254, done.
remote: Counting objects: 100% (254/254), done.
remote: Compressing objects: 100% (179/179), done.
remote: Total 7193 (delta 113), reused 156 (delta 65), pack-reused 6939
Receiving objects: 100% (7193/7193), 80.19 MiB | 370.00 KiB/s, done.
Resolving deltas: 100% (4419/4419), done.
analog@analog-desktop:~/workspace/github$ cd aditof_sdk
analog@analog-desktop:~/workspace/github/aditof_sdk$ ls build
ls: cannot access 'build': No such file or directory
analog@analog-desktop:~/workspace/github/aditof_sdk$ mkdir build
analog@analog-desktop:~/workspace/github/aditof_sdk$ cd build
analog@analog-desktop:~/workspace/github/aditof_sdk/build$ cmake -DJETSON=1 -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" ..
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found Protobuf: /opt/protobuf/lib/libprotobuf.a;-lpthread (found suitable version "3.9.0", minimum required is "3.9.0") 
-- Found OpenCV: /usr (found version "4.1.1") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/analog/workspace/github/aditof_sdk/build
analog@analog-desktop:~/workspace/github/aditof_sdk/build$ make
[  2%] Running C++ protocol buffer compiler on src/connections/network/buffer.proto
Scanning dependencies of target aditof
[  4%] Building CXX object sdk/CMakeFiles/aditof.dir/src/camera_factory.cpp.o
[  6%] Building CXX object sdk/CMakeFiles/aditof.dir/src/device_enumerator_factory.cpp.o
[  8%] Building CXX object sdk/CMakeFiles/aditof.dir/src/device_enumerator_impl.cpp.o
[ 10%] Building CXX object sdk/CMakeFiles/aditof.dir/src/device_factory.cpp.o
[ 12%] Building CXX object sdk/CMakeFiles/aditof.dir/src/eeprom_factory.cpp.o
[ 14%] Building CXX object sdk/CMakeFiles/aditof.dir/src/ethernet_device.cpp.o
[ 17%] Building CXX object sdk/CMakeFiles/aditof.dir/src/ethernet_eeprom.cpp.o
[ 19%] Building CXX object sdk/CMakeFiles/aditof.dir/src/filters_factory.cpp.o
[ 21%] Building CXX object sdk/CMakeFiles/aditof.dir/src/frame.cpp.o
[ 23%] Building CXX object sdk/CMakeFiles/aditof.dir/src/frame_impl.cpp.o
[ 25%] Building CXX object sdk/CMakeFiles/aditof.dir/src/frame_operations.cpp.o
[ 27%] Building CXX object sdk/CMakeFiles/aditof.dir/src/system.cpp.o
[ 29%] Building CXX object sdk/CMakeFiles/aditof.dir/src/system_impl.cpp.o
[ 31%] Building CXX object sdk/CMakeFiles/aditof.dir/src/usb_device.cpp.o
[ 34%] Building CXX object sdk/CMakeFiles/aditof.dir/src/utils.cpp.o
[ 36%] Building CXX object sdk/CMakeFiles/aditof.dir/src/variance_filter.cpp.o
[ 38%] Building CXX object sdk/CMakeFiles/aditof.dir/src/connections/mipi/local_device.cpp.o
In file included from /home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/local_device.cpp:33:0:
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/target_definitions.h:43:20: warning: TEMP_SENSOR_REPLACEMENT_DEV_PATH’ defined but not used [-Wunused-variable]
 static const char *TEMP_SENSOR_REPLACEMENT_DEV_PATH = "";
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/target_definitions.h:40:20: warning: EEPROM_REPLACEMENT_PATH’ defined but not used [-Wunused-variable]
 static const char *EEPROM_REPLACEMENT_PATH =
                    ^~~~~~~~~~~~~~~~~~~~~~~
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/target_definitions.h:38:20: warning: EEPROM_DEV_PATH’ defined but not used [-Wunused-variable]
 static const char *EEPROM_DEV_PATH = "/sys/bus/i2c/devices/6-0056/eeprom";
                    ^~~~~~~~~~~~~~~
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/target_definitions.h:35:20: warning: EEPROM_NAME’ defined but not used [-Wunused-variable]
 static const char *EEPROM_NAME = "24c1024";
                    ^~~~~~~~~~~
[ 40%] Building CXX object sdk/CMakeFiles/aditof.dir/src/connections/mipi/local_eeprom.cpp.o
[ 42%] Building CXX object sdk/CMakeFiles/aditof.dir/src/connections/mipi/usb_device.cpp.o
[ 44%] Building CXX object sdk/CMakeFiles/aditof.dir/src/connections/mipi/usb_eeprom.cpp.o
[ 46%] Building C object sdk/CMakeFiles/aditof.dir/src/connections/mipi/temp_sensor.c.o
[ 48%] Building CXX object sdk/CMakeFiles/aditof.dir/src/connections/mipi/jetson/device_enumerator_jetson.cpp.o
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/device_enumerator_jetson.cpp: In member function ‘virtual aditof::Status DeviceEnumeratorImpl::findDevices(std::vector<aditof::DeviceConstructionData>&)’:
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/device_enumerator_jetson.cpp:68:22: warning: unused variable ‘video’ [-Wunused-variable]
     for (const auto &video : videoPaths) {
                      ^~~~~
In file included from /home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/device_enumerator_jetson.cpp:33:0:
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/target_definitions.h: At global scope:
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/target_definitions.h:45:20: warning: CAPTURE_DEVICE_NAME’ defined but not used [-Wunused-variable]
 static const char *CAPTURE_DEVICE_NAME = "vi-output, addi9036 6-0064";
                    ^~~~~~~~~~~~~~~~~~~
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/target_definitions.h:43:20: warning: TEMP_SENSOR_REPLACEMENT_DEV_PATH’ defined but not used [-Wunused-variable]
 static const char *TEMP_SENSOR_REPLACEMENT_DEV_PATH = "";
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/target_definitions.h:40:20: warning: EEPROM_REPLACEMENT_PATH’ defined but not used [-Wunused-variable]
 static const char *EEPROM_REPLACEMENT_PATH =
                    ^~~~~~~~~~~~~~~~~~~~~~~
/home/analog/workspace/github/aditof_sdk/sdk/src/connections/mipi/jetson/target_definitions.h:37:20: warning: TEMP_SENSOR_DEV_PATH’ defined but not used [-Wunused-variable]
 static const char *TEMP_SENSOR_DEV_PATH = "/dev/i2c-6";
                    ^~~~~~~~~~~~~~~~~~~~
[ 51%] Building CXX object sdk/CMakeFiles/aditof.dir/src/cameras/ad-96tof1-ebz/calibration_96tof1.cpp.o
[ 53%] Building CXX object sdk/CMakeFiles/aditof.dir/src/cameras/ad-96tof1-ebz/camera_96tof1.cpp.o
[ 55%] Building CXX object sdk/CMakeFiles/aditof.dir/src/connections/usb/usb_utils.cpp.o
[ 57%] Building CXX object sdk/CMakeFiles/aditof.dir/src/connections/network/device_enumerator_ethernet.cpp.o
[ 59%] Building CXX object sdk/CMakeFiles/aditof.dir/src/connections/network/network.cpp.o
[ 61%] Building CXX object sdk/CMakeFiles/aditof.dir/buffer.pb.cc.o
[ 63%] Linking CXX shared library libaditof.so
[ 63%] Built target aditof
Scanning dependencies of target eeprom-tool
[ 65%] Building CXX object tools/eeprom-tool/CMakeFiles/eeprom-tool.dir/main.cpp.o
[ 68%] Building CXX object tools/eeprom-tool/CMakeFiles/eeprom-tool.dir/eeprom_tool.cpp.o
[ 70%] Building CXX object tools/eeprom-tool/CMakeFiles/eeprom-tool.dir/cam96tof1_eeprom.cpp.o
[ 72%] Building CXX object tools/eeprom-tool/CMakeFiles/eeprom-tool.dir/cli_helper.cpp.o
[ 74%] Building CXX object tools/eeprom-tool/CMakeFiles/eeprom-tool.dir/camera_eeprom_factory.cpp.o
[ 76%] Linking CXX executable eeprom-tool
../../sdk/libaditof.so.1.6.0: undefined reference to `SSL_get_ex_new_index'
../../sdk/libaditof.so.1.6.0: undefined reference to `SSL_COMP_free_compression_methods'
../../sdk/libaditof.so.1.6.0: undefined reference to `SSL_CTX_get_ex_new_index'
../../sdk/libaditof.so.1.6.0: undefined reference to `ERR_free_strings'
../../sdk/libaditof.so.1.6.0: undefined reference to `SSL_load_error_strings'
../../sdk/libaditof.so.1.6.0: undefined reference to `SSL_library_init'
../../sdk/libaditof.so.1.6.0: undefined reference to `OPENSSL_add_all_algorithms_noconf'
../../sdk/libaditof.so.1.6.0: undefined reference to `EVP_cleanup'
../../sdk/libaditof.so.1.6.0: undefined reference to `SSLv23_server_method'
../../sdk/libaditof.so.1.6.0: undefined reference to `sk_value'
../../sdk/libaditof.so.1.6.0: undefined reference to `CRYPTO_cleanup_all_ex_data'
collect2: error: ld returned 1 exit status
tools/eeprom-tool/CMakeFiles/eeprom-tool.dir/build.make:200: recipe for target 'tools/eeprom-tool/eeprom-tool' failed
make[2]: *** [tools/eeprom-tool/eeprom-tool] Error 1
CMakeFiles/Makefile2:190: recipe for target 'tools/eeprom-tool/CMakeFiles/eeprom-tool.dir/all' failed
make[1]: *** [tools/eeprom-tool/CMakeFiles/eeprom-tool.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
analog@analog-desktop:~/workspace/github/aditof_sdk/build$ 
========================================================================================================

Best regards,

H.Kashima

Parents
  • +1
    •  Analog Employees 
    on Nov 23, 2020 10:08 AM 3 months ago

    Hi,

    It looks like websockets was linked to a version of openSSL. And in the meantime, the operating system was updated with a newer version of openSSL which doesn't have the functions that appear in your build log.

    You need to rebuild websockets. Check the steps at (see Libwebsockets section):

    https://github.com/analogdevicesinc/aditof_sdk/blob/master/doc/linux/build_instructions.md

    And then rebuild the aditof_sdk.

    Or, if you don't care about the network component (you just want to run things on the Jetson Nano) you can disable this component and you won't need websockets nor protobuf dependecies. You can disabled it from cmake:

     cmake -DJETSON=1 -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" -DWITH_NETWORK=OFF ..

    -Dan

  • Hi,

    Thanks for your advice.

    After rebuilding websockes, I confirmed that aditof-sdk could be built successfully, either  1.6.0 or 1.5.0.

    Unfortunately, when I ran imshow_jetson, I got following error messages.

    analog@analog-desktop:~/workspace/github/aditof_sdk-1.5.0/build/examples/imshow-jetson$ ./imshow-jetson 
    I1124 10:29:51.048233 10825 device_enumerator_jetson.cpp:47] Looking for devices on the target
    I1124 10:29:51.049988 10825 device_enumerator_jetson.cpp:80] Looking at: /dev/video0 for an eligible TOF camera
    I1124 10:29:51.050840 10825 system_impl.cpp:62] System initialized
    I1124 10:29:51.050916 10825 camera_96tof1.cpp:74] Initializing camera
    I1124 10:29:51.050945 10825 local_device.cpp:153] Opening device
    Error eeprom_open: Permission denied
    W1124 10:29:51.074218 10825 local_device.cpp:234] EEPROM not available!
    W1124 10:29:51.074589 10825 local_device.cpp:661] EEPROM not available!
    W1124 10:29:51.074653 10825 local_device.cpp:642] EEPROM not available!
    I1124 10:29:51.074700 10825 calibration_96tof1.cpp:163] EEPROM calibration data size 100 bytes
    W1124 10:29:51.074775 10825 local_device.cpp:642] EEPROM not available!
    W1124 10:29:51.074831 10825 calibration_96tof1.cpp:175] Failed to read from eeprom
    W1124 10:29:51.074882 10825 camera_96tof1.cpp:85] Failed to read calibration data from eeprom
    E1124 10:29:51.074925 10825 main.cpp:108] Could not initialize camera!
    Segmentation fault (core dumped)
    analog@analog-desktop:~/workspace/github/aditof_sdk-1.5.0/build/examples/imshow-jetson$ 
    

    [ 2484.470194] addi9036 6-0064: camera_common_mclk_enable: enable MCLK with 37125000 Hz
    [ 2484.470225] addi9036 6-0064: camera_common_dpd_disable: csi 0
    [ 2484.470350] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x64
    [ 2484.478664] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x64
    [ 2484.485433] addi9036 6-0064: camera_common_dpd_enable: csi 0
    [ 2484.485438] addi9036 6-0064: camera_common_mclk_disable: disable MCLK
    [ 2525.507478] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [ 2525.507545] Bluetooth: BNEP socket layer initialized
     


    My hardware environment is shown below.


    Best regards,
    H.Kashima

  • 0
    •  Analog Employees 
    on Nov 24, 2020 9:00 AM 3 months ago in reply to HYKS

    Looks like extra permission is needed to access the EEPROM (Error eeprom_open: Permission denied)

    Can you please try to run the example with sudo?

    sudo ./imshow-jetson
  • Hi ,

    I tried to run with sudo, but I still got the same error messages.

    analog@analog-desktop:~/workspace/github/aditof_sdk-1.5.0/build/examples/imshow-jetson$ sudo ./imshow-jetson 
    [sudo] password for analog: 
    I1124 11:02:06.724707 12794 device_enumerator_jetson.cpp:47] Looking for devices on the target
    I1124 11:02:06.726727 12794 device_enumerator_jetson.cpp:80] Looking at: /dev/video0 for an eligible TOF camera
    I1124 11:02:06.727660 12794 system_impl.cpp:62] System initialized
    I1124 11:02:06.727783 12794 camera_96tof1.cpp:74] Initializing camera
    I1124 11:02:06.727824 12794 local_device.cpp:153] Opening device
    Error eeprom_open: Permission denied
    W1124 11:02:06.751551 12794 local_device.cpp:234] EEPROM not available!
    W1124 11:02:06.752228 12794 local_device.cpp:661] EEPROM not available!
    W1124 11:02:06.752281 12794 local_device.cpp:642] EEPROM not available!
    I1124 11:02:06.752323 12794 calibration_96tof1.cpp:163] EEPROM calibration data size 100 bytes
    W1124 11:02:06.752393 12794 local_device.cpp:642] EEPROM not available!
    W1124 11:02:06.752441 12794 calibration_96tof1.cpp:175] Failed to read from eeprom
    W1124 11:02:06.752486 12794 camera_96tof1.cpp:85] Failed to read calibration data from eeprom
    E1124 11:02:06.752526 12794 main.cpp:108] Could not initialize camera!
    Segmentation fault
    analog@analog-desktop:~/workspace/github/aditof_sdk-1.5.0/build/examples/imshow-jetson$ 

    Best regards,

    H.Kashima

Reply
  • Hi ,

    I tried to run with sudo, but I still got the same error messages.

    analog@analog-desktop:~/workspace/github/aditof_sdk-1.5.0/build/examples/imshow-jetson$ sudo ./imshow-jetson 
    [sudo] password for analog: 
    I1124 11:02:06.724707 12794 device_enumerator_jetson.cpp:47] Looking for devices on the target
    I1124 11:02:06.726727 12794 device_enumerator_jetson.cpp:80] Looking at: /dev/video0 for an eligible TOF camera
    I1124 11:02:06.727660 12794 system_impl.cpp:62] System initialized
    I1124 11:02:06.727783 12794 camera_96tof1.cpp:74] Initializing camera
    I1124 11:02:06.727824 12794 local_device.cpp:153] Opening device
    Error eeprom_open: Permission denied
    W1124 11:02:06.751551 12794 local_device.cpp:234] EEPROM not available!
    W1124 11:02:06.752228 12794 local_device.cpp:661] EEPROM not available!
    W1124 11:02:06.752281 12794 local_device.cpp:642] EEPROM not available!
    I1124 11:02:06.752323 12794 calibration_96tof1.cpp:163] EEPROM calibration data size 100 bytes
    W1124 11:02:06.752393 12794 local_device.cpp:642] EEPROM not available!
    W1124 11:02:06.752441 12794 calibration_96tof1.cpp:175] Failed to read from eeprom
    W1124 11:02:06.752486 12794 camera_96tof1.cpp:85] Failed to read calibration data from eeprom
    E1124 11:02:06.752526 12794 main.cpp:108] Could not initialize camera!
    Segmentation fault
    analog@analog-desktop:~/workspace/github/aditof_sdk-1.5.0/build/examples/imshow-jetson$ 

    Best regards,

    H.Kashima

Children