Page MenuHomeWildfire Games

build-osx-libs: Update GnuTLS to 3.6.13 (unbreak macOS 10.15)
ClosedPublic

Authored by Krinkle on May 1 2020, 9:17 PM.

Details

Reviewers
Itms
wraitii
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23772: build-osx-libs: Update GnuTLS to 3.6.13 (unbreak macOS 10.15)
Trac Tickets
#5729
Summary

GnuTLS <= 3.6.12, including our GnuTL 3.6.8, does not compile on
the latest macOS (10.15 Catalina).

ld: weak import of symbol '___darwin_check_fd_set_overflow' not
supported because of option: -no_weak_imports for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR: GnuTLS build failed

This is reported upstream at https://gitlab.com/gnutls/gnutls/-/issues/966
and also in Homebrew (package manager for macOS) at
https://github.com/Homebrew/homebrew-core/issues/52348.

The recommended that Homebrew used for their pakcage is to unset LDFLAGS=
which GnuTLS otherwise would set to -no_weak_imports, which caused the
problem. Upstream has not yet fixed this in their own code yet, but I guess
we can do the same for now.

Homebrew's package for GnuTLS also disables the Guile integration.
We did not do that yet, but it seems on macOS 10.15 problems with that
are also finally exposed to us:

ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
In procedure dynamic-link: file: "0ad/libraries/osx/gnutls/gnutls-3.6.13/guile/src/guile-gnutls-v-2", message: "file not found"
make[2]: *** [modules/gnutls.go] Error 1
ERROR: GnuTLS build failed

Ref https://trac.wildfiregames.com/ticket/5729.

Test Plan

Run ./build-osx-libs.sh -j3 and see it no longer fail at the GnuTLS stage. (Spoiler: It will instead fail at the ICU step, which I am fixing in the next commit).

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Krinkle created this revision.May 1 2020, 9:17 PM
Owners added a subscriber: Restricted Owners Package.May 1 2020, 9:17 PM
Vulcan added a comment.May 1 2020, 9:23 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2058/display/redirect

Krinkle added reviewers: Restricted Owners Package, Itms.May 2 2020, 7:26 PM
Krinkle removed a subscriber: Restricted Owners Package.

Tested revision 23664 on macOS Catalina 10.15.4, with patch applied it no longer fail at the GnuTLS stage.

Stan added a subscriber: Stan.May 15 2020, 8:23 AM

Tested revision 23664 on macOS Catalina 10.15.4, with patch applied it no longer fail at the GnuTLS stage.

Thanks for letting us know!

wraitii accepted this revision.May 17 2020, 12:07 PM
wraitii added a subscriber: wraitii.

I've tested this and it works correctly.
@Krinkle Do you still experience the graphical issue you reported? I don't notice this.

Regarding "guile", it appears to be https://www.gnu.org/software/guile/ which does seem like something we can do without.

This revision is now accepted and ready to land.May 17 2020, 12:07 PM

I've tested upgrading this to 3.6.14 which recently came out, and it doesn't link on my machine -> _c_isdigit is not found.

I've reported the issue at https://gitlab.com/gnutls/gnutls/-/issues/1033, we'll see what comes out of it.

That being said this version works for me on Mojave and Catalina, so I'm merging regardless.

This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Jun 14 2020, 12:30 PM