launchdarkly / c-client-sdk

LaunchDarkly Client-side SDK for C/C++
Other
7 stars 15 forks source link

'IOKit/IOKitLib.h' file not found on building c-client-sdk for Apple TV Platform #104

Closed vivekyadav28 closed 1 year ago

vivekyadav28 commented 1 year ago

Is this a support request?

Describe the bug make command is throwing :

_c-client-sdk/src/ldutil.c:13:10: fatal error: 'IOKit/IOKitLib.h' file not found

include <IOKit/IOKitLib.h>

     ^~~~~~~~~~~~~~~~~~

1 error generated. make[2]: [CMakeFiles/ldclientapi.dir/src/ldutil.c.o] Error 1 make[1]: [CMakeFiles/ldclientapi.dir/all] Error 2 make: *** [all] Error 2_

CMake command:

cmake . -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_SYSTEM_NAME=tvOS -DCURL_INCLUDE_DIR=_Path to Curl Header File_s -DCURL_LIBRARY=Path to Curl Library

To reproduce Execute following command :

_cmake . -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_SYSTEM_NAME=tvOS -DCURL_INCLUDE_DIR=_Path to Curl Header File_s -DCURL_LIBRARY=Path to Curl Library make

SDK version 2.5.5

Language version, developer tools XCode 14.2

OS/platform Apple TV

NOTE: Cmake command fails with following error. Had to remove generate product version function from CMakeLists.txt to make it work.

c-client-sdk % cmake . -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_SYSTEM_NAME=tvOS -DCURL_INCLUDE_DIR=_Path to Curl Header File_s -DCURL_LIBRARY=Path to Curl Library Extracted version: 2.5.5 -- The C compiler identification is AppleClang 14.0.0.14000029 -- The CXX compiler identification is AppleClang 14.0.0.14000029 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /Users/vivekyadav/LaunchDarkly/c-client-sdk/googletest-download [ 11%] Creating directories for 'googletest' [ 22%] Performing download step (git clone) for 'googletest' Cloning into 'googletest-src'... HEAD is now at e2239ee6 Googletest export [ 33%] Performing update step for 'googletest' [ 44%] No patch step for 'googletest' [ 55%] No configure step for 'googletest' [ 66%] No build step for 'googletest' [ 77%] No install step for 'googletest' [ 88%] No test step for 'googletest' [100%] Completed 'googletest' [100%] Built target googletest -- Found Python: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 (found version "3.11.0") found components: Interpreter -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE CMake Error at CMakeLists.txt:44 (include): include could not find requested file:

generate_product_version

-- Found CURL: Path to Curl Library (found version "7.83.1") CMake Error at CMakeLists.txt:58 (generate_product_version): Unknown CMake command "generate_product_version".

-- Configuring incomplete, errors occurred! See also "c-client-sdk/CMakeFiles/CMakeOutput.log". See also "c-client-sdk/CMakeFiles/CMakeError.log".

cwaldren-ld commented 1 year ago

Hi @vivekyadav28 , please note we do not officially support tvOS with the C Client SDK. Would your use-case be satisfied by our iOS SDK (sample Apple TV application) ?

github-actions[bot] commented 1 year ago

This issue is marked as stale because it has been open for 30 days without activity. Remove the stale label or comment, or this will be closed in 7 days.