Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended build fails with new Xcode 14.1 on MacOS #10491

Closed
onedrawingperday opened this issue Dec 3, 2022 · 4 comments · Fixed by #10959
Closed

Extended build fails with new Xcode 14.1 on MacOS #10491

onedrawingperday opened this issue Dec 3, 2022 · 4 comments · Fixed by #10959

Comments

@onedrawingperday
Copy link
Contributor

onedrawingperday commented Dec 3, 2022

What version of Hugo are you using (hugo version)?

$ hugo version

hugo v0.107.0-dc44bca963b0035818d4521b73c39af63db3a230+extended darwin/arm64 BuildDate=2022-12-02T11:13:34Z

Does this issue reproduce with the latest release?

No

To reproduce pull the latest changes from Hugo master branch and then try compiling on macOS with:
env GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build -tags extended -o $HOME/bin or similar.

The compiling fails with the following console message:

go: downloading github.com/bep/godartsass v0.15.0
go: downloading google.golang.org/protobuf v1.28.1
# github.com/bep/golibsass/internal/libsass
In file included from json.cpp:2:
../../../go/pkg/mod/github.com/bep/golibsass@v1.1.0/internal/libsass/../../libsass_src/src/json.cpp:1289:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'

@onedrawingperday
Copy link
Contributor Author

For now I have set Xcode to “Continue building after errors“ :.

The above deprecation shipped with the recently released Xcode 14.1

@bep bep changed the title macOS: Unable to compile Hugo from source - sprintf is deprecated in bep/golibsass Extended build fails with new Xcode 14.1 on MacOS Dec 3, 2022
@bep bep removed the NeedsTriage label Dec 3, 2022
@bep bep added this to the v0.108.0 milestone Dec 3, 2022
@bep
Copy link
Member

bep commented Dec 3, 2022

Are you sure that the build actually fails (what is the output of echo $? after a build)? It's rather odd that they then call it a compiler warning.

@onedrawingperday
Copy link
Contributor Author

onedrawingperday commented Dec 3, 2022

Hello,

I am seeing empty output when I execute echo right after the above stream of Xcode errors.

Also the timestamp of the Hugo build remains unchanged.

For example I tried building from source just now [@ 14:10 pm EET+2] and the timestamp of the hugo binary is 11:13 am EET+2:

hugo v0.107.0-dc44bca963b0035818d4521b73c39af63db3a230+extended darwin/arm64 BuildDate=2022-12-02T11:13:34Z

P.S. Also the above post I made about tweaking Xcode settings has no effect. I got confused because I succesully built the plain Hugo version.

It is not possible to build Hugo Extended as of now in macOS Ventura with Xcode 14.1, so I guess I will start using the release binaries.

EDIT 18 JAN 2023

The above workaround works perfectly and it is what I have been using since I opened this issue to build Hugo from source on macOS Ventura.

@github-actions
Copy link

github-actions bot commented Jun 9, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants