• DepthAI-v2
  • Not able to generate libdepthai-core.so on Raspberry Pi 4 + Ubuntu 20.04

I'm trying to generate the shared library for versiΓ³n 2.4 from depthai-core, I am able to obtain the .a static library but when I try to generate the. So library, all the time I am obtain a relocation R_AARCH64_ADR_PREL_PG_HI21 error and the Message suggest me to add -fPIC

I'm adding this option to the cmake but anywhere the errors persist, can you help me with the cause of this error

I'm using the OAK-D camera and a raspberry pi 4 4GB

Thanks for your help

    Hi henryportilla
    Did you follow this steps: https://github.com/luxonis/depthai-core#dynamic-library ?
    What happens in background is that with that option set, the dependencies as well as the library are compiled with -fPIC as required to be able to create relocatable shared library. After compiling with this option set, you should get .so files

    If the above will cause any additional issues for you, please let me knowπŸ™‚

    Thanks fou your answer, But following this guideline I'm not able to compile the libdepthai-core.so version 2.4 under the raspberry Pi 4 + Ubuntu 20.04

    this is the result, on my system

    Linux Pi3DCamera 5.4.0-1035-raspi #38-Ubuntu SMP PREEMPT Tue Apr 20 21:37:03 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux with g++ compiler: g++ (Ubuntu/Linaro 8.4.0-3ubuntu2) 8.4.0
    I tried several compiler versions but the results are the same: relocation error

    From another side I am able to compile using the multiarch docker image from luxonis inside the Pi, it contains version 2.3 of depthai-core and g++ compiler version
    g++ (Debian 8.3.0-6) 8.3.0

    I'm not sure which is the cause but it seems the compiler version and their support for -fPIC

    Also it seems that the docker is based on Ubuntu 18.04

    @henryportilla sorry for late response.
    Can you remove the build directory in depthai-core: rm -r depthai-core/build and then start from scratch but first start a script:

    script steps_done.sh
    uname -a
    # Continue with steps that you made which show the -fPIC error
    # ...
    exit

    Then at the end, upload the script_done.sh file here (or link to it).

    This will be the easiest for me to cross check your environment, output and steps taken.
    Thanks

    my system is
    Linux Pi3DCamera 5.4.0-1035-raspi #38-Ubuntu SMP PREEMPT Tue Apr 20 21:37:03 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

    and the output of building

    ubuntu@Pi3DCamera:/Projects/depthai-core$ cmake -H. -Bbuild -D BUILD_SHARED_LIBS=ON
    -- The CXX compiler identification is GNU 8.4.0
    -- The C compiler identification is GNU 8.4.0
    -- 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
    -- 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
    -- Setting build type to 'Debug' as none was specified.
    -- Found Git: /usr/bin/git (found version "2.25.1")
    -- [hunter] Calculating Toolchain-SHA1
    -- [hunter] Calculating Config-SHA1
    -- [hunter] HUNTER_ROOT: /home/ubuntu/.hunter
    -- [hunter] [ Hunter-ID: 062a19a | Toolchain-ID: 856b483 | Config-ID: 27c8df6 ]
    -- [hunter] NLOHMANN_JSON_ROOT: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install (ver.: 3.9.1)
    -- [hunter] XLINK_ROOT: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install (ver.: luxonis-2021.2-develop)
    -- [hunter] BZIP2_ROOT: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install (ver.: 1.0.8-p0)
    -- [hunter] FP16_ROOT: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install (ver.: 0.0.0-febbb1c-p0)
    -- [hunter] LIBARCHIVE_ROOT: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install (ver.: 3.4.2-p2)
    -- [hunter] SPDLOG_ROOT: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install (ver.: 1.8.2)
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
    -- 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 nlohmann_json: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.9.1")
    -- Performing Test FLAG
    -Wall
    -- Performing Test FLAG-Wall - Success
    -- Performing Test FLAG
    -Wextra
    -- Performing Test FLAG-Wextra - Success
    -- Performing Test FLAG
    -Woverloaded-virtual
    -- Performing Test FLAG-Woverloaded-virtual - Success
    -- Performing Test FLAG
    -Wformat=2
    -- Performing Test FLAG-Wformat=2 - Success
    -- Performing Test FLAG
    -Wmisleading-indentation
    -- Performing Test FLAG-Wmisleading-indentation - Success
    -- Performing Test FLAG
    -Wduplicated-cond
    -- Performing Test FLAG-Wduplicated-cond - Success
    -- Performing Test FLAG
    -Wduplicated-branches
    -- Performing Test FLAG-Wduplicated-branches - Success
    -- Performing Test FLAG
    -Wnull-dereference
    -- Performing Test FLAG-Wnull-dereference - Success
    -- Performing Test FLAG
    -Wdouble-promotion
    -- Performing Test FLAG-Wdouble-promotion - Success
    -- Performing Test FLAG
    -Wsign-compare
    -- Performing Test FLAG-Wsign-compare - Success
    -- Performing Test FLAG
    -Wtype-limits
    -- Performing Test FLAG-Wtype-limits - Success
    -- Performing Test FLAG
    -Wno-unused-command-line-argument
    -- Performing Test FLAG-Wno-unused-command-line-argument - Failed
    -- Performing Test FLAG
    -Wno-unused-parameter
    -- Performing Test FLAG-Wno-unused-parameter - Success
    -- Performing Test FLAG
    -Wno-format-nonliteral
    -- Performing Test FLAG-Wno-format-nonliteral - Success
    -- Performing Test FLAG
    -Wno-gnu-zero-variadic-macro-arguments
    -- Performing Test FLAG-Wno-gnu-zero-variadic-macro-arguments - Failed
    -- Performing Test FLAG
    -Werror=self-assign-field
    -- Performing Test FLAG-Werror=self-assign-field - Failed
    -- Performing Test FLAG
    -Werror=unused-lambda-capture
    -- Performing Test FLAG-Werror=unused-lambda-capture - Failed
    -- Performing Test FLAG
    -Werror=return-type
    -- Performing Test FLAG-Werror=return-type - Success
    -- Performing Test FLAG
    -Werror=non-virtual-dtor
    -- Performing Test FLAG-Werror=non-virtual-dtor - Success
    -- Performing Test FLAG
    -Werror=sign-compare
    -- Performing Test FLAG-Werror=sign-compare - Success
    -- Performing Test FLAG
    -Werror=reorder
    -- Performing Test FLAG-Werror=reorder - Success
    -- Performing Test FLAG
    -Werror=switch-enum
    -- Performing Test FLAG-Werror=switch-enum - Success
    -- Compiling depthai-core resources in PATCH_ONLY mode
    -- Downloading Depthai device side binaries from server...
    -- Downloading depthai and patch
    -- commit: c347a77dde101e8775fab754b24b7212cbed47d4
    -- depthai-shared between device and host MATCH!. (device: c347a77dde101e8775fab754b24b7212cbed47d4, host: c347a77dde101e8775fab754b24b7212cbed47d4
    -- Downloading and checking depthai-device-fwp.tar.xz
    -- [download 0% complete]
    -- [download 1% complete]
    -- [download 2% complete]
    -- [download 3% complete]
    -- [download 5% complete]
    -- [download 6% complete]
    -- [download 11% complete]
    -- [download 12% complete]
    -- [download 20% complete]
    -- [download 25% complete]
    -- [download 55% complete]
    -- [download 85% complete]
    -- [download 100% complete]
    -- Downloading depthai bootloader
    -- folder: /home/ubuntu/Projects/depthai-core/build/resources
    -- maturity: release
    -- commit_version_arg: 0.0.11
    -- bootloader shared commit: c8779ca581659803b6f3e465cc2bde7b22203be0
    -- depthai-bootloader-shared between device and host MATCH!. (device: c8779ca581659803b6f3e465cc2bde7b22203be0, host: c8779ca581659803b6f3e465cc2bde7b22203be0
    -- Downloading and checking depthai-bootloader.cmd
    -- [download 1% complete]
    -- [download 2% complete]
    -- [download 5% complete]
    -- [download 8% complete]
    -- [download 10% complete]
    -- [download 11% complete]
    -- [download 12% complete]
    -- [download 14% complete]
    -- [download 16% complete]
    -- [download 17% complete]
    -- [download 18% complete]
    -- [download 20% complete]
    -- [download 21% complete]
    -- [download 22% complete]
    -- [download 23% complete]
    -- [download 25% complete]
    -- [download 28% complete]
    -- [download 29% complete]
    -- [download 30% complete]
    -- [download 31% complete]
    -- [download 32% complete]
    -- [download 38% complete]
    -- [download 66% complete]
    -- [download 100% complete]
    -- LIST OF RESOURCE COMPILED FILES: /home/ubuntu/Projects/depthai-core/build/resources/depthai-device-fwp-16652fb049b5a9b47e3098d94fb9cedc353f82e9.tar.xz;/home/ubuntu/Projects/depthai-core/build/resources/depthai-bootloader-0.0.11.cmd
    -- Check for working incbin assembly directive
    -- Check for working incbin assembly directive - works
    -- Performing Test FLAG
    -Wno-switch-enum
    -- Performing Test FLAG_-Wno-switch-enum - Success
    -- OpenCV and required libraries (opencv_core;opencv_imgproc) found. OpenCV Support enabled
    -- BUILD_DATETIME: 2021-06-03 21:46:29 +0000, BUILD_COMMIT: 9cfcfa7bc1044adc0ef4ab0dfbf9195675bbff14, BUILD_COMMIT_DATETIME: 2021-05-04 17:18:41 +0200
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/ubuntu/Projects/depthai-core/build

    and when building

    ubuntu@Pi3DCamera:/Projects/depthai-core$ cmake --build build --parallel 8
    [ 1%] Generating intermediate file for /home/ubuntu/Projects/depthai-core/build/resources/depthai-bootloader-0.0.11.cmd
    [ 3%] Generating depthai-resources resource loader
    [ 5%] Generating intermediate file for /home/ubuntu/Projects/depthai-core/build/resources/depthai-device-fwp-16652fb049b5a9b47e3098d94fb9cedc353f82e9.tar.xz
    Scanning dependencies of target depthai-resources
    [ 7%] Building CXX object CMakeFiles/depthai-resources.dir/cmrc_depthai-resources/lib.cpp.o
    [ 11%] Building CXX object CMakeFiles/depthai-resources.dir/
    cmrc_depthai-resources/intermediate/depthai-device-fwp-16652fb049b5a9b47e3098d94fb9cedc353f82e9.tar.xz.cpp.o
    [ 11%] Building CXX object CMakeFiles/depthai-resources.dir/__cmrc_depthai-resources/intermediate/depthai-bootloader-0.0.11.cmd.cpp.o
    [ 13%] Linking CXX static library libdepthai-resources.a
    [ 13%] Built target depthai-resources
    Scanning dependencies of target depthai-core
    [ 15%] Building C object CMakeFiles/depthai-core.dir/shared/depthai-bootloader-shared/src/SBR.c.o
    [ 17%] Building CXX object CMakeFiles/depthai-core.dir/src/device/Device.cpp.o
    [ 19%] Building CXX object CMakeFiles/depthai-core.dir/shared/depthai-shared/src/datatype/DatatypeEnum.cpp.o
    [ 21%] Building CXX object CMakeFiles/depthai-core.dir/src/device/DeviceBootloader.cpp.o
    [ 23%] Building CXX object CMakeFiles/depthai-core.dir/src/device/DataQueue.cpp.o
    [ 25%] Building CXX object CMakeFiles/depthai-core.dir/src/device/CallbackHandler.cpp.o
    [ 26%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/Pipeline.cpp.o
    [ 28%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/AssetManager.cpp.o
    [ 30%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/Node.cpp.o
    [ 32%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/XLinkIn.cpp.o
    [ 34%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/XLinkOut.cpp.o
    [ 36%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/ColorCamera.cpp.o
    [ 38%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/MonoCamera.cpp.o
    [ 40%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/StereoDepth.cpp.o
    [ 42%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/NeuralNetwork.cpp.o
    [ 44%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/ImageManip.cpp.o
    [ 46%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/MyProducer.cpp.o
    [ 48%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/VideoEncoder.cpp.o
    [ 50%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/DetectionNetwork.cpp.o
    [ 51%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/SpatialDetectionNetwork.cpp.o
    [ 53%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/SystemLogger.cpp.o
    [ 55%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/SpatialLocationCalculator.cpp.o
    [ 57%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/node/ObjectTracker.cpp.o
    [ 59%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/Buffer.cpp.o
    [ 61%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/ImgFrame.cpp.o
    [ 63%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/ImageManipConfig.cpp.o
    [ 65%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/CameraControl.cpp.o
    [ 67%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/NNData.cpp.o
    [ 69%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/ImgDetections.cpp.o
    [ 71%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/SpatialImgDetections.cpp.o
    [ 73%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/SystemInformation.cpp.o
    [ 75%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/StreamPacketParser.cpp.o
    [ 76%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/SpatialLocationCalculatorData.cpp.o
    [ 78%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/SpatialLocationCalculatorConfig.cpp.o
    [ 80%] Building CXX object CMakeFiles/depthai-core.dir/src/pipeline/datatype/Tracklets.cpp.o
    [ 82%] Building CXX object CMakeFiles/depthai-core.dir/src/utility/Initialization.cpp.o
    [ 84%] Building CXX object CMakeFiles/depthai-core.dir/src/utility/Resources.cpp.o
    [ 86%] Building CXX object CMakeFiles/depthai-core.dir/src/xlink/XLinkConnection.cpp.o
    [ 88%] Building CXX object CMakeFiles/depthai-core.dir/src/xlink/XLinkStream.cpp.o
    [ 90%] Building CXX object CMakeFiles/depthai-core.dir/src/openvino/OpenVINO.cpp.o
    [ 92%] Building CXX object CMakeFiles/depthai-core.dir/src/openvino/BlobReader.cpp.o
    [ 94%] Building C object CMakeFiles/depthai-core.dir/src/bspatch/bspatch.c.o
    [ 96%] Linking CXX shared library libdepthai-core.so

    And after that the repetitive errors

    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function
    spdlog::details::thread_pool::thread_pool(unsigned long, unsigned long, std::function<void ()>)':
    async.cppπŸ™.text+0xa88): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function
    spdlog::details::thread_pool::thread_pool()':
    async.cppπŸ™.text+0x111c): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    async.cpp:(.text+0x13f4): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function spdlog::details::thread_pool::post_log(std::shared_ptr<spdlog::async_logger>&&, spdlog::details::log_msg const&, spdlog::async_overflow_policy)':
    async.cpp:(.text+0x1738): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function spdlog::details::thread_pool::post_flush(std::shared_ptr<spdlog::async_logger>&&, spdlog::async_overflow_policy)':
    async.cpp:(.text+0x1adc): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function spdlog::details::thread_pool::process_next_msg_()':
    async.cpp:(.text+0x2398): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function spdlog::async_logger::sink_it_(spdlog::details::log_msg const&)':
    async.cpp:(.text+0x2920): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVSt23_Sp_counted_ptr_inplaceIN6spdlog12async_loggerESaIS1_ELN9gnu_cxx12_Lock_policyE2EE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function spdlog::async_logger::clone(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    async.cpp:(.text+0x326c): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVN6spdlog12async_loggerE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    async.cppπŸ™.text+0x3290): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN6spdlog12async_loggerE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function
    spdlog::async_logger::async_logger(std::
    cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::initializer_list<std::shared_ptr<spdlog::sinks::sink> >, std::weak_ptr<spdlog::details::thread_pool>, spdlog::async_overflow_policy)':
    async.cppπŸ™.text+0x3638): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN6spdlog12async_loggerE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function
    spdlog::async_logger::async_logger()':
    async.cppπŸ™.text.ZN6spdlog12async_loggerD0Ev[ZN6spdlog12async_loggerD5Ev]+0x4): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    async.cpp:(.text._ZN6spdlog12async_loggerD0Ev[_ZN6spdlog12async_loggerD5Ev]+0x74): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVN6spdlog12async_loggerE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function spdlog::async_logger::~async_logger()':
    async.cpp:(.text._ZN6spdlog12async_loggerD2Ev[_ZN6spdlog12async_loggerD5Ev]+0x4): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    async.cppπŸ™.text.ZN6spdlog12async_loggerD2Ev[ZN6spdlog12async_loggerD5Ev]+0x74): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function
    spdlog::details::async_msg::async_msg()':
    async.cppπŸ™.text.
    ZN6spdlog7details9async_msgD2Ev[ZN6spdlog7details9async_msgD5Ev]+0x48): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function
    spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::mpmc_blocking_queue()':
    async.cppπŸ™.text.ZN6spdlog7details19mpmc_blocking_queueINS0_9async_msgEED2Ev[ZN6spdlog7details19mpmc_blocking_queueINS0_9async_msgEED5Ev]+0x28): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(async.cpp.o): in function
    spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::mpmc_blocking_queue(unsigned long)':
    async.cppπŸ™.text.
    ZN6spdlog7details19mpmc_blocking_queueINS0_9async_msgEEC2Em[ZN6spdlog7details19mpmc_blocking_queueINS0_9async_msgEEC5Em]+0x88): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): in function
    gen_addr.isra.1':
    usb_boot.cπŸ™.text+0x184): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.c:(.text+0x318): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.cπŸ™.text+0x3a4): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.c:(.text+0x460): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.cπŸ™.text+0x514): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.c:(.text+0x584): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.cπŸ™.text+0x5a8): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.c:(.text+0x5dc): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.cπŸ™.text+0x63c): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.c:(.text+0x6ec): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.cπŸ™.text+0x718): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): in function
    get_pid_by_name':
    usb_boot.cπŸ™.text+0x848): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): in function
    usb_find_device_with_bcd':
    usb_boot.cπŸ™.text+0xc44): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.c:(.text+0xcd0): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.cπŸ™.text+0xd68): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.c:(.text+0xe18): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.cπŸ™.text+0xe58): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.c:(.text+0xeb4): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.cπŸ™.text+0xee8): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.c:(.text+0xf6c): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    usb_boot.cπŸ™.text+0xf90): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol mvLogLevel_xLinkUsb' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libXLink.a(usb_boot.c.o): in function
    usb_boot':
    usb_boot.cπŸ™.text+0x1040): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN6spdlog9spdlog_exE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): in function
    spdlog::spdlog_ex::spdlog_ex(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    spdlog.cppπŸ™.text+0x738): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): in function
    spdlog::spdlog_ex::spdlog_ex(std::
    cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
    spdlog.cppπŸ™.text+0x7a8): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN6spdlog9spdlog_exE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    spdlog.cpp:(.text+0x7d0): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZN6spdlog9spdlog_exD1Ev' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): in function spdlog::throw_spdlog_ex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
    spdlog.cpp:(.text+0xa10): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTIN6spdlog9spdlog_exE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    spdlog.cppπŸ™.text+0xa14): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN6spdlog9spdlog_exE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): in function
    spdlog::throw_spdlog_ex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
    spdlog.cppπŸ™.text+0xa98): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZN6spdlog9spdlog_exD1Ev' which may bind externally can not be used when making a shared object; recompile with -fPIC
    spdlog.cpp:(.text+0xad8): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTIN6spdlog9spdlog_exE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    spdlog.cppπŸ™.text+0xadc): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): in function
    spdlog::details::backtracer::backtracer(spdlog::details::backtracer&&)':
    spdlog.cppπŸ™.text+0xbd0): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVN3fmt2v719basic_memory_bufferIcLm250ESaIcEEE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(spdlog.cpp.o): in function
    spdlog::details::backtracer::operator=(spdlog::details::backtracer)':

    .
    .
    .
    ELN9gnu_cxx12_Lock_policyE2EE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    color_sinks.cppπŸ™.text.ZN6spdlog15stdout_color_stINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7
    cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE[ZN6spdlog15stdout_color_stINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE]+0x104): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(color_sinks.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVSt23_Sp_counted_ptr_inplaceIN6spdlog7details11thread_poolESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    color_sinks.cpp:(.text._ZN6spdlog15stdout_color_stINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE[_ZN6spdlog15stdout_color_stINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE]+0x3ec): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(color_sinks.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVSt23_Sp_counted_ptr_inplaceIN6spdlog5sinks21ansicolor_stdout_sinkINS0_7details13console_mutexEEESaIS5_ELN9
    gnu_cxx12_Lock_policyE2EE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(color_sinks.cpp.o): in function std::shared_ptr<spdlog::logger> spdlog::stdout_color_mt<spdlog::async_factory_impl<(spdlog::async_overflow_policy)0> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, spdlog::color_mode)':
    color_sinks.cpp:(.text._ZN6spdlog15stdout_color_mtINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE[_ZN6spdlog15stdout_color_mtINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE]+0xcc): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(color_sinks.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    ZTVSt23_Sp_counted_ptr_inplaceIN6spdlog12async_loggerESaIS1_ELN9gnu_cxx12_Lock_policyE2EE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    color_sinks.cppπŸ™.text.ZN6spdlog15stdout_color_mtINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7
    cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE[ZN6spdlog15stdout_color_mtINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE]+0x104): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/libspdlog.a(color_sinks.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol _ZTVSt23_Sp_counted_ptr_inplaceIN6spdlog7details11thread_poolESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE' which may bind externally can not be used when making a shared object; recompile with -fPIC
    color_sinks.cpp:(.text._ZN6spdlog15stdout_color_mtINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE[_ZN6spdlog15stdout_color_mtINS_18async_factory_implILNS_21async_overflow_policyE0EEEEESt10shared_ptrINS_6loggerEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_10color_modeE]+0x3ec): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(alone_decoder.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    lzma_alone_decoder_init' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(alone_decoder.c.o): in function lzma_alone_decoder_init':
    alone_decoder.c:(.text+0x54): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(alone_decoder.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    lzma_alone_decoder_init' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(alone_decoder.c.o): in function lzma_alone_decoder':
    alone_decoder.c:(.text+0x4d4): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(stream_decoder.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    lzma_stream_decoder_init' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(stream_decoder.c.o): in function lzma_stream_decoder_init':
    stream_decoder.c:(.text+0x524): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(stream_decoder.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    lzma_stream_decoder_init' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(stream_decoder.c.o): in function lzma_stream_decoder':
    stream_decoder.c:(.text+0x6a0): dangerous relocation: unsupported relocation
    /usr/bin/ld: /home/ubuntu/.hunter/_Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(block_decoder.c.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol
    lzma_block_decoder_init' which may bind externally can not be used when making a shared object; recompile with -fPIC
    /home/ubuntu/.hunter/
    Base/062a19a/856b483/27c8df6/Install/lib/liblzma.a(block_decoder.c.o): in function `lzma_block_decoder_init':
    block_decoder.cπŸ™.text+0x2d0): dangerous relocation: unsupported relocation
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/depthai-core.dir/build.make:706: libdepthai-core.so] Error 1
    make[1]: *** [CMakeFiles/Makefile2:570: CMakeFiles/depthai-core.dir/all] Error 2
    make: *** [Makefile:141: all] Error 2

    Hi @henryportilla.

    I think the error lies in cached dependencies. Perform the following:

    • rm -r ~/.hunter
    • rm -r depthai-core/build

    And rebuild as instructed before.

    (Also, next time either upload a file or place it into a code block, as the post is completely unreadable otherwise. The setting can be found under in the reply options - "Insert code". ).

    Thanks, with the last instructions I was able to build the libdepthai-core.so on the combination Ubuntu 20.04 + Raspberry Pi 4.

    I used

    rm -r ~/.hunter
    rm -rf build
    cmake -H. -Bbuild -D BUILD_SHARED_LIBS=ON -D CMAKE_CXX_FLAGS=-fPIC
    cmake --build build --parallel 8

    I'm sorry for the code post before.

    Thanks again.

    a year later