Config does not check for macOS version for libdispatch: it is not there on 10.5 and 10.6 PPC
void CFDispatchRetain(dispatch_queue_t q) { dispatch_retain(q); }
void CFDispatchRelease(dispatch_queue_t q) { dispatch_release(q); }
using CFDispatchRef = CFRef<dispatch_queue_t, CFDispatchRetain, CFDispatchRelease>;
This breaks the build on 10.5 and 10.6 PPC.
Config should account for presence of libdispatch, as it does other OS components:
#if defined __APPLE__
#include <AvailabilityMacros.h>
#include <TargetConditionals.h>
#if defined __MACH__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
#define TORRENT_HAS_COPYFILE 1
#endif
#define TORRENT_NATIVE_UTF8 1
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
// on OSX, use the built-in common crypto for built-in
# if !defined TORRENT_USE_LIBCRYPTO && !defined TORRENT_USE_LIBGCRYPT
# define TORRENT_USE_COMMONCRYPTO 1
# endif
#endif // MAC_OS_X_VERSION_MIN_REQUIRED
// execinfo.h is available in the MacOS X 10.5 SDK.
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
#define TORRENT_USE_EXECINFO 1
#endif
#define TORRENT_USE_SYSTEMCONFIGURATION 1
#if TARGET_OS_IPHONE
#define TORRENT_USE_SC_NETWORK_REACHABILITY 1
#endif
#define TORRENT_USE_DEV_RANDOM 1
#else
// non-Apple BSD
#define TORRENT_USE_GETRANDOM 1
#define TORRENT_HAS_PTHREAD_SET_NAME 1
#endif // __APPLE__
this came up a long time ago. I thought it had been addressed. which version of libtorrent are you using?
this came up a long time ago. I thought it had been addressed. which version of libtorrent are you using?
@arvidn I tried building 2.0.7.
I think the most reasonable fix for this is to disable the whole IPNotification mechanism if libdispatch is not available
does this work? https://github.com/arvidn/libtorrent/pull/7294
does this work? https://github.com/arvidn/libtorrent/pull/7294
@arvidn Thank you very much for an update! I am away from native PPC hardware for about a week, so please allow me until then to check (I wanna verify it works on 10.6 PPC and 10.5.8 too, so that it is fixed in one go). I will test on 10.6.8 in Rosetta in the meanwhile.
great. The patch needs some updates as it ended up breaking iOS build. I will have to fix that, but I think it works to validate the approach for macOS.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
great. The patch needs some updates as it ended up breaking iOS build. I will have to fix that, but I think it works to validate the approach for macOS.
@arvidn Could you please update, has this been dealt with?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.