http://bugs.winehq.org/show_bug.cgi?id=36481
Bug ID: 36481 Summary: CFNetworkCopySystemProxySettings and kCFNetworkProxiesProxyAutoConfigURLString are unavailable Product: Wine Version: 1.7.19 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winhttp Assignee: wine-bugs@winehq.org Reporter: wine-2013@ryandesign.com
Hello, I'm one of the maintainers of wine in MacPorts.
wine 1.7.19 does not build on Mac OS X 10.5.8. The error is:
session.c: In function ‘get_system_proxy_autoconfig_url’: session.c:1301: error: ‘CFNetworkCopySystemProxySettings’ is unavailable (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:411) session.c:1307: error: ‘kCFNetworkProxiesProxyAutoConfigURLString’ is unavailable (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:453) make[1]: *** [session.o] Error 1
wine 1.7.17 built fine on the same OS.
wine 1.7.19 builds fine on Mac OS X 10.6 and later.
Apple documentation shows these symbols to be available as of Mac OS X 10.6 (see https://developer.apple.com/library/mac/documentation/CoreFoundation/Referen...) so this either means you are no longer supporting Mac OS X 10.5 or you need to find a way to do whatever you're doing using 10.5 APIs.
http://bugs.winehq.org/show_bug.cgi?id=36481
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hans@meelstraat.net Regression SHA1| |50c710bd914ee7197f234472523 | |f86cd6c651a2a OS|Linux |Mac OS X
http://bugs.winehq.org/show_bug.cgi?id=36481
--- Comment #1 from Ken Thomases ken@codeweavers.com --- How exactly are you building Wine? In particular, the errors you quoted suggest that the headers do in fact declare those identifiers but have marked them as unavailable using attributes. That suggests you are building with an SDK more recent than 10.5 but setting the deployment target to 10.5.
The typical solution would be to wrap the relevant code with:
#if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 ... #endif
I'm not sure if that will help, depending on how you're building.
http://bugs.winehq.org/show_bug.cgi?id=36481
--- Comment #2 from Ryan Schmidt wine-2014@ryandesign.com --- Created attachment 48550 --> http://bugs.winehq.org/attachment.cgi?id=48550 log
http://bugs.winehq.org/show_bug.cgi?id=36481
--- Comment #3 from Ryan Schmidt wine-2014@ryandesign.com --- I'm building more or less normally. That is to say, I have installed Xcode 3.1.4 and MacPorts 2.2.1 and run "sudo port install wine-devel", which runs configure and make with various arguments and environment variables. MacPorts sets MACOSX_DEPLOYMENT_TARGET the same as the Mac OS X version, so in this case it's "10.5". MacPorts isn't setting the SDK, so the current Mac OS X version's (10.5.8's) headers get used. There is no 10.6 SDK in 10.5's versions of Xcode. I've attached the full log.
In the file /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h, the lines around 411 read:
#if TARGET_OS_MAC /*! @function CFNetworkCopySystemProxySettings @discussion Returns a CFDictionary containing the current system internet proxy settings. @result Returns a dictionary containing key-value pairs that represent the current internet proxy settings. See below for definitions of the keys and values. NULL if no proxy settings have been defined or if an error was encountered. The caller is responsible for releasing the returned dictionary. */ CFN_EXPORT CFDictionaryRef CFNetworkCopySystemProxySettings( void ) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_0);
And the lines around 453 read:
/* * kCFNetworkProxiesSOCKSProxy * * Discussion: * Key for the url which indicates the location of the ProxyAutoConfig (PAC) file; value is a * CFString which is url for the PAC file. */ CFN_EXPORT const CFStringRef kCFNetworkProxiesProxyAutoConfigURLString __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_0); #endif // TARGET_OS_MAC
So it looks like these functions were available first in iOS 2, and according to Apple documentation did not become available in Mac OS X until 10.6.
http://bugs.winehq.org/show_bug.cgi?id=36481
--- Comment #4 from Ken Thomases ken@codeweavers.com --- (In reply to Ryan Schmidt from comment #3)
So it looks like these functions were available first in iOS 2, and according to Apple documentation did not become available in Mac OS X until 10.6.
Ah, that explains it.
(In reply to Ken Thomases from comment #1)
The typical solution would be to wrap the relevant code with:
#if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
Of course, that should be MAC_OS_X_VERSION_10_6 in both places, not MAC_OS_X_VERSION_10_5.
http://bugs.winehq.org/show_bug.cgi?id=36481
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |9a25a59dc25bca6060d3be89e5b | |fc57d117924de Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #5 from Hans Leidekker hans@meelstraat.net --- Fixed by 9a25a59dc25bca6060d3be89e5bfc57d117924de.
https://bugs.winehq.org/show_bug.cgi?id=36481
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.20.