Install problem with deps/azure-kinect/sensor-sdk on Ubuntu 22.04 LTS: "implicit declaration of function ‘tlsio_openssl_get_interface_description’"
Bug Report
Summary and Bug Description
To get the k4a_viewer, and potentially other dependencies, of an armarx/visionx branch, I tried to add deps/azure-kinect
modules to my axii workspace on Ubuntu 22.04 LTS. However, deps/azure-kinect/sensor-sdk
fails to compile, as detailed below.
Current Behavior
When building the module deps/azure-kinect/sensor-sdk
, "Building C object extern/azure_c_shared/src/CMakeFiles/aziotsharedutil.dir/adapters/platform_linux.c.o" fails with implicit declaration of function ‘tlsio_openssl_get_interface_description’ [-Werror=implicit-function-declaration]
. It seems that platform_linux.c
performs an include dependend on a preprocessor macro being defined:
#ifdef USE_OPENSSL
#include "azure_c_shared_utility/tlsio_openssl.h"
#endif
However, I am not sure how this macro is set, and why (Open)SSL is needed for the AzureKinect, which is usually connected to the PC via USB and not via network.
Expected Behavior
Upgrading the workspace, including the deps/azure-kinect/sensor-sdk
module, succeeds, or at least asks for installing further dependencies if needed.
Steps to Reproduce
On Ubuntu 22.04 LTS, in an ArmarX axii workspace: axii w add deps/azure-kinect/sensor-sdk
(I also added the other azure-kinect modules, in case their absence causes the problem, which did not seem to be the case) and axii w upgrade
.
Diagnosis
Output of axii self report
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Scope ┃ Info ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Axii │ Axii 23.02.1.0 @stable-0 with shell integration │
│ OS │ Ubuntu 22.04.1 LTS │
│ Kernel │ Linux 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 │
│ │ x86_64 GNU/Linux │
│ Shell │ /bin/bash │
│ Python │ Python 3.10.6 │
│ Pip │ certifi==2022.12.7, charset-normalizer==2.0.12, click==8.0.0, │
│ │ commonmark==0.9.1, cycler==0.11.0, dbus-python==1.2.18, │
│ │ decorator==5.1.1, distro==1.7.0, gitdb==4.0.10, GitPython==3.1.18, │
│ │ idna==3.4, igraph==0.9.11, kiwisolver==1.4.4, matplotlib==3.3.0, │
│ │ networkx==2.5, notify2==0.3.1, numpy==1.23.0, Pillow==9.4.0, │
│ │ psutil==5.9.4, Pygments==2.14.0, pygraphviz==1.6, pyparsing==3.0.9, │
│ │ PyQt5==5.15.0, PyQt5-sip==12.11.0, python-dateutil==2.8.2, │
│ │ python-igraph==0.9.11, python-Levenshtein==0.12.2, │
│ │ requests==2.26.0, rich==12.6.0, rich-click==1.2.1, six==1.16.0, │
│ │ smmap==5.0.0, texttable==1.6.7, thefuzz==0.19.0, urllib3==1.26.13, │
│ │ xdg==5.1.1 │
└────────┴─────────────────────────────────────────────────────────────────────┘
More Relevant Logs or Screenshots
Relevant output of axii w upgrade
:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
─── Upgrade module deps/azure-kinect/sensor-sdk ... ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[...]
-- Build files have been written to: /[...]/deps/azure-kinect/sensor-sdk/build
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Command exited - Return code 0 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Build module deps/azure-kinect/sensor-sdk ...
Run command: cmake --build . --target all
In working directory: /[...]/deps/azure-kinect/sensor-sdk/build
With environment variables: CMAKE_BUILD_PARALLEL_LEVEL='1'
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Command output ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Consolidate compiler generated dependencies of target cJSON
[ 0%] Built target cJSON
Consolidate compiler generated dependencies of target imgui
[ 1%] Built target imgui
Consolidate compiler generated dependencies of target LibUSB
[ 3%] Built target LibUSB
Consolidate compiler generated dependencies of target k4a_rwlock
[ 5%] Built target k4a_rwlock
Consolidate compiler generated dependencies of target aziotsharedutil
[ 5%] Building C object extern/azure_c_shared/src/CMakeFiles/aziotsharedutil.dir/adapters/platform_linux.c.o
/[...]/deps/azure-kinect/sensor-sdk/extern/azure_c_shared/src/adapters/platform_linux.c: In function ‘platform_get_default_tlsio’:
/[...]/deps/azure-kinect/sensor-sdk/extern/azure_c_shared/src/adapters/platform_linux.c:59:12: error: implicit declaration of function ‘tlsio_openssl_get_interface_description’ [-Werror=implicit-function-declaration]
59 | return tlsio_openssl_get_interface_description();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/[...]/deps/azure-kinect/sensor-sdk/extern/azure_c_shared/src/adapters/platform_linux.c:59:12: error: returning ‘int’ from a function with return type ‘const IO_INTERFACE_DESCRIPTION *’ {aka ‘const struct IO_INTERFACE_DESCRIPTION_TAG *’} makes pointer from integer without a cast [-Werror=int-conversion]
59 | return tlsio_openssl_get_interface_description();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/[...]/deps/azure-kinect/sensor-sdk/extern/azure_c_shared/src/adapters/platform_linux.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-deprecated -Wno-deprecated-declarations -Wno-discarded-qualifiers -Wno-implicit-function-declaration -Wno-int-conversion’ [-Werror]
cc1: all warnings being treated as errors
gmake[2]: *** [extern/azure_c_shared/src/CMakeFiles/aziotsharedutil.dir/build.make:608: extern/azure_c_shared/src/CMakeFiles/aziotsharedutil.dir/adapters/platform_linux.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:2160: extern/azure_c_shared/src/CMakeFiles/aziotsharedutil.dir/all] Error 2
gmake: *** [Makefile:166: all] Error 2
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Command exited - Return code 2 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error: Failed to execute step 'build' on module 'deps/azure-kinect/sensor-sdk': Command exited with return code 2.
Extract of platform_linux.c
:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include "azure_c_shared_utility/platform.h"
#include "azure_c_shared_utility/xio.h"
#include "azure_c_shared_utility/xlogging.h"
#include "azure_c_shared_utility/httpapiex.h"
#ifdef USE_OPENSSL
#include "azure_c_shared_utility/tlsio_openssl.h"
#endif
#if USE_CYCLONESSL
#include "azure_c_shared_utility/tlsio_cyclonessl.h"
#endif
#if USE_WOLFSSL
#include "azure_c_shared_utility/tlsio_wolfssl.h"
#endif
#if USE_MBEDTLS
#include "azure_c_shared_utility/tlsio_mbedtls.h"
#endif
#if USE_BEARSSL
#include "azure_c_shared_utility/tlsio_bearssl.h"
#endif
#include <stdlib.h>
#include <unistd.h>
#include <sys/utsname.h>
[...]
const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void)
{
#if USE_CYCLONESSL
return tlsio_cyclonessl_get_interface_description();
#elif USE_WOLFSSL
return tlsio_wolfssl_get_interface_description();
#elif USE_MBEDTLS
return tlsio_mbedtls_get_interface_description();
#elif USE_BEARSSL
return tlsio_bearssl_get_interface_description();
#else
// Default to openssl
return tlsio_openssl_get_interface_description();
#endif
}