GNU bug report logs - #45518
Ctrl-G Fails to Interrupt Hung Tramp Remote-Compile in Emacs 27.1

Previous Next

Package: emacs;

Reported by: Duncan Greatwood <dgbulk <at> gmail.com>

Date: Tue, 29 Dec 2020 02:45:02 UTC

Severity: normal

Fixed in version 28.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Duncan Greatwood <dgbulk <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 45518 <at> debbugs.gnu.org
Subject: bug#45518: Ctrl-G Fails to Interrupt Hung Tramp Remote-Compile in Emacs 27.1
Date: Wed, 6 Jan 2021 14:54:39 -0800
[Message part 1 (text/plain, inline)]
Michael -

On Wed, Jan 6, 2021 at 5:37 AM Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Duncan Greatwood <dgbulk <at> gmail.com> writes:
>
> Hi Duncan,
>
> > I would suggest that you take a favorite large C++ autotools project,
> > add test.cpp to the source tree and Makefile.am, and see if the hang
> > reproduces for you.
>
> I don't work with C++, so I haven't.
>
[DG] Oh, no worries. Let me try and give a more explicit recipe.

This is what I did:

Download the autotools "hello world" program, and modify it as follows.

Go to https://github.com/shanecelis/amhello (or *many* other places), and
download the "hello world" code (click Code button on the github page,
choose "Download zip" for simplicity).

Expand the zip file, and cd into amhello-master directory. This is on a
linux machine, an ubuntu machine in my case.

Open configure.ac in a text editor. You'll see a section headed:
    # Checks for programs.
We need to add AC_PROG_CXX and AM_PROG_AR, so this section will look like:
    # Checks for programs.

    AC_PROG_CC
    AC_PROG_CXX
    AM_PROG_AR
    AC_PROG_LIBTOOL
Save configure.ac, and exit the text editor.

Copy my test.cpp file into the src subdirectory of amhello-master.

Open src/Makefile.am in a text editor.
Added test.cpp to the sources line, so that line looks like:
    hello_SOURCES = main.c test.cpp
Save src/Makefile.am and exit the editor.

I presume you already have the autotools toolset installed, but if not,
install them.
    sudo apt-get install -y autotools-dev autoconf

Now at the shell command line (*not* in emacs) on the target linux machine,
in the amhello-master directory:
    autoreconf --install
    ./configure
    make

You should see the many syntax errors of test.cpp spewing out in the shell.

Now *in gui emacs*, from a mac machine using Tramp,
open amhello-master/src/test.cpp remotely (using tramp) on the remote linux
machine.
With that remote test.cpp open, In emacs, do
    M-compile
    Use the compile command: make -k

Tramp window hangs

As you noted prior, if you use compile command "gcc test.cpp", tramp does
not hang. Only if you use compile command "make" does it hang.

I was using my macbook laptop for the GUI-emacs-with-tramp, and ubuntu for
the target linux machine. I was using emacs 26.2 gui-mode, but no reason to
suppose it varies with other emacs versions.

I did try it with a Linux laptop, running emacs-gui (26.3) and tramp to
connect to the remote Linux host. However, in that case the issue did *not*
reproduce for me, at least using this method. Perhaps emacs/tramp must be
running from a mac for the issue to show up.

Hope this helps.
Thanks once more.
Duncan



>
> > For your reference, I am also pasting the output from the hung tramp
> > window when I added test.cpp to a library within one of my own larger
> > projects.
>
> I tried to mimic that, but it still just shows all errors, and no hung
> window. Tested with recent Tramp 2.5.0 and all Emacs versions 26, 27,
> 28. See appended compile output.
>
> > Regards,
> > D.
>
> Best regards, Michael.
[Message part 2 (text/html, inline)]

This bug report was last modified 239 days ago.

Previous Next


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