Page MenuHomeWildfire Games

Fix build on OSX 10.9.5 Mavericks
ClosedPublic

Authored by Stan on Dec 3 2018, 1:55 PM.

Details

Summary

According to https://curl.haxx.se/docs/install.html

One has to pass --without-ssl before specifying the tls backend one wants to use. If I don't do so, the games fails to link on OSX 10.9.5 Mavericks.

See the discussion here: https://wildfiregames.com/forum/index.php?/topic/24796-a23-re-release-preparation/&page=4

One also has to change the url for libsodium because Mavericks does not support the SSL protocol used on the website, but it didn't seem logical to include it in that revision because it requires a bit more changes to make it work. (The github url has the version in the path)
LIB_URL="https://download.libsodium.org/libsodium/releases/"
by this one:
LIB_URL="https://github.com/jedisct1/libsodium/releases/download/1.0.16/"

Test Plan

Test it doesn't break on newer macos

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 6493
Build 10744: Vulcan BuildJenkins

Event Timeline

Stan created this revision.Dec 3 2018, 1:55 PM
Vulcan added a subscriber: Vulcan.Dec 3 2018, 1:56 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/differential/814/

lyv added a subscriber: lyv.Dec 4 2018, 6:54 AM
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: 0ad/libraries/osx/build-osx-libs.sh
|===================================================================
|--- 0ad/libraries/osx/build-osx-libs.sh
|+++ 0ad/libraries/osx/build-osx-libs.sh
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored

Path of the file seems off.

Stan updated this revision to Diff 7031.Dec 4 2018, 8:34 AM

Fix path

Vulcan added a comment.Dec 4 2018, 9:06 AM

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

Link to build: https://jenkins.wildfiregames.com/job/differential/815/

I tried today and when i tried to build the game It gave me a error:

Undefined symbols for architecture x86_64:

"_BrotliDecoderCreateInstance", referenced from:
    _brotli_init_writer in libcurl.a(libcurl_la-content_encoding.o)
"_BrotliDecoderDecompressStream", referenced from:
    _brotli_unencode_write in libcurl.a(libcurl_la-content_encoding.o)
"_BrotliDecoderDestroyInstance", referenced from:
    _brotli_unencode_write in libcurl.a(libcurl_la-content_encoding.o)
    _brotli_close_writer in libcurl.a(libcurl_la-content_encoding.o)
"_BrotliDecoderGetErrorCode", referenced from:
    _brotli_unencode_write in libcurl.a(libcurl_la-content_encoding.o)
"_BrotliDecoderVersion", referenced from:
    _curl_version in libcurl.a(libcurl_la-version.o)
    _curl_version_info in libcurl.a(libcurl_la-version.o)

ld: symbol(s) not found for architecture x86_64

Stan added a comment.Dec 7 2018, 8:22 PM

Can you pass --without-ssl ?

Itms added a comment.Dec 7 2018, 9:00 PM

@trompetin17 It looks like you have yet another system lib which tries to sneak into the build ? Can you try --without-brotli? Just like we did with nghttp2.

Stan added a comment.Dec 7 2018, 9:03 PM

Ah autocorrect try Itms fix ;) I meant to write--without-brotli.
It would be nice to disable all other librairies if possible.

elexis added a subscriber: elexis.Dec 8 2018, 12:56 PM
In D1687#66939, @Stan wrote:

It would be nice to disable all other librairies if possible.

Not few flags, libCURLs ./configure --help | grep without yields

--without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
--without-zlib          disable use of zlib
--without-brotli        disable BROTLI
--without-default-ssl-backend
--without-winssl        disable Windows native SSL/TLS
--without-darwinssl     disable Apple OS native SSL/TLS
--without-ssl           disable OpenSSL
--without-gnutls        disable GnuTLS detection
--without-polarssl      disable PolarSSL detection
--without-mbedtls       disable mbedTLS detection
--without-cyassl        disable CyaSSL detection
--without-wolfssl       disable WolfSSL detection
--without-mesalink      disable MesaLink detection
--without-nss           disable NSS detection
--without-axtls         disable axTLS
--without-ca-bundle     Don't use a default CA bundle
--without-ca-path       Don't use a default CA path
--without-ca-fallback   Don't use the built in CA store of the SSL library
--without-libpsl        disable support for libpsl cookie checking
--without-libmetalink   disable libmetalink detection
--without-librtmp       disable LIBRTMP
--without-winidn        disable Windows native IDN
--without-libidn2       Disable libidn2 usage
--without-nghttp2       Disable nghttp2 usage
--without-zsh-functions-dir
Itms added a comment.Dec 8 2018, 1:26 PM
In D1687#66940, @elexis wrote:

Not few flags, libCURLs ./configure --help | grep without yields

Well, it looks like brotli was the last one... @Stan could you add without-brotli to this patch so that trompetin can test it when it's daytime in his place?

Stan updated this revision to Diff 7036.Dec 8 2018, 3:53 PM

Disable all TLS stuff.

Vulcan added a comment.Dec 8 2018, 3:53 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/differential/819/

Stan updated this revision to Diff 7037.Dec 8 2018, 5:58 PM

Upload the correct patch.

Vulcan added a comment.Dec 8 2018, 6:31 PM

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

Link to build: https://jenkins.wildfiregames.com/job/differential/820/

trompetin17 accepted this revision.Dec 8 2018, 6:59 PM

I rebuild libcurl and game, I was able to join in lobby, open mod.io

This revision is now accepted and ready to land.Dec 8 2018, 6:59 PM
This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Dec 8 2018, 10:09 PM