v17 iOS compilation
#1
Following the instructions of README.ios.md the following error is thorwn:
Code:
checking whether g++ accepts -g... yes
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
checking for unzip... yes
checking for zip... yes
checking for curl... /usr/bin/curl
checking for tar... /usr/bin/tar
found xcodebuild at /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
checking for "*86"... arm64 is not "*86"
configure: error: error in configure of --with-sdk=10.3

I have xcode 8.3.2 installed, is that the underlying cause for this? If so, is there a relatively easy way to make it work as is without downgrading?
Reply
#2
Specifying the SDK version seems to have resolved the issue:

Code:
./configure --host=arm-apple-darwin --with-tarballs=/Users/Shared/tarballs --prefix=/Users/Shared/mrmc-depends  --with-sdk=8.1
Reply
#3
Code:
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
checking whether the C compiler works... no
configure: error: in `/Users/laracine/cpp/Kodi/tools/depends/target/pcre/iphoneos8.1_armv7-target':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[2]: *** [iphoneos8.1_armv7-target] Error 77
make[1]: *** [pcre] Error 2
make: *** [target/.installed-iphoneos8.1_armv7-target] Error 2


GCC however is clearly installed and works. I even ran the command as `root` and still faced the same error.

Does anyone have an idea why this would happen?
Reply
#4
I doubt that xcode 8.3 has the ios 8.1 sdk with it to be honest... also running things as root is something you should never do when compiling stuff. You should start from scratch because the root thingy might have broken your build directory already. Then post the initial configure line you tried on your first error...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#5
duplicate
Reply
#6
(2017-05-14, 00:52)Memphiz Wrote: I doubt that xcode 8.3 has the ios 8.1 sdk with it to be honest... also running things as root is something you should never do when compiling stuff. You should start from scratch because the root thingy might have broken your build directory already. Then post the initial configure line you tried on your first error...


Thx, updatin the rep. and doing everything from scratch (without root) solved the first issue:
Code:
touch .installed-iphoneos10.3_armv7-target-debug
touch .installed-iphoneos10.3_armv7-target-debug
Dependencies built successfully.

However it's now failing to build the binary-addons. Running "make -C target/binary-addons" results in this:

Code:
...
[ 12%] Completed 'p8-platform'
[ 25%] Built target p8-platform
[ 50%] Built target tinyxml
[ 50%] Performing update step for 'kodi-platform'
[ 50%] Performing configure step for 'kodi-platform'
CMake Error at CMakeLists.txt:8 (find_package):
  By not providing "FindKodi.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Kodi", but
  CMake did not find one.

  Could not find a package configuration file provided by "Kodi" with any of
  the following names:

    KodiConfig.cmake
    kodi-config.cmake

  Add the installation prefix of "Kodi" to CMAKE_PREFIX_PATH or set
  "Kodi_DIR" to a directory containing one of the above files.  If "Kodi"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
Reply
#7
The last phase fails with this error:
Code:
/Users/Shared/xbmc-depends/buildtools-native/bin/cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=/Users/Shared/xbmc-depends/iphoneos10.3_armv7-target-debug/share/Toolchain.cmake ..


Code:
-- The C compiler identification is AppleClang 8.1.0.8020042
-- The CXX compiler identification is AppleClang 8.1.0.8020042
-- 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 -- broken
CMake Error at /Users/Shared/xbmc-depends/buildtools-native/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler
  "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
  is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /Users/laracine/cpp/Kodi/CMakeFiles/CMakeTmp



  Run Build Command:"/usr/bin/xcodebuild" "-project"
  "CMAKE_TRY_COMPILE.xcodeproj" "build" "-target" "cmTC_a1be7"
  "-configuration" "Debug"

  === BUILD TARGET cmTC_a1be7 OF PROJECT CMAKE_TRY_COMPILE WITH CONFIGURATION
  Debug ===



  Check dependencies

  target specifies product type 'com.apple.product-type.tool', but there's no
  such product type for the 'iphoneos' platform
...
Reply
#8
Are you sure that depends were built successfully before trying binary addons?
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#9
(2017-05-15, 08:44)Memphiz Wrote: Are you sure that depends were built successfully before trying binary addons?

Yes I am, it was in both cases, building binary addons and depends successful.

I managed to compile a deb file via CMake and signed it with the provided utility in the forums and got it installed, yet since I have changed some codes I think that makes it crash each time right after the splash screen.

Opening the project in Xcode 8.3.2 however - which is here useful for debugging - does not work. The first obvious problem with project was that it complained about "target specifies product type 'com.apple.product-type.tool', but there's no such product type for the 'iphoneos' platform" which I think was renamed in later versions of Xcode; manually substituting ./Kodi.xcodeproj/project.pbxproj with "com.apple.product-type.application" gets that out of the way.
After resolving the signature issues, the next thing that Xcode then complains is not being able to compile the first file in "Build Phases", here namely "arccmt.cpp":

Code:
/Users/laracine/cpp/Kodi/lib/UnrarXLib/arccmt.cpp

CompileC Kodi.build/Debug-iphoneos/Kodi.build/Objects-normal/arm64/arccmt.o lib/UnrarXLib/arccmt.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/laracine/cpp/Kodi
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DCMAKE_INTDIR=\"Debug-iphoneos\" -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -miphoneos-version-min=8.1 -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -fembed-bitcode-marker -I/Users/laracine/cpp/Kodi/Debug-iphoneos/include -I/Users/laracine/cpp/Kodi/Kodi.build/Debug-iphoneos/Kodi.build/DerivedSources/arm64 -I/Users/laracine/cpp/Kodi/Kodi.build/Debug-iphoneos/Kodi.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/laracine/cpp/Kodi/Debug-iphoneos -std=gnu++11 -no-cpp-precomp -arch armv7 -miphoneos-version-min=6.0 -std=c++11 -stdlib=libc++ -D_DEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -isystem /Users/Shared/xbmc-depends/iphoneos10.3_armv7-target-debug/include -std=c++11 -MMD -MT dependencies -MF /Users/laracine/cpp/Kodi/Kodi.build/Debug-iphoneos/Kodi.build/Objects-normal/arm64/arccmt.d --serialize-diagnostics /Users/laracine/cpp/Kodi/Kodi.build/Debug-iphoneos/Kodi.build/Objects-normal/arm64/arccmt.dia -c /Users/laracine/cpp/Kodi/lib/UnrarXLib/arccmt.cpp -o /Users/laracine/cpp/Kodi/Kodi.build/Debug-iphoneos/Kodi.build/Objects-normal/arm64/arccmt.o

/Users/laracine/cpp/Kodi/lib/UnrarXLib/arccmt.cpp:1:6: error: use of undeclared identifier 'Archive'
bool Archive::GetComment(Array<byte> &CmtData)
     ^
/Users/laracine/cpp/Kodi/lib/UnrarXLib/arccmt.cpp:98:5: error: use of undeclared identifier 'Archive'
int Archive::ReadCommentData(Array<byte> &CmtData)
    ^
/Users/laracine/cpp/Kodi/lib/UnrarXLib/arccmt.cpp:119:6: error: use of undeclared identifier 'Archive'
void Archive::ViewComment()
     ^
/Users/laracine/cpp/Kodi/lib/UnrarXLib/arccmt.cpp:139:6: error: use of undeclared identifier 'Archive'
void Archive::ViewFileComment()
     ^
4 errors generated.
Reply

Logout Mark Read Team Forum Stats Members Help
iOS compilation0