Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#5481 closed defect (duplicate)

GnuTLS build fails on macOS Mojave

Reported by: kali0ad Owned by:
Priority: Should Have Milestone:
Component: Build & Packages Keywords:
Cc: Patch:

Description (last modified by trompetin17)

I'm trying to follow the instructions here: to build the game on my Mac.

The build fails during the ./ -j3 command.

Below is a snippet of the output:

checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for Minix Amsterdam compiler... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking for ar... (cached) ar
checking for ranlib... ranlib
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking dependency style of clang... gcc3
checking the archiver (ar) interface... (cached) ar
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking dependency style of clang++... gcc3
checking for bison... bison -y
checking for a sed that does not truncate output... /usr/bin/sed
checking for clang option to accept ISO C99... none needed
checking whether to build with code coverage support... no
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for autogen... :
configure: WARNING:
*** autogen not found. Will not link against libopts.
checking for inline... inline
checking for ANSI C header files... (cached) yes
checking cpuid.h usability... yes
checking cpuid.h presence... yes
checking for cpuid.h... yes
checking for struct iovec.iov_basea... no
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking stdatomic.h usability... yes
checking stdatomic.h presence... yes
checking for stdatomic.h... yes
checking for getrandom... no
checking for getentropy... yes
checking for NETTLE... configure: error:
  *** Libnettle 3.1 was not found.

ERROR: GnuTLS build failed

After some Googling, it looks like this could be:

a) an issue with the --enable-shared flag (

b) an issue with (

c) the path to libnettle (

d) something else

I also tried installing libnettle outside of 0ad with the directions here: but was unable to install it. The configuration command runs fine, but sudo make install results in:

./install-sh -c -d /usr/share/info ; \
	[ -f $f ] || f="./$f" ; \
	/usr/bin/install -c -m 644 "$f" /usr/share/info ; \
	if (install-info --version && \
	    install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
	  install-info --info-dir="/usr/share/info" "$f" ; \
	else : ; fi
install: /usr/share/info/ Operation not permitted
/usr/share/info/dir: Operation not permitted
make[1]: *** [install-info] Error 1
make: *** [install] Error 2

Anyone else able to build 0ad on a Mac successfully?

Change History (4)

comment:1 by wraitii, 13 months ago

Description: modified (diff)
Resolution: duplicate
Status: newclosed

Hey kali0ad. Thanks for reporting this. It is a duplicate of #5453 so I'm closing this ticket since #5453 is earlier.

Can you try ?

comment:2 by trompetin17, 13 months ago

Description: modified (diff)

Hi Kali0ad,

Yeah, I could build all in osx Mojave. could you add the log please, looks like that something was wrong when building nettle-3.4. I Im guessing because "Libnettle 3.1 was not found."

comment:3 by elexis, 13 months ago

Milestone: Alpha 24

comment:4 by historic_bruno, 13 months ago

In 22455:

Fixes GnuTLS build on macOS.
Fixes macOS linker warning "PIE disabled absolute - addressing not allowed".

Updates nettle to 3.5.1, GnuTLS to 3.6.8, gloox to 1.0.22.
Disables TCP fast open feature of GnuTLS (requires 10.11, no SDK build support).
Fixes GnuTLS detection of GMP by adding it to LIBS flag.
Disables getaddrinfo on gloox 1.0.22. Lobby connections failed during server hostname resolution.
Adds --with-pic to GMP build to force consistent PIC usage.
Adds -N flag to patch commands to avoid reapplying them.
Removes unneeded build flags.
Documents --enable-fat configure flag: GMP and nettle detect CPU-specific features, fat binaries let us build and run them on different CPUs (see D1772).

Fixes #5453, 5489. Refs #5481.
Tested by: kali0ad, trompetin17
Reviewed by: elexis, trompetin17

Differential Revision: ​

Note: See TracTickets for help on using tickets.