On Fri, 14 Jan 2022 09:06:47 GMT, Andrew Haley <a...@openjdk.org> wrote:

>> Simple change to `make/autoconf/toolchain.m4` to fix the bug as described in 
>> its title and description.
>
> make/autoconf/toolchain.m4 line 237:
> 
>> 235:     if test -n "$XCODEBUILD"; then
>> 236:       # On Mac OS X, default toolchain to clang after Xcode 5
>> 237:       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
> 
> What's the warning? If it is truly expected, shouldn't it go to /dev/null ?

The warning is

objc[3881]: Class AMSupportURLConnectionDelegate is implemented in both 
/usr/lib/libauthinstall.dylib (0x1e32b6b90) and 
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
 (0x1087e42c8). One of the two will be used. Which one is undefined.
objc[3881]: Class AMSupportURLSession is implemented in both 
/usr/lib/libauthinstall.dylib (0x1e32b6be0) and 
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
 (0x1087e4318). One of the two will be used. Which one is undefined.

as noted in the issues referenced by my bug report and we can ignore it (as 
build scripts of other projects do).

The problem with fully discarding the output is that there are other errors 
that might cause the exit code to be non-zero and in this case displaying the 
warning should be helpful for debugging.
Of course one could either just remove the expected warning or only display the 
error output when the return code is non-zero, but these alternatives seemed to 
cumbersome for me (and the first alternative to error-prone).

-------------

PR: https://git.openjdk.java.net/jdk18/pull/95

Reply via email to