Opened 3 months ago

Last modified 4 weeks ago

#64726 assigned defect

R @4.1.2_1: Build fails on Intel iMac, Monterey 12.2.1, Xcode 13.2.1, SDK 12

Reported by: ashimog Owned by: kjellpk (Kjell Konis)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: i0ntempest, cooljeanius (Eric Gallager)
Port: R


Building R @4.1.2_1 on Intel iMac running Monterey 12.2.1 with Xcode 13.2.1, SDK 12 gives the following error:

:info:build In file included from qdCocoa.m:25:
:info:build In file included from ./qdCocoa.h:39:
:info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
:info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString
:info:build - (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
:info:build                                                          ~~~~~~~~~~~~~~                                                                       ^                  ~

This seems to be a bug associated with MacOSX12.1.sdk. I found if I symlink MacOSX12.sdk to MacOSX11.3.sdk, R can build successfully.

Attachments (2)

main.log (413.4 KB) - added by ashimog 3 months ago.
config.log (660.1 KB) - added by ashimog 3 months ago.

Download all attachments as: .zip

Change History (7)

Changed 3 months ago by ashimog

Attachment: main.log added

Changed 3 months ago by ashimog

Attachment: config.log added

comment:1 Changed 3 months ago by jmroot (Joshua Root)

Cc: i0ntempest added
Owner: set to kjellpk
Status: newassigned

comment:2 Changed 3 months ago by i0ntempest

R with the default variants builds fine on my system, what variants are you using?

comment:3 Changed 3 months ago by ryandesign (Ryan Schmidt)

i0ntempest, does your system also use the macOS 12 SDK? This peculiar error has been reported in other MacPorts tickets and elsewhere when using the macOS 12 SDK. A peculiar-looking fix has been suggested; see comment:ticket:63877:8. I don't know if one or both of those parameters are appropriate to use here or if maybe some better solution has been found in the mean time.

comment:4 Changed 3 months ago by i0ntempest

My environment:

:debug:configure Environment: 
:debug:configure CC='/opt/local/bin/clang-mp-13'
:debug:configure CC_PRINT_OPTIONS='YES'
:debug:configure CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_R/R/work/.CC_PRINT_OPTIONS'
:debug:configure CFLAGS='-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64'
:debug:configure CPATH='/opt/local/include'
:debug:configure CPPFLAGS='-I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'
:debug:configure CXX='/opt/local/bin/clang++-mp-13'
:debug:configure CXXFLAGS='-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64'
:debug:configure DEVELOPER_DIR='/Library/Developer/CommandLineTools'
:debug:configure F77='/opt/local/bin/gfortran-mp-11'
:debug:configure F90FLAGS='-pipe -Os -m64'
:debug:configure FC='/opt/local/bin/gfortran-mp-11'
:debug:configure FCFLAGS='-pipe -Os -m64'
:debug:configure FFLAGS='-pipe -Os -m64'
:debug:configure INSTALL='/usr/bin/install -c'
:debug:configure LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64'
:debug:configure LIBRARY_PATH='/opt/local/lib'
:debug:configure MACOSX_DEPLOYMENT_TARGET='12.0'
:debug:configure OBJC='/opt/local/bin/clang-mp-13'
:debug:configure OBJCFLAGS='-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64'
:debug:configure OBJCXX='/opt/local/bin/clang++-mp-13'
:debug:configure OBJCXXFLAGS='-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64'
:debug:configure R_BROWSER='/usr/bin/open'
:debug:configure R_PDFVIEWER='/usr/bin/open'
:debug:configure SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'

The only difference seems to be clang 12 vs 13?

comment:5 Changed 4 weeks ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.