sy6sy2 / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS and Windows.
https://kodi.tv/
Other
6 stars 1 forks source link

Test make build for tvOS including ‘deb’ target #25

Closed phunkyfish closed 5 years ago

phunkyfish commented 5 years ago

We have only tested using Xcode UI. Need to test this method of building the full deb release from start to finish.

kambala-decapitator commented 5 years ago

failed for me, error:

checking how to run the C preprocessor... /lib/cpp
configure: error: in `/Users/kambala/Development/kodi-atv/lib/cpluff':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details

configure output:

$ make -C tools/depends/target/cmakebuildsys
mkdir -p /Users/kambala/Development/kodi-atv/build
cd /Users/kambala/Development/kodi-atv/build; /Users/Shared/xbmc-depends/x86_64-darwin17.7.0-native/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/share/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=/Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug -DCMAKE_BUILD_TYPE=Debug -DENABLE_INTERNAL_CROSSGUID=OFF -DENABLE_INTERNAL_FFMPEG=OFF  /Users/kambala/Development/kodi-atv
-- Toolchain enabled TVOS bundle for project kodi
-- Toolchain enabled TVOS bundle for project kodi
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The ASM compiler identification is AppleClang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - failed
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - failed
-- Source directory: /Users/kambala/Development/kodi-atv
-- Build directory: /Users/kambala/Development/kodi-atv/build
-- Generator: Single-configuration: Debug (Unix Makefiles)
-- CMake Version: 3.12.2
-- System type: Darwin
-- Checking to see if CXX compiler accepts flag -std=c++11
-- Checking to see if CXX compiler accepts flag -std=c++11 - yes
-- Found CXX11: -std=c++11  
-- Core system type: tvos
-- Platform: appletvos
-- CPU: arm64, ARCH: aarch64
-- Cross-Compiling: TRUE
-- Execute build artefacts on host: FALSE
-- Depends based build: 1
-- Could not find hardware support for SSE (missing: _SSE_TRUE _SSE_OK) 
-- Could not find hardware support for SSE2 (missing: _SSE2_TRUE _SSE2_OK) 
-- Could not find hardware support for SSE3 (missing: _SSE3_TRUE _SSE3_OK) 
-- Could not find hardware support for SSSE3 (missing: _SSSE3_TRUE _SSSE3_OK) 
-- Could not find hardware support for SSE4.1 (missing: _SSE41_TRUE _SSE41_OK) 
-- Could not find hardware support for SSE4.2 (missing: _SSE42_TRUE _SSE42_OK) 
-- Could not find hardware support for AVX (missing: _AVX_TRUE _AVX_OK) 
-- Could not find hardware support for AVX2 (missing: _AVX2_TRUE _AVX2_OK) 
-- NEON optimization enabled
-- Found Git: /Applications/Xcode.app/Contents/Developer/usr/bin/git (found version "2.17.2 (Apple Git-113)") 
-- Found PkgConfig: /Users/Shared/xbmc-depends/x86_64-darwin17.7.0-native/bin/pkg-config (found version "0.28") 
-- Could NOT find Alsa (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR) 
-- Could NOT find Avahi (missing: AVAHI_CLIENT_LIBRARY AVAHI_COMMON_LIBRARY AVAHI_CLIENT_INCLUDE_DIR AVAHI_COMMON_INCLUDE_DIR) 
-- Could NOT find Bluetooth (missing: BLUETOOTH_LIBRARY BLUETOOTH_INCLUDE_DIR) 
-- Found Bluray: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libbluray.dylib (found suitable version "1.0.2", minimum required is "0.9.3") 
-- Could NOT find CAP (missing: CAP_LIBRARY CAP_INCLUDE_DIR) 
-- Could NOT find CCache (missing: CCACHE_PROGRAM) 
-- Could NOT find CEC (missing: CEC_LIBRARY CEC_INCLUDE_DIR) (Required is at least version "4.0.0")
-- Could NOT find DBus (missing: DBUS_LIBRARY DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR) 
-- Could NOT find LCMS2 (missing: LCMS2_LIBRARY LCMS2_INCLUDE_DIR) 
-- Could NOT find LircClient (missing: LIRCCLIENT_LIBRARY LIRCCLIENT_INCLUDE_DIR) 
-- Could NOT find MDNS (missing: MDNS_LIBRARY) 
-- Found MicroHttpd: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libmicrohttpd.a (found version "0.9.55") 
-- Found NFS: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libnfs.a (found version "2.0.0") 
-- Could NOT find PulseAudio (missing: PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_SIMPLE_LIBRARY PULSEAUDIO_INCLUDE_DIR) (Required is at least version "2.0.0")
-- Found Python: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/include/python2.7  
-- Found SmbClient: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libsmbclient.dylib  
-- Could NOT find Sndio (missing: SNDIO_LIBRARY SNDIO_INCLUDE_DIR) 
-- Could NOT find UDEV (missing: UDEV_LIBRARY UDEV_INCLUDE_DIR) 
-- Found LibXml2: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libxml2.a;-L/Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib;-lxml2;-lpthread;-lz;-lm (found version "2.9.4") 
-- Found XSLT: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libxslt.a (found version "1.1.29") 
-- Found Plist: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libplist.dylib (found version "2.0.0") 
-- Found ASS: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libass.dylib (found version "0.13.4") 
-- Found Cdio: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libcdio.a (found version "0.94") 
-- Found EXPAT: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libexpat.a (found version "2.2.5") 
-- Found CrossGUID: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libcrossguid.a  
-- Found Curl: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libcurl.a (found version "7.61.1") 
-- Found FFMPEG: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/include (found version "4.0") 
-- Found FlatBuffers: /Users/Shared/xbmc-depends/x86_64-darwin17.7.0-native/bin/flatc  
-- Found Fmt: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libfmt.a (found version "5.1.0") 
-- Found FreeType: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libfreetype.a (found version "20.0.14") 
-- Found FriBidi: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libfribidi.a (found version "0.19.7") 
-- Found fstrcmp: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libfstrcmp.a (found version "0.7.D001") 
-- Found Iconv: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk/usr/lib/libiconv.tbd  
-- Found LibDvd: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/include  
-- Found Lzo2: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/liblzo2.a  
-- Found OpenSSL: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libcrypto.a (found version "1.1.0h")  
-- Found PCRE: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libpcrecpp.a (found version "8.42") 
-- Found RapidJSON: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/include (found version "1.1.0") 
-- Found Sqlite3: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libsqlite3.a (found version "3.26.0") 
-- Found TagLib: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libtag.a (found version "1.11.1") 
-- Found TinyXML: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libtinyxml.a (found version "2.6.2") 
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk/usr/lib/libz.tbd (found version "1.2.11") 
-- Found OpenGLES: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.1.sdk/System/Library/Frameworks/OpenGLES.framework  
-- Found MariaDBClient: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/mariadb/libmariadbclient.a (found version "10.2.9") 
-- Could NOT find LIBUSB (missing: LIBUSB_LIBRARY LIBUSB_INCLUDE_DIR) 
-- Found Shairplay: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib/libshairplay.dylib  
-- Found PythonInterp: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/bin/python (found version "1.4") 
-- Found Threads: TRUE  
-- Found Java: /Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home/bin/java (found version "12.0.0") found components:  Runtime 
-- Found SWIG: /Users/Shared/xbmc-depends/x86_64-darwin17.7.0-native/bin/swig (found version "3.0.12") 
-- #---- CONFIGURATION ----#
-- Platform: tvos
-- -- PATH config --
-- Prefix: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug
-- Libdir: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/lib
-- Bindir: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/bin
-- Includedir: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/include
-- Datarootdir: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/share
-- Datadir: /Users/Shared/xbmc-depends/appletvos12.1_arm64-target-debug/share
-- ALSA enabled: No
-- AVAHI enabled: No
-- BLUETOOTH enabled: No
-- BLURAY enabled: Yes
-- CAP enabled: No
-- CCACHE enabled: No
-- CEC enabled: No
-- DBUS enabled: No
-- LCMS2 enabled: No
-- LIRCCLIENT enabled: No
-- MDNS enabled: No
-- MICROHTTPD enabled: Yes
-- NFS enabled: Yes
-- PULSEAUDIO enabled: No
-- PYTHON enabled: Yes
-- SMBCLIENT enabled: Yes
-- SNDIO enabled: No
-- UDEV enabled: No
-- XSLT enabled: Yes
-- PLIST enabled: Yes
-- MARIADBCLIENT enabled: Yes
-- LIBUSB enabled: No
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/kambala/Development/kodi-atv/build

attached relevant files: libcpluff-cfgcmd.txt config.log

fuzzard commented 5 years ago

On a single threaded complete build i get all the way to linking then this error

[100%] Linking CXX executable build/Debug-appletvos/Kodi.app/Kodi
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.2.sdk/usr/lib/system'
ld: warning: -headerpad_max_install_names is ignored when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
duplicate symbol _m_xbmcController in:
    CMakeFiles/kodi.dir/xbmc/platform/darwin/tvos/MainApplication.mm.o
    build/platform/tvos/platform_tvos.a(MainApplication.mm.o)
duplicate symbol _main in:
    CMakeFiles/kodi.dir/xbmc/platform/darwin/tvos/MainApplication.mm.o
    build/platform/tvos/platform_tvos.a(MainApplication.mm.o)
duplicate symbol _OBJC_CLASS_$_MainApplicationDelegate in:
    CMakeFiles/kodi.dir/xbmc/platform/darwin/tvos/MainApplication.mm.o
    build/platform/tvos/platform_tvos.a(MainApplication.mm.o)
duplicate symbol _OBJC_METACLASS_$_MainApplicationDelegate in:
    CMakeFiles/kodi.dir/xbmc/platform/darwin/tvos/MainApplication.mm.o
    build/platform/tvos/platform_tvos.a(MainApplication.mm.o)
ld: 4 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [build/Debug-appletvos/Kodi.app/Kodi] Error 1
make[1]: *** [CMakeFiles/kodi.dir/all] Error 2
make: *** [all] Error 2
kambala-decapitator commented 5 years ago

single-threaded build failed with the same error as before. The reason might be that I built both tvOS and iOS dependencies from the same source tree: first built tvOS, then iOS, and afterwards simply configured dependencies for tvOS again without actually building them, so that make saw correct platform.

@fuzzard did you use ATV branch?

fuzzard commented 5 years ago

Yeah, ive resorted to a lot of git reset --hard and git clean -x -f -d. Have setup a reference git clone that ive used for the full ios build, and then another clone for the ATV dev stuff.

I did use ATV branch. I believe there is an error in in one of the cmakelists.txt files that caused that first linker error i had above.

diff --git a/xbmc/platform/darwin/tvos/CMakeLists.txt b/xbmc/platform/darwin/tvos/CMakeLists.txt
index d7623ee..476a788 100644
--- a/xbmc/platform/darwin/tvos/CMakeLists.txt
+++ b/xbmc/platform/darwin/tvos/CMakeLists.txt
@@ -1,5 +1,4 @@
-set(SOURCES 
-                   MainApplication.mm
+set(SOURCES
                        MainController.mm
                        MainEAGLView.mm
                        MainKeyboard.mm

After that, i ran into some further issues that seem to be attributed to libsamabaclient, libbluray and libass and embed-bitcode and/or arm64 build issues. still investigating.

fuzzard commented 5 years ago

Can close this issue.

Decided to remove any mention of make build process for tvos.

We rely on features (storyboarding) that as far as we know can only do via xcode/xcodebuild.

Memphiz has said should be fine to setup buildsteps to use xcodebuild and not the make process as is used for other existing platforms (including ios).

phunkyfish commented 5 years ago

Cool, closing