public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Anthony Foiani <anthony.foiani@gmail.com>
To: crossgcc@sourceware.org,
	"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Subject: [PATCH] fix problem with "install" call in populate script
Date: Fri, 27 Apr 2012 02:08:00 -0000	[thread overview]
Message-ID: <CAOhNY--33YVHQn5Z9os6ZaOESWG2-vNR=-=Yu-nQE7rAa-e7cQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

Greetings all --

Due to the usual cascade of requirements and bugs, I had to upgrade my
toolchain to gcc-4.6.3, so I updated my ct-ng to latest hg head.  (I
tried the 1.14.1 release, but that didn't have the 4.6.3 stuff in it).

When I ran though my old scripts for building my ramdisk, I got new errors:

/opt/cross/platforms/foo/xtools/bin/powerpc-e300c3-linux-gnu-populate:
line 208: /usr/bin/install -c: No such file or directory
readelf: Error: 'lib/libpthread.so.0': No such file

Adding verbosity didn't help.  It turns out that autoconf found
"/usr/bin/install -c" to be the correct install tool.  When populate
tries to call it, however, it keeps it in double-quotes, and the shell
tries to interpret the whole string as a command name:

  # this is the value returned by autoconf and stored in CT_install
  $ ins="/usr/bin/install -c"

  # if we call it with quotes, the command is not found
  $ "${ins}"
  bash: /usr/bin/install -c: No such file or directory

  # removing the quotes lets it work as expected
  $ ${ins}
  /usr/bin/install: missing file operand
  Try `/usr/bin/install --help' for more information.

The fix is easy: just remove the quotes around the use of ${install}.

Patch attached.

Thanks,
t.

[-- Attachment #2: ctng-fix_populate_install.patch --]
[-- Type: application/octet-stream, Size: 1507 bytes --]

# HG changeset patch
# User Anthony Foiani <anthony.foiani@gmail.com>
# Date 1335491759 21600
# Node ID 7ea324ba49881cef5305ed977e2dd8849cecf793
# Parent  c7fa97debb36bcea78a28a639d1ae569997cc6f2
Allow multi-word "install" command.

Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c".  When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:

  # this is the value returned by autoconf and stored in CT_install
  $ ins="/usr/bin/install -c"

  # if we call it with quotes, the command is not found
  $ "${ins}"
  bash: /usr/bin/install -c: No such file or directory

  # removing the quotes lets it work as expected
  $ ${ins}
  /usr/bin/install: missing file operand
  Try `/usr/bin/install --help' for more information.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>

diff -r c7fa97debb36 -r 7ea324ba4988 scripts/populate.in
--- a/scripts/populate.in	Mon Apr 02 19:50:22 2012 +0200
+++ b/scripts/populate.in	Thu Apr 26 19:55:59 2012 -0600
@@ -205,7 +205,7 @@
                 *)      mode=0644;;
             esac
             ${CT_PRINTF} "      installing as '%s/%s', mode='%s'\n" "${dir}" "${true_libname}" "${mode}"
-            "${install}" -m "${mode}" "${libfile}" "${dir}/${true_libname}"
+            ${install} -m "${mode}" "${libfile}" "${dir}/${true_libname}"
             do_resolve_deps "${dir}/${true_libname}"
             return 0
         fi

[-- Attachment #3: Type: text/plain, Size: 71 bytes --]

--
For unsubscribe information see http://sourceware.org/lists.html#faq

             reply	other threads:[~2012-04-27  2:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27  2:08 Anthony Foiani [this message]
2012-04-30 11:57 ` Yann E. MORIN

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

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

  git send-email \
    --in-reply-to='CAOhNY--33YVHQn5Z9os6ZaOESWG2-vNR=-=Yu-nQE7rAa-e7cQ@mail.gmail.com' \
    --to=anthony.foiani@gmail.com \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@anciens.enib.fr \
    /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.
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).