From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69590: 30.0.50; Build scripts break due to DOS-style line endings Date: Wed, 06 Mar 2024 21:36:05 +0200 Message-ID: <86ttljjgpm.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16036"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69590@debbugs.gnu.org To: "Divvy Cr." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 06 20:37:04 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rhx4Z-0003wq-TB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Mar 2024 20:37:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhx45-0000SX-0z; Wed, 06 Mar 2024 14:36:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhx43-0000SE-HJ for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2024 14:36:31 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhx43-0005DG-8s for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2024 14:36:31 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rhx4X-00080q-QH for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2024 14:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Mar 2024 19:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69590 X-GNU-PR-Package: emacs Original-Received: via spool by 69590-submit@debbugs.gnu.org id=B69590.170975381830784 (code B ref 69590); Wed, 06 Mar 2024 19:37:01 +0000 Original-Received: (at 69590) by debbugs.gnu.org; 6 Mar 2024 19:36:58 +0000 Original-Received: from localhost ([127.0.0.1]:51481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhx4Q-00080O-SN for submit@debbugs.gnu.org; Wed, 06 Mar 2024 14:36:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhx4M-000804-2G; Wed, 06 Mar 2024 14:36:53 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhx3l-00057I-FZ; Wed, 06 Mar 2024 14:36:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pYuvie3JipPC6WiUoNcrgviQA/Z2omznGvu3z+3ujqU=; b=NeH4vPPB4CC3 ZOb2H6YLrli9M02TYrrTQDzq1yPQNaNwMniBixAbZzc3DikcycSaXZ6TWLjl5QRtvT6rb7E7kbHB8 hMBMJNEqZ9C+qr2o9Xr7sq8g2aLLFnb9EtXGi1vAb2VHH7zN03bnAH1jMykeSheiYSbfk8FdyevaF 1D/aIgsDFjjH70yI7IqPXFIGgNIRX5Mqj2XmHd8Vo2S23xMmgJ8sG+SEdf85LiKUEIhI4OXt2srVn VQu+VeKG/2H7YZxRQNbD9kGRrvYYagEiBVBHjIDOTdwMbypYE8aLxK9Rr+/dP9wxRkDquXnUKaABb Y3iqMICOophyRHnytBmeAQ==; In-Reply-To: (divvycr@gmail.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281126 Archived-At: tags 69590 notabug thanks > From: "Divvy Cr." > Date: Wed, 6 Mar 2024 18:27:41 +0000 > > Currently, cloning the latest Emacs branches (namely, master and > emacs-29) fails to build via `./autogen.sh` with the following error: > > zsh: ./autogen.sh: bad interpreter: /bin/sh^M: no such file or directory > > Using Vim's `:set fileformat=unix` on autogen.sh, it still fails to > build with the following errors: > > Checking whether you have the necessary tools... > (Read INSTALL.REPO for more details on building Emacs) > Checking for autoconf (need at least version 2.65) ... ok > Your system has the required tools. > Building aclocal.m4 ... > Running 'autoreconf -fi -I m4' ... > : not found > sh: 2: Syntax error: word unexpected (expecting "do") > configure.ac:7373: error: expected source file, required through > AC_LIBSOURCES, not found > ./lib/autoconf/general.m4:2437: AC_FATAL is expanded from... > m4/gnulib-comp.m4:222: gl_INIT is expanded from... > configure.ac:7373: the top level > autom4te: error: /usr/bin/m4 failed with exit status: 1 > autoreconf: error: /usr/bin/autoconf failed with exit status: 1 > > Now, the line ': not found' again hints at problems with DOS-vs-Unix > style formatting. I have managed to successfully build latest Emacs > after running the following on the repository: > > git ls-files -z | xargs -0 dos2unix > git ls-files -z '*.bat' | xargs -0 unix2dos This "cure" is not recommended: no one can guarantee that no files in the Emacs repository except *.bat should have DOS EOL format. IOW, the above might be a lossy conversion, and could silently corrupt some files. Don't do that. > Is this a bug in Emacs' build scripts, autoreconf, or just an > inconvenience of using the latest builds? Notably, my previous Emacs > 30.0.50 build from December 2023 did not have these issues. This is likely due to how you configured Git on your Windows system. It should be configured not to perform any conversions of the end-of-line format, neither when checking out files nor when checking them in. This can be either determined when you install Git for Windows (the installation program asks you about that), or it can be set up later with the following Git command git config --global core.autocrlf false Since you already have this problem, the best alternative for you is delete the entire Emacs repository, then run the above command, and then clone the repository anew, which will now be free from this breakage. (I don't know why it worked for you previously. Maybe you migrated to another machine and installed Git anew, or maybe you upgraded Git and the upgrade somehow changed this setting. Or something else to that effect.) This is not a bug in Emacs.