agi icon indicating copy to clipboard operation
agi copied to clipboard

macOS AGI build broken under XCode 14.1

Open rosasco-wk opened this issue 2 years ago • 4 comments

SUMMARY

Build breakage for deprecated function mktemp().

CONFIGURATION

M1 MBP running XCode 14.1 and macOS 12.6.1

REPRO STEPS

CC=clang-12 bazel build --subcommands --config fuchsia_x64 //gapii/fuchsia:gapii

ERROR

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging core/cc/dl_loader.cpp:52:7: error: 'mktemp' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of mktemp(3), it is highly recommended that you use mkstemp(3) instead. [-Werror,-Wdeprecated-declarations] if (mktemp(tmp) != nullptr) { ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/include/stdlib.h:210:1: note: 'mktemp' has been explicitly marked deprecated here __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of mktemp(3), it is highly recommended that you use mkstemp(3) instead.")

rosasco-wk avatar Nov 09 '22 19:11 rosasco-wk

We are currently using XCode 12.4.

Are there any special requirements for using XCode 14?

yalcinmelihyasin avatar Jan 13 '23 18:01 yalcinmelihyasin

Yes, macOS 13 sdk has changed which results in the reported build failure.

rosasco-wk avatar Jan 13 '23 19:01 rosasco-wk

What my question was about, do you have to use XCode 14 or are you able to continue the development with XCode 12.4.

Otherwise, I believe you can install Clang12 separately and set you CC to Clang12 to be able to build it. Is this a reasonable workflow for you?

yalcinmelihyasin avatar Jan 18 '23 14:01 yalcinmelihyasin

The interest in XCode 14 was to be able to develop AGI on the ARM-based Macs. This isn't a blocker for me. I can work on linux in general with macOS development being a convenience at times.

On Wed, Jan 18, 2023 at 6:02 AM Melih Y. Yalcin @.***> wrote:

What my question was about, do you have to use XCode 14 or are you able to continue the development with XCode 12.4.

Otherwise, I believe you can install Clang12 separately and set you CC to Clang12 to be able to build it. Is this a reasonable workflow for you?

— Reply to this email directly, view it on GitHub https://github.com/google/agi/issues/1240#issuecomment-1387122819, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANYYDOOXMWJMXF3RKH7JAHTWS7ZYRANCNFSM6AAAAAAR3ZAQCQ . You are receiving this because you were assigned.Message ID: @.***>

rosasco-wk avatar Jan 18 '23 18:01 rosasco-wk