From 0b8a8c4f322306ac4146f398215b7bd2f6632e65 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 30 Jun 2021 19:33:17 +0000 Subject: Workaround for build failures on Mac git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4117 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- buildtools/configure.pl | 8 ++++++++ doc/HISTORY | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/buildtools/configure.pl b/buildtools/configure.pl index a2a1fd22..aa94a6bb 100755 --- a/buildtools/configure.pl +++ b/buildtools/configure.pl @@ -2489,6 +2489,14 @@ if ($platform eq "GNU") { push(@config_mk, "CC = cc -no-cpp-precomp\n"); push(@config_mk, gnuCflags('cc')); push(@config_mk, 'CFLAGS_SHLIB = -fno-common', "\n"); + # -D_DARWIN_SOURCE is a hack. We've seen build fail on MacOS because the + # C library erroneously neglects to include 'sprintf' and 'vasprintf' in + # under the conditions under which Netpbm includes it. + # -D_DARWIN_SOURCE makes it include them. *_SOURCE macros are supposed to + # be defined in the source code to which they apply, but since this is + # just a hack, we prefer to do it with a compiler option and leave the + # source code unsullied. + push(@config_mk, "CFLAGS += -D_DARWIN_SOURCE\n"); my $installNameOpt; if ($netpbmlib_runtime_path eq '') { diff --git a/doc/HISTORY b/doc/HISTORY index 86d35f7c..08b1609d 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -37,10 +37,13 @@ not yet BJH Release 10.95.00 Unix process management. Bug introduced in Netpbm 10.94 (March 2021). - Build: make it work on systems that don't have date +%s. Broken + Build: Make it work on systems that don't have date +%s. Broken in Netpbm 10.78 (March 2017). Thanks Claes Nästén (pekdon@gmail.com). + Build: Fix for MacOS build failures with missing sprintf and + vasprintf in broken build environment. + Mkdeb: fix failure with message about unrecognized format of VERSION file. Introduced in Netpbm 10.90 (March 2020). -- cgit 1.4.1