Opened 6 years ago
Closed 6 years ago
#5231 closed defect (fixed)
Build broken on macOS High Sierra 10.13.5
Reported by: | Victor ADASCALITEI | Owned by: | elexis |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 23 |
Component: | Build & Packages | Keywords: | |
Cc: | Patch: | Phab:D1610 |
Description
When building the project on a macOS High Sierra 10.13.5, I get the following:
==== Building pyrogenesis (release) ==== Linking pyrogenesis Undefined symbols for architecture x86_64: "_idn2_check_version", referenced from: _curl_version in libcurl.a(libcurl_la-version.o) _curl_version_info in libcurl.a(libcurl_la-version.o) _fix_hostname in libcurl.a(libcurl_la-url.o) "_idn2_free", referenced from: _Curl_disconnect in libcurl.a(libcurl_la-url.o) _create_conn in libcurl.a(libcurl_la-url.o) "_idn2_lookup_ul", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) "_idn2_strerror", referenced from: _fix_hostname in libcurl.a(libcurl_la-url.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [../../../binaries/system/pyrogenesis] Error 1 make: *** [pyrogenesis] Error 2
My clang -v
is
Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.6.0
I have checked and the libcurl.a
linked against is the one generated by ./build-osx-libs.sh
. There is no other libcurl.a
on my library-link path.
Workaround
Following this discussion, I have modified build-osx-libs.sh
(in the curl build region) to include --without-libidn2
during config like so:
(./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --enable-ipv6 --with-darwinssl --without-gssapi --without-libmetalink --without-librtmp --without-libssh2 --without-nss --without-polarssl --without-spnego --disable-ares --disable-ldap --disable-ldaps --without-libidn --without-libidn2 --with-zlib="${ZLIB_DIR}" --enable-shared=no && make ${JOBS} && make install) || die "libcurl build failed"
After rebuilding the lib with this change, I could build the project just fine.
Change History (5)
comment:1 by , 6 years ago
Milestone: | Backlog → Alpha 23 |
---|---|
Priority: | Release Blocker → Must Have |
comment:2 by , 6 years ago
Not being an osx user myself, on my 0 A.D. GitHub fork I added 2 branches with a .travis.yml file.
The environment for the xcode 9.3 image:
OS name: "mac os x", version: "10.13.3", arch: "x86_64", family: "mac"
No successful build there yet, but hopefully this will make testing easier. I can make some changes to the osx bundle script or .travis.yml if anyone has suggestions.
comment:3 by , 6 years ago
Patch: | → Phab:D1610 |
---|
comment:4 by , 6 years ago
Reading the curl code, I think they deleted the --without-libidn flag and replaced it with the --without-libidn2 flag and they forgot to update README.md
.
https://github.com/curl/curl/commit/9c91ec778104ae3b744b39444d544e82d5ee9ece
So the old flag --without-libidn
seems to be dead, as the curl version is fixed as well.
Tobbi used
--without-libidn2
as well when packaging the OSX alpha 23 release on http://irclogs.wildfiregames.com/2018-05/2018-05-12-QuakeNet-%230ad.log