Subject: bug#36356: 27.0.50; linking error in git head on macos: _freea in libgnu

From: Robert Pluim <[email-masked]>
Date: Mon, 24 Jun 2019 17:02:58 +0200

>>>>> On Mon, 24 Jun 2019 10:41:13 -0400, Sam Steingold <[email-masked]> said:

    Sam> "make bootstrap" fails with:
    Sam>   CCLD     temacs
    Sam> Undefined symbols for architecture x86_64:
    Sam>   "_freea", referenced from:
    Sam>       _rpl_realpath in libgnu.a(canonicalize-lgpl.o)
    Sam> ld: symbol(s) not found for architecture x86_64
    Sam> clang: error: linker command failed with exit code 1 (use -v to see invocation)
    Sam> make[2]: *** [temacs] Error 1
    Sam> make[1]: *** [src] Error 2
    Sam> make: *** [bootstrap] Error 2

I think you'll find the following works better as a temporary workaround:

$ diff -u gnulib.mk gnulib.mk.new
--- gnulib.mk	2019-06-24 17:01:19.655623952 +0200
+++ gnulib.mk.new	2019-06-24 16:05:31.629871485 +0200
@@ -1998,10 +1998,8 @@
 ## begin gnulib module malloca
 ifeq (,$(OMIT_GNULIB_MODULE_malloca))

-ifneq (,$(gl_GNULIB_ENABLED_malloca))
 libgnu_a_SOURCES += malloca.c

-endif
 EXTRA_DIST += malloca.h

 endif