We had this problem also in our project. Some functions were marked as prohibited in iOS 12 and tvOS 12 SDKs.
In Kodi's case it is execvp() and fork() function used for example here:
https://github.com/xbmc/xbmc/blob/db8e964bc7685e8847c96aec472a9e76cf9800f7/xbmc/Util.cpp#L1635
https://github.com/xbmc/xbmc/blob/db8e964bc7685e8847c96aec472a9e76cf9800f7/xbmc/Util.cpp#L1657
There were some commits related to tvOS recently. I am really interested in tvOS version so thanks for that!
Right now, there are AFAIK 2 PR's related to tvOS: #16015 and #15956 .
Official jenkins seems to use tvOS 11 SDK which doesn't have execvp() and fork() function prohibited so this bug can't be reproduced in Kodi's jenkins right now.
So the point is that this should be fixed before tvOS will be really supported.
This bug could affect also iOS 12 SDK with iOS target. I haven't tested that but from my experience it could be affected.
In our project we were able to disable these functions for iOS and tvOS. Rest of platforms weren't affected.
I don't know for what are these functions used for in Kodi's case so I don't know if disabling will work in your case.
Try build Kodi for tvOS with tvOS 12 SDK in Xcode 10
part of build log from my jenkins server:
[ 60%] Linking CXX static library guilib_guiinfo.a
[ 60%] Building CXX object build/xbmc/CMakeFiles/xbmc.dir/ServiceManager.cpp.o
[ 61%] Building CXX object build/xbmc/CMakeFiles/xbmc.dir/SystemGlobals.cpp.o
[ 61%] Building CXX object build/addons/CMakeFiles/addons.dir/PVRClientMenuHooks.cpp.o
[ 61%] Building CXX object build/xbmc/CMakeFiles/xbmc.dir/TextureCache.cpp.o
[ 61%] Built target guilib_guiinfo
Scanning dependencies of target input_actions
[ 61%] Building CXX object build/input/actions/CMakeFiles/input_actions.dir/Action.cpp.o
[ 61%] Building CXX object build/input/actions/CMakeFiles/input_actions.dir/ActionTranslator.cpp.o
[ 61%] Building CXX object build/addons/CMakeFiles/addons.dir/Repository.cpp.o
[ 61%] Building CXX object build/xbmc/CMakeFiles/xbmc.dir/TextureCacheJob.cpp.o
[ 63%] Linking CXX static library input_actions.a
[ 63%] Built target input_actions
[ 63%] Building CXX object build/addons/CMakeFiles/addons.dir/RepositoryUpdater.cpp.o
[ 63%] Building CXX object build/xbmc/CMakeFiles/xbmc.dir/TextureDatabase.cpp.o
[ 63%] Building CXX object build/xbmc/CMakeFiles/xbmc.dir/ThumbLoader.cpp.o
Scanning dependencies of target input_joystick_keymaps
[ 64%] Building CXX object build/input/joysticks/keymaps/CMakeFiles/input_joystick_keymaps.dir/KeyHandler.cpp.o
[ 64%] Built target guilib
[ 64%] Building CXX object build/xbmc/CMakeFiles/xbmc.dir/URL.cpp.o
[ 64%] Building CXX object build/input/joysticks/keymaps/CMakeFiles/input_joystick_keymaps.dir/KeymapHandler.cpp.o
[ 64%] Building CXX object build/addons/CMakeFiles/addons.dir/Scraper.cpp.o
[ 64%] Building CXX object build/input/joysticks/keymaps/CMakeFiles/input_joystick_keymaps.dir/KeymapHandling.cpp.o
Scanning dependencies of target input_keyboard
[ 64%] Building CXX object build/input/keyboard/CMakeFiles/input_keyboard.dir/KeyboardEasterEgg.cpp.o
[ 64%] Building CXX object build/input/keyboard/CMakeFiles/input_keyboard.dir/KeymapActionMap.cpp.o
[ 64%] Linking CXX static library input_joystick_keymaps.a
[ 64%] Built target input_joystick_keymaps
[ 64%] Building CXX object build/xbmc/CMakeFiles/xbmc.dir/Util.cpp.o
Scanning dependencies of target input_keyboard_generic
[ 64%] Building CXX object build/input/keyboard/generic/CMakeFiles/input_keyboard_generic.dir/KeyboardInputHandling.cpp.o
[ 64%] Linking CXX static library input_keyboard.a
[ 64%] Built target input_keyboard
[ 64%] Linking CXX static library input_keyboard_generic.a
[ 64%] Built target input_keyboard_generic
[ 64%] Building CXX object build/addons/CMakeFiles/addons.dir/ScreenSaver.cpp.o
Scanning dependencies of target pictures
[ 64%] Building CXX object build/pictures/CMakeFiles/pictures.dir/ExifParse.cpp.o
[ 64%] Building CXX object build/pictures/CMakeFiles/pictures.dir/GUIDialogPictureInfo.cpp.o
/Volumes/WD2TB_2/.jenkins/workspace/Kodi_tvOS_16015/xbmc/Util.cpp:1635:17: error: call to unavailable function 'fork': not available on tvOS
pid_t child = fork();
^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.2.sdk/usr/include/unistd.h:446:8: note: candidate function has been explicitly made unavailable
pid_t fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
/Volumes/WD2TB_2/.jenkins/workspace/Kodi_tvOS_16015/xbmc/Util.cpp:1642:15: error: call to unavailable function 'fork': not available on tvOS
child = fork();
^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.2.sdk/usr/include/unistd.h:446:8: note: candidate function has been explicitly made unavailable
pid_t fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
/Volumes/WD2TB_2/.jenkins/workspace/Kodi_tvOS_16015/xbmc/Util.cpp:1657:7: error: call to unavailable function 'execvp': not available on tvOS
execvp(args[0], args);
^~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.2.sdk/usr/include/unistd.h:445:6: note: candidate function has been explicitly made unavailable
int execvp(const char * __file, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
3 errors generated.
make[2]: *** [build/xbmc/CMakeFiles/xbmc.dir/Util.cpp.o] Error 1
make[1]: *** [build/xbmc/CMakeFiles/xbmc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Used Operating system:
origin/master:db8e964bc7685e8847c96aec472a9e76cf9800f7Thank you for using Kodi and our issue tracker. This is your friendly Kodi GitHub bot :wink:
It seems that you have not followed the template we provide and require for all bug reports (or have opened a roadmap item by accident). Please understand that following the template is mandatory and required for the team to be able handle the volume of open issues efficiently.
Please edit your issue message to follow our template and make sure to fill in all fields appropriately. The issue will be closed after one week has passed without satisfactory follow-up from your side.
This is an automatically generated message. If you believe it was sent in error, please say so and a team member will remove the "Ignored rules" label.
@xbmc-gh-bot I believe that that was sent by error in this case. I removed fields which don't apply in my case what probably triggered that message. All really required fields were filled (IMHO).
Anyone from Kodi's team to confirm that?
There is no need to open an issue for a platform which isn't supported yet.
If you look into the mentioned PR, you will see that the build error is fixed there.
@Rechi I am reporting that because of iOS. iOS is officially supported.
Can somebody verify if is iOS affected?
You reported a build error while compiling for a currently unsupported platform (tvOS) and not even tried building for iOS. Also the issue title only contains tvOS.
The only thing you mention is, it could affect iOS.
The following commands will tell you that the two functions are only prohibited on tvOS and watchOS.
I tested it with Xcode 10.1 (AppleTVOS12.1, AppleTVSimulator12.1, MacOSX10.14, WatchOS5.1, WatchSimulator5.1, iPhoneOS12.1, iPhoneSimulator12.1)
cd /Applications/Xcode.app/Contents/Developer/Platforms
egrep --color -R ' (execvp|fork)\(' *.platform/Developer/SDKs/*.sdk/usr/include
we have already fixed it in the tvOS fork: https://github.com/SylvainCecchetto/xbmc
You could contribute to that repo :)