From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 471161F4B6 for ; Tue, 25 Jun 2019 16:38:09 +0000 (UTC) Received: from localhost ([::1]:33952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfoSN-0003D8-CR for normalperson@yhbt.net; Tue, 25 Jun 2019 12:38:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44551) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfoAV-0005Fx-Al for bug-gnulib@gnu.org; Tue, 25 Jun 2019 12:19:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfoAO-0002mt-90 for bug-gnulib@gnu.org; Tue, 25 Jun 2019 12:19:34 -0400 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:35144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfoAE-0002Y3-Ri; Tue, 25 Jun 2019 12:19:24 -0400 Received: by mail-qt1-x835.google.com with SMTP id d23so3670845qto.2; Tue, 25 Jun 2019 09:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:user-agent :return-receipt-to:reply-to:mail-followup-to:date:message-id :mime-version; bh=WdFoz/egrdZbV+c/1mMLIX6dxuLWKs4tVcoSLB3eKZo=; b=VaRaFWk6hdaC61YMUO19NzLyKIJMi2XohPB37lmcquS/5ardH82U12+bOgByvCw26z LpDRfgXKCZYelRXgPfnvUueQwKGs9IVClCv++J/nk2wbvF30UhqWmppKktqN0kKPCk5Q eLg/intaS/h8fd/HFL3/hX88Hy/i4LlPcwp+fHZAwtDJB213efTIbfgLbLN1DtGPwmbZ 9kwcOuCrGNgHT0e9Ryy6/LUny2xRFBqAjkpWgGMNKvd8uVPBX23WSqLCEUniPuB3TbFz 2KuOe5d3MOTEtAUgTAJu49bM4epMoxzMF2djetufGxBj6inT2MhyP17/mPQjkImo6W7z GdPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:in-reply-to:references :user-agent:return-receipt-to:reply-to:mail-followup-to:date :message-id:mime-version; bh=WdFoz/egrdZbV+c/1mMLIX6dxuLWKs4tVcoSLB3eKZo=; b=PBen1MdMa8agv2N5tFWI5lwfQurBUdMGKAaiSCheteHx78t6+1oTH1yB34Cx7Tg13/ 00HZ6CRemJYzUw0KVFjNrCbtsNVSK5od81i0Blk4D7VumgNq2XM92FLrOzWmv87+HuY7 c8O+p+jCnII78uEYaMQrxzFf1o3jWG4NM+/NdtK9TU6TlgzxPfe/ybbqQ2RXEI9AQWHr gHvUD0XCAvvTXllEr7m5KMGonuzKU1yuotO+7maPVPqo9KWrP97VPurXEkZw5skcriO0 v3RRBZ6sVunxxB8uGAfoN2obZPPAc7bA35FyoT+YxI/3FL9rrqxN6PXd9Xf8kjsajK/5 Rn/w== X-Gm-Message-State: APjAAAU5qrC/APBtQfLsfL72u8+tMbyJ13AbKWyKEYJj3bazmSN/BQZf JFRt5babtQSGXoc8kOdcXHZtHuo= X-Google-Smtp-Source: APXvYqzrdQUSrZUQFg9v5JbPqPWC6bcEUJqzZlxVELw4+EeHQPQCIh4IfKhyoZjSEbH5xFZMBtMTbg== X-Received: by 2002:a0c:d238:: with SMTP id m53mr60865603qvh.161.1561479556432; Tue, 25 Jun 2019 09:19:16 -0700 (PDT) Received: from BZ-C02XR5CGJG5L ([207.251.91.66]) by smtp.gmail.com with ESMTPSA id g3sm7231740qkk.125.2019.06.25.09.19.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 25 Jun 2019 09:19:15 -0700 (PDT) From: Sam Steingold To: bug-gnulib@gnu.org, Bruno Haible Subject: Re: macosx linking fails: _freea referenced from: _rpl_realpath In-Reply-To: <11319098.sJsK0NTokd@omega> (Bruno Haible's message of "Tue, 25 Jun 2019 17:00:58 +0200") References: <11319098.sJsK0NTokd@omega> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Mail-Followup-To: bug-gnulib@gnu.org, Bruno Haible Date: Tue, 25 Jun 2019 12:19:12 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::835 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sds@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" > * Bruno Haible [2019-06-25 17:00:58 +0200]: > > Sam Steingold wrote: >> I get this error when linking Emacs: >> >> --8<---------------cut here---------------start------------->8--- >> CCLD temacs >> Undefined symbols for architecture x86_64: >> "_freea", referenced from: >> _rpl_realpath in libgnu.a(canonicalize-lgpl.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]: *** [temacs] Error 1 >> --8<---------------cut here---------------end--------------->8--- >> >> I also reported this as https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36356 >> (https://lists.gnu.org/archive/html/bug-gnu-emacs/2019-06/msg01229.html) > > 1) After your latest "git pull" from emacs, have you done a "make distclean" > followed by a reconfiguration? no, I did "make bootstrap" which re-runs configure > If you don't remember: Does the issue persist after a "make distclean" > followed by a reconfiguration? yes, I just did "make distclean; ../configure ...; make bootstrap" and got the above error. > 2) Which symbols does > nm lib/malloca.o > show? --8<---------------cut here---------------start------------->8--- $ find . -name \*alloc\*.o ./lib/allocator.o ./src/alloc.o $ nm ./lib/allocator.o U _free U _malloc U _realloc 0000000000000000 S _stdlib_allocator --8<---------------cut here---------------end--------------->8--- > If, as I would expect, it lists '_mmalloca' but not '_freea', it means > that the macro HAVE_ALLOCA was defined in the compilation unit > canonicalize-lgpl.c but not defined in the compilation unit malloca.c. > Can you investigate why this is so? (Where is HAVE_ALLOCA defined? In > config.h, I would guess. It is undefined somewhere? I would guess no. right: --8<---------------cut here---------------start------------->8--- ./src/config.h:#define HAVE_ALLOCA 1 ./src/config.h:#define HAVE_ALLOCA_H 1 --8<---------------cut here---------------end--------------->8--- > What are the preprocessor symbols that are defined [use "$CC -E > -dM"] in the compilation unit canonicalize-lgpl.c, versus the > compilation unit malloca.c? --8<---------------cut here---------------start------------->8--- $ gcc -Isrc -I../src -E -dM ../lib/malloca.c > m $ gcc -Isrc -I../src -E -dM ../lib/canonicalize-lgpl.c > c $ diff -u m c|grep -i ^[-+].*alloc +#define MAXALLOCSAVE (2 * CLBYTES) +#define _PC_ALLOC_SIZE_MIN 16 $ diff -u m c|grep -i ^[-+].*free --8<---------------cut here---------------end--------------->8--- However, I see no malloca.o in lib (where canonicalize-lgpl.o is found) I wonder if there is some magic autoconf place where canonicalize-lgpl is mentioned but malloca is not. Thanks! -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671 http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com http://think-israel.org http://www.memritv.org https://jihadwatch.org He who laughs last thinks slowest.