unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Taylan Ulrich \"Bayırlı/Kammer\"" <taylanbayirli@gmail.com>
Cc: 22354-done@debbugs.gnu.org
Subject: bug#22354: Test failure when running distcheck from out-of-tree build
Date: Wed, 13 Jan 2016 11:13:05 +0100	[thread overview]
Message-ID: <871t9l949a.fsf@gnu.org> (raw)
In-Reply-To: <87io2xvooo.fsf@T420.taylan> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Wed, 13 Jan 2016 10:00:55 +0100")

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

>>>>> ./configure: ./config.status: /home/taylan/src/guix/build/guix-0.9.1/_build/sub/test-tmp/store/d41iyl2gyk0r: bad interpreter: No such file or directory

[...]

>>> Hmm, that commit didn't fix the issue.
>>
>> You mean it doesn’t error out directly upon ‘make check’?  Could you
>> run “grep length …/_build/config.log”?
>
> Yes, it still goes through the tests and fails at guix-environment.sh
> with the same error.  I repeated all steps from a new clone of master.
>
> taylan@T420:~/src/guix/build$ grep length guix-0.9.1/_build/sub/config.log
> configure:6946: checking the length of the installed socket file name
> configure:6969: checking the length of the socket file name used in tests
> configure:6980: checking the length of a typical hash bang line
> configure:6992: checking the length of a hash bang line used in tests
> ac_cv_guix_hash_bang_length=73
> ac_cv_guix_socket_file_name_length=74
> ac_cv_guix_test_hash_bang_length=127
> ac_cv_guix_test_socket_file_name_length=90

Arff, I see.  I’ve change LINUX_HASH_BANG_LIMIT in guix.m4 to 127
instead of 128 to account for the trailing zero.

This time it should detect the problem early.

>>> Only the error message is broken.
>>
>> Would be interesting to see which is the piece of software that has an
>> even lower limit here.
>
> For what it's worth, I confirmed that on my system (Debian 8), using
> /bin/bash (in case it should be relevant):
>
> - the hash bang limit of a called script is 127 characters, and
>
> - when I pass the limit, I get an error message where the path is
>   truncated to 77 characters.

The “bad interpreter” message comes from Bash, in execute_cmd.c.

However, that file does this:

--8<---------------cut here---------------start------------->8---
  char sample[80];

[…]

#if defined (HAVE_HASH_BANG_EXEC)
	  READ_SAMPLE_BUF (command, sample, sample_len);
	  sample[sample_len - 1] = '\0';
	  if (sample_len > 2 && sample[0] == '#' && sample[1] == '!')
	    {
	      char *interp;
	      int ilen;

	      interp = getinterp (sample, sample_len, (int *)NULL);
--8<---------------cut here---------------end--------------->8---

where READ_SAMPLE_BUF is:

--8<---------------cut here---------------start------------->8---
#define READ_SAMPLE_BUF(file, buf, len) \
  do \
    { \
      fd = open(file, O_RDONLY); \
      if (fd >= 0) \
	{ \
	  len = read (fd, buf, 80); \
	  close (fd); \
	} \
      else \
	len = -1; \
    } \
  while (0)
--8<---------------cut here---------------end--------------->8---

Now we know.  :-)

Ludo’.

  reply	other threads:[~2016-01-13 10:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12  9:14 bug#22354: Test failure when running distcheck from out-of-tree build Taylan Ulrich Bayırlı/Kammer
2016-01-12 16:51 ` Ludovic Courtès
2016-01-12 19:40   ` Taylan Ulrich Bayırlı/Kammer
2016-01-12 20:54     ` Ludovic Courtès
2016-01-13  9:00       ` Taylan Ulrich Bayırlı/Kammer
2016-01-13 10:13         ` Ludovic Courtès [this message]
2016-01-13 10:42           ` Taylan Ulrich Bayırlı/Kammer
2016-01-13 10:25 ` bug#22354: Hash-bang line length Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871t9l949a.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=22354-done@debbugs.gnu.org \
    --cc=taylanbayirli@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).