From unknown Fri Aug 15 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#40205: 28.0.50; 32bit or LTO movemail build fails on macOS Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Mar 2020 03:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40205 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 40205@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158501966431793 (code B ref -1); Tue, 24 Mar 2020 03:15:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Mar 2020 03:14:24 +0000 Received: from localhost ([127.0.0.1]:53729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGa1H-0008Gj-VA for submit@debbugs.gnu.org; Mon, 23 Mar 2020 23:14:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:32989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGa1F-0008GX-3X for submit@debbugs.gnu.org; Mon, 23 Mar 2020 23:14:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49224) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGa1D-00048x-3c for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 23:14:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGa1B-0007JB-0B for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 23:14:18 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:53966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jGa1A-0007EG-Jc for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 23:14:16 -0400 Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 11448F08ED for ; Tue, 24 Mar 2020 12:14:11 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Tue, 24 Mar 2020 12:14:11 +0900 Message-ID: From: YAMAMOTO Mitsuharu User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On macOS, movemail cannot be built with CC='cc -arch i386': CCLD movemail Undefined symbols for architecture i386: "_rpl_getopt$UNIX2003", referenced from: _main in movemail-1f1ea0.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [movemail] Error 1 make: *** [lib-src] Error 2 This is due to the following part in the system getopt.h: #ifndef _GETOPT #define _GETOPT int getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt); extern char *optarg; /* getopt(3) external variables */ extern int optind, opterr, optopt; #endif which is expanded to: int rpl_getopt(int, char * const [], const char *) __asm("_" "rpl_getopt" "$UNIX2003"); extern char *rpl_optarg; extern int rpl_optind, rpl_opterr, rpl_optopt; I think the Gnulib getopt does not expect the __asm line above. 64-bit LTO build with CC='cc -flto' fails, too. CCLD movemail ld: reference to symbol (which has not been assigned an address) _rpl_getopt in '_main' from /var/folders/69/m7h39yv92g70qy7p3xdlghdm0000gn/T/cc-907a5d.o for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [movemail] Error 1 make: *** [lib-src] Error 2 YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From unknown Fri Aug 15 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#40205: 32bit or LTO movemail build fails on macOS References: In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Mar 2020 02:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40205 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: YAMAMOTO Mitsuharu Cc: Gnulib bugs , Zack Weinberg , 40205@debbugs.gnu.org Received: via spool by 40205-submit@debbugs.gnu.org id=B40205.158510511031647 (code B ref 40205); Wed, 25 Mar 2020 02:59:02 +0000 Received: (at 40205) by debbugs.gnu.org; 25 Mar 2020 02:58:30 +0000 Received: from localhost ([127.0.0.1]:55822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGwFS-0008EM-0J for submit@debbugs.gnu.org; Tue, 24 Mar 2020 22:58:30 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGwFP-0008E9-0j for 40205@debbugs.gnu.org; Tue, 24 Mar 2020 22:58:27 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 448B416008E; Tue, 24 Mar 2020 19:58:21 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Z0DWsq7wMVIs; Tue, 24 Mar 2020 19:58:20 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5AB031600C7; Tue, 24 Mar 2020 19:58:20 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hYX2U3Uxaj5H; Tue, 24 Mar 2020 19:58:20 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2B39C16008E; Tue, 24 Mar 2020 19:58:20 -0700 (PDT) From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <547efadc-1a0c-2d47-4b03-5c4cd426f128@cs.ucla.edu> Date: Tue, 24 Mar 2020 19:58:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------A26BA70D591678B9F817A20E" Content-Language: en-US X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a multi-part message in MIME format. --------------A26BA70D591678B9F817A20E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for the bug report. Does the attached patch to getopt-pfx-core.h fix the bug for you? I'll CC: this to bug-gnulib and to Zack Weinberg, who wrote that file. For those new to this thread, please see . --------------A26BA70D591678B9F817A20E Content-Type: text/x-patch; charset=UTF-8; name="getopt-apple.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="getopt-apple.diff" diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h index 31a747d67..a4891bc80 100644 --- a/lib/getopt-pfx-core.h +++ b/lib/getopt-pfx-core.h @@ -48,6 +48,14 @@ # define optind __GETOPT_ID (optind) # define optopt __GETOPT_ID (optopt) +/* Work around a a problem on macOS, which declares getopt with a + trailing __DARWIN_ALIAS(getopt) that would expand to something like + __asm("_" "rpl_getopt" "$UNIX2003") were it not for the following + hack to suppress the macOS declaration . */ +# ifdef __APPLE__ +# define _GETOPT +# endif + /* The system's getopt.h may have already included getopt-core.h to declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that getopt-core.h declares them with prefixes. */ --------------A26BA70D591678B9F817A20E-- From unknown Fri Aug 15 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#40205: 32bit or LTO movemail build fails on macOS Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Mar 2020 04:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40205 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: Gnulib bugs , Zack Weinberg , 40205@debbugs.gnu.org Received: via spool by 40205-submit@debbugs.gnu.org id=B40205.15851092636363 (code B ref 40205); Wed, 25 Mar 2020 04:08:02 +0000 Received: (at 40205) by debbugs.gnu.org; 25 Mar 2020 04:07:43 +0000 Received: from localhost ([127.0.0.1]:55852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGxKR-0001eZ-8m for submit@debbugs.gnu.org; Wed, 25 Mar 2020 00:07:43 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:52875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGxKP-0001eN-9c for 40205@debbugs.gnu.org; Wed, 25 Mar 2020 00:07:41 -0400 Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 80B66F08F3; Wed, 25 Mar 2020 13:07:39 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Wed, 25 Mar 2020 13:07:39 +0900 Message-ID: From: YAMAMOTO Mitsuharu In-Reply-To: <547efadc-1a0c-2d47-4b03-5c4cd426f128@cs.ucla.edu> References: <547efadc-1a0c-2d47-4b03-5c4cd426f128@cs.ucla.edu> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, 25 Mar 2020 11:58:19 +0900, Paul Eggert wrote: > > Thanks for the bug report. Does the attached patch to > getopt-pfx-core.h fix the bug for you? Yes, this works for both -arch i386 and -flto cases. Thanks. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From unknown Fri Aug 15 16:56:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#40205: 32bit or LTO movemail build fails on macOS Resent-From: Zack Weinberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Mar 2020 13:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40205 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: Gnulib bugs , 40205@debbugs.gnu.org, YAMAMOTO Mitsuharu Received: via spool by 40205-submit@debbugs.gnu.org id=B40205.15851420856121 (code B ref 40205); Wed, 25 Mar 2020 13:15:01 +0000 Received: (at 40205) by debbugs.gnu.org; 25 Mar 2020 13:14:45 +0000 Received: from localhost ([127.0.0.1]:56278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jH5ro-0001af-Sj for submit@debbugs.gnu.org; Wed, 25 Mar 2020 09:14:45 -0400 Received: from mailbackend.panix.com ([166.84.1.89]:38532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jH5rm-0001aX-Om for 40205@debbugs.gnu.org; Wed, 25 Mar 2020 09:14:43 -0400 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by mailbackend.panix.com (Postfix) with ESMTPSA id 48nT9Z2DmZz1QHC for <40205@debbugs.gnu.org>; Wed, 25 Mar 2020 09:14:41 -0400 (EDT) Received: by mail-ed1-f45.google.com with SMTP id u59so2225749edc.12 for <40205@debbugs.gnu.org>; Wed, 25 Mar 2020 06:14:41 -0700 (PDT) X-Gm-Message-State: ANhLgQ2EuZGDRibCfu0AGE8j8Re8JikxtmsCe0fbCM70mJ47Rn05wK4v raPr28EWWIMicwXsMiZ0b0jTxJcllJ4NyrA0Lrc= X-Google-Smtp-Source: ADFU+vvLwBcqS8L1M0KXEdbVAINYctDs2z+6TJb+eWUR50uvYmLw4yo04q/9IdFsjkK5LZ/tnyKRQaC8Pi3/rAOi2I0= X-Received: by 2002:a50:aa9c:: with SMTP id q28mr2841659edc.10.1585142080998; Wed, 25 Mar 2020 06:14:40 -0700 (PDT) MIME-Version: 1.0 References: <547efadc-1a0c-2d47-4b03-5c4cd426f128@cs.ucla.edu> In-Reply-To: <547efadc-1a0c-2d47-4b03-5c4cd426f128@cs.ucla.edu> From: Zack Weinberg Date: Wed, 25 Mar 2020 09:14:29 -0400 X-Gmail-Original-Message-ID: Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On Tue, Mar 24, 2020 at 10:58 PM Paul Eggert wrote: > > Thanks for the bug report. Does the attached patch to getopt-pfx-core.h fix the > bug for you? > > I'll CC: this to bug-gnulib and to Zack Weinberg, who wrote that file. For those > new to this thread, please see . Patch seems plausible enough to me. I didn't think very hard about the ways a system declaration of getopt could interfere when I wrote this file. zw From unknown Fri Aug 15 16:56:56 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: YAMAMOTO Mitsuharu Subject: bug#40205: closed (Re: 32bit or LTO movemail build fails on macOS) Message-ID: References: <0ee74f51-3c15-d03a-115f-368b26eed046@cs.ucla.edu> X-Gnu-PR-Message: they-closed 40205 X-Gnu-PR-Package: emacs Reply-To: 40205@debbugs.gnu.org Date: Wed, 25 Mar 2020 20:44:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1585169041-29713-1" This is a multi-part message in MIME format... ------------=_1585169041-29713-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #40205: 28.0.50; 32bit or LTO movemail build fails on macOS which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 40205@debbugs.gnu.org. --=20 40205: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D40205 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1585169041-29713-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 40205-done) by debbugs.gnu.org; 25 Mar 2020 20:43:10 +0000 Received: from localhost ([127.0.0.1]:57817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHCrm-0007hn-2a for submit@debbugs.gnu.org; Wed, 25 Mar 2020 16:43:10 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:55724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHCrk-0007ha-Mu for 40205-done@debbugs.gnu.org; Wed, 25 Mar 2020 16:43:09 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1CE731600C6; Wed, 25 Mar 2020 13:43:03 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pFXjkxkE2n8K; Wed, 25 Mar 2020 13:43:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7B69A1600CD; Wed, 25 Mar 2020 13:43:02 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jf7-k0Hn3eMx; Wed, 25 Mar 2020 13:43:02 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4B5FC1600C6; Wed, 25 Mar 2020 13:43:02 -0700 (PDT) Subject: Re: 32bit or LTO movemail build fails on macOS To: YAMAMOTO Mitsuharu References: <547efadc-1a0c-2d47-4b03-5c4cd426f128@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <0ee74f51-3c15-d03a-115f-368b26eed046@cs.ucla.edu> Date: Wed, 25 Mar 2020 13:43:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40205-done Cc: Gnulib bugs , Zack Weinberg , 40205-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 3/24/20 9:07 PM, YAMAMOTO Mitsuharu wrote: > Yes, this works for both -arch i386 and -flto cases. Thanks for checking. I installed the patch into Gnulib and propagated the fix into Emacs master, and am marking this Emacs bug as done. ------------=_1585169041-29713-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 Mar 2020 03:14:24 +0000 Received: from localhost ([127.0.0.1]:53729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGa1H-0008Gj-VA for submit@debbugs.gnu.org; Mon, 23 Mar 2020 23:14:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:32989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGa1F-0008GX-3X for submit@debbugs.gnu.org; Mon, 23 Mar 2020 23:14:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49224) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGa1D-00048x-3c for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 23:14:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGa1B-0007JB-0B for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 23:14:18 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:53966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jGa1A-0007EG-Jc for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 23:14:16 -0400 Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 11448F08ED for ; Tue, 24 Mar 2020 12:14:11 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Tue, 24 Mar 2020 12:14:11 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: bug-gnu-emacs@gnu.org Subject: 28.0.50; 32bit or LTO movemail build fails on macOS User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On macOS, movemail cannot be built with CC='cc -arch i386': CCLD movemail Undefined symbols for architecture i386: "_rpl_getopt$UNIX2003", referenced from: _main in movemail-1f1ea0.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [movemail] Error 1 make: *** [lib-src] Error 2 This is due to the following part in the system getopt.h: #ifndef _GETOPT #define _GETOPT int getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt); extern char *optarg; /* getopt(3) external variables */ extern int optind, opterr, optopt; #endif which is expanded to: int rpl_getopt(int, char * const [], const char *) __asm("_" "rpl_getopt" "$UNIX2003"); extern char *rpl_optarg; extern int rpl_optind, rpl_opterr, rpl_optopt; I think the Gnulib getopt does not expect the __asm line above. 64-bit LTO build with CC='cc -flto' fails, too. CCLD movemail ld: reference to symbol (which has not been assigned an address) _rpl_getopt in '_main' from /var/folders/69/m7h39yv92g70qy7p3xdlghdm0000gn/T/cc-907a5d.o for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [movemail] Error 1 make: *** [lib-src] Error 2 YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp ------------=_1585169041-29713-1--