GNU bug report logs - #69590
30.0.50; Build scripts break due to DOS-style line endings

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "Divvy Cr." <divvycr@HIDDEN>; Keywords: notabug; dated Wed, 6 Mar 2024 18:42:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) notabug. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 69590 <at> debbugs.gnu.org:


Received: (at 69590) by debbugs.gnu.org; 6 Mar 2024 19:36:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 06 14:36:58 2024
Received: from localhost ([127.0.0.1]:51481 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rhx4Q-00080O-SN
	for submit <at> debbugs.gnu.org; Wed, 06 Mar 2024 14:36:58 -0500
Received: from eggs.gnu.org ([209.51.188.92]:36240)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1rhx4M-000804-2G; Wed, 06 Mar 2024 14:36:53 -0500
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 <eliz@HIDDEN>)
 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==;
Date: Wed, 06 Mar 2024 21:36:05 +0200
Message-Id: <86ttljjgpm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "Divvy Cr." <divvycr@HIDDEN>
In-Reply-To: <CADmOxiLhjkm2NR1-xGYtq+E=gGD+uVCM8KD0oWAmmiDCHm5Kbg@HIDDEN>
 (divvycr@HIDDEN)
Subject: Re: bug#69590: 30.0.50;
 Build scripts break due to DOS-style line endings
References: <CADmOxiLhjkm2NR1-xGYtq+E=gGD+uVCM8KD0oWAmmiDCHm5Kbg@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69590
Cc: 69590 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

tags 69590 notabug
thanks

> From: "Divvy Cr." <divvycr@HIDDEN>
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69590; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Mar 2024 18:41:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 06 13:41:25 2024
Received: from localhost ([127.0.0.1]:51432 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rhwCh-0006Xg-Oi
	for submit <at> debbugs.gnu.org; Wed, 06 Mar 2024 13:41:25 -0500
Received: from lists.gnu.org ([209.51.188.17]:44974)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <divvycr@HIDDEN>) id 1rhw2N-0006Ic-Mc
 for submit <at> debbugs.gnu.org; Wed, 06 Mar 2024 13:30:45 -0500
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 <divvycr@HIDDEN>) id 1rhvzh-0001ND-Bj
 for bug-gnu-emacs@HIDDEN; Wed, 06 Mar 2024 13:27:57 -0500
Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <divvycr@HIDDEN>) id 1rhvze-0002yY-FV
 for bug-gnu-emacs@HIDDEN; Wed, 06 Mar 2024 13:27:57 -0500
Received: by mail-yb1-xb32.google.com with SMTP id
 3f1490d57ef6-dc34d761e2aso1578702276.1
 for <bug-gnu-emacs@HIDDEN>; Wed, 06 Mar 2024 10:27:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1709749673; x=1710354473; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=I5tzkJHsLtISVYeE/hVEs8rn+o5xwoQpJNKqoPsHR84=;
 b=CBSOJT7nNDcd2wcw/ZsahqBFnzAi5CElu84pUT+UJj+ha+hue7eKIOxV9axEjy39x+
 5gcjgcAKl413vlx2N/pqZYVS7l8uhhx3Z9wVcp3FZKW7AK5GLgzqRL5DdMj9KoWswuOM
 ngj+vMB+j6wbGWfpIxkOTV5y+1SkvIwVkRGW18zgL18IrSaC1EKAEmq1mtDkAZ0eydG6
 Masx5eAs6/TqyzFfPcV4U7S58VqzleAx6iyCApOry9auC12AWweI7ZAmrbUfGfOuFx3G
 oqCbMBvEwhhUgtexs0841OAExERGr7QIhvgTEYyOyFyA+z0Wdji5hSaH4MFh0mQiNKmS
 jqEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1709749673; x=1710354473;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=I5tzkJHsLtISVYeE/hVEs8rn+o5xwoQpJNKqoPsHR84=;
 b=Be2CGyAJ3yMCa0+uDzJ5crGxQlSkyNX+6Z/CnujYQPpu5zK9fCrDW+T3dxEJzOURwZ
 017ayom7buxOVo/dI3tklAhZv0K2HZb162QhHZbeT1sjO4KEQzCHxuc3AbBCILnOmP7v
 +WZ8xRqb/rlJfhOEQPBkQvNQ6PawGfK0lbAmXx6jVAiYB3zJ98NT5dpLcLA2Pwt6ASsp
 zKFGhW7k4c+3YZ08qZ5lFs01hgaejx/yd2gVpOuJQ2DCxVgMR3Pk446zGzEMp0g6HsHF
 gRmqcwPsgliSalXAJISr5WoqojCzeldPRVe8ZNF7q+eWCmkyZbj7jnrhPkDJ/4SPyqa+
 iRVA==
X-Gm-Message-State: AOJu0Yw1wV/1tS4ojCOWgoMa//jObptzT0ekoyhAgIUEO1DwgY2ABVzt
 pqzplCKVX59Fxab4Ghwd6FB1A5uk2rP1ekqDnc4Z7OkeO85RBQ+7w/+4U5R6VNAA+P9bdMMRmwu
 s+ks5PrBWSLrKZ1cMmM4QEH/dsPDqr7WsfAEDSQ==
X-Google-Smtp-Source: AGHT+IFYWN//Efc9Bqq9CSsiOpBZD0I1GYEyqR0KbWXFbkBFRCjJp8iv+ujDSnVymTsrQ47r6vteaBdEA+0wvAmc8/M=
X-Received: by 2002:a25:df15:0:b0:dcc:2da:e43d with SMTP id
 w21-20020a25df15000000b00dcc02dae43dmr63482ybg.4.1709749672791; Wed, 06 Mar
 2024 10:27:52 -0800 (PST)
MIME-Version: 1.0
From: "Divvy Cr." <divvycr@HIDDEN>
Date: Wed, 6 Mar 2024 18:27:41 +0000
Message-ID: <CADmOxiLhjkm2NR1-xGYtq+E=gGD+uVCM8KD0oWAmmiDCHm5Kbg@HIDDEN>
Subject: 30.0.50; Build scripts break due to DOS-style line endings
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2607:f8b0:4864:20::b32;
 envelope-from=divvycr@HIDDEN; helo=mail-yb1-xb32.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 06 Mar 2024 13:41:22 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

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

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.




Acknowledgement sent to "Divvy Cr." <divvycr@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#69590; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 6 Mar 2024 19:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.