public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikpe at it dot uu.se" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libffi/52223] New: [4.5,4.6,4.7 regression] libffi's man page install breaks with multilibs and overridden mandir
Date: Mon, 13 Feb 2012 00:09:00 -0000	[thread overview]
Message-ID: <bug-52223-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52223

             Bug #: 52223
           Summary: [4.5,4.6,4.7 regression] libffi's man page install
                    breaks with multilibs and overridden mandir
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libffi
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mikpe@it.uu.se


libffi installs three man pages during 'make install'.  If
a) the target has multilibs enabled, and
b) the configure-time --mandir= is overridden by make install with mandir=,
then libffi's man page install step in its multilib subdirs will ignore the
overridden mandir and use the configure-time mandir instead, which may clobber
an unexpected destination, or may cause the entire install to fail if that
destination isn't currently writable by the user.

The problem reproduces easily on x86_64-linux:
/path/to/gcc-4.7/configure --prefix=/usr --mandir=/usr/share/man
--enable-languages=c,c++,java --enable-multilib
make
# the following must be done as a regular user with no write access to
# /usr/share/man
make prefix=/tmp/buildroot/usr mandir=/tmp/buildroot/usr/share/man install
...
Making install in man
make[5]: Entering directory
`/tmp/objdir/x86_64-unknown-linux-gnu/32/libffi/man'
make[6]: Entering directory
`/tmp/objdir/x86_64-unknown-linux-gnu/32/libffi/man'
make[6]: Nothing to be done for `install-exec-am'.
test -z "/usr/share/man/man3" || /bin/mkdir -p "/usr/share/man/man3"
 /usr/bin/install -c -m 644 /tmp/gcc-4.7-20120211/libffi/man/ffi.3
/tmp/gcc-4.7-20120211/libffi/man/ffi_call.3
/tmp/gcc-4.7-20120211/libffi/man/ffi_prep_cif.3 '/usr/share/man/man3'
/usr/bin/install: cannot create regular file `/usr/share/man/man3/ffi.3':
Permission denied
/usr/bin/install: cannot create regular file `/usr/share/man/man3/ffi_call.3':
Permission denied
/usr/bin/install: cannot create regular file
`/usr/share/man/man3/ffi_prep_cif.3': Permission denied
make[6]: *** [install-man3] Error 1
make[6]: Leaving directory `/tmp/objdir/x86_64-unknown-linux-gnu/32/libffi/man'
make[5]: *** [install-am] Error 2
make[5]: Leaving directory `/tmp/objdir/x86_64-unknown-linux-gnu/32/libffi/man'
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory `/tmp/objdir/x86_64-unknown-linux-gnu/32/libffi'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/tmp/objdir/x86_64-unknown-linux-gnu/libffi'
make[2]: *** [install-multi] Error 2
make[2]: Leaving directory `/tmp/objdir/x86_64-unknown-linux-gnu/libffi'
make[1]: *** [install-target-libffi] Error 2
make[1]: Leaving directory `/tmp/objdir'
make: *** [install] Error 2

If multilibs are disabled then the man-page install step does use the
overridden mandir=, but that clearly isn't a solution when multilibs are
essential.  I currently work around it by patching libffi's makefiles to delete
"man" from "SUBDIRS".

The problem is present in 4.5, 4.6, and 4.7, for (at least) x86_64-linux and
m68k-linux.  4.4 did not have those man pages or this problem.

The build procedure (configure with --prefix= and --mandir= pointing to system
directories, but make install with prefix= and mandir= pointing to a local
staging area) is taken verbatim from Fedora's gcc src rpm, so I'm assuming it's
something that should work.


             reply	other threads:[~2012-02-13  0:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13  0:09 mikpe at it dot uu.se [this message]
2012-02-13 11:17 ` [Bug libffi/52223] [4.5/4.6/4.7 Regression] " rguenth at gcc dot gnu.org
2012-02-13 14:07 ` mikpe at it dot uu.se
2012-02-13 16:50 ` joseph at codesourcery dot com
2012-02-13 19:15 ` mikpe at it dot uu.se
2012-02-19 11:10 ` mikpe at it dot uu.se
2012-02-22 15:07 ` jakub at gcc dot gnu.org
2012-02-23 13:00 ` mikpe at it dot uu.se
2012-02-27 10:01 ` jakub at gcc dot gnu.org
2012-02-27 10:07 ` [Bug libffi/52223] [4.5/4.6 " jakub at gcc dot gnu.org
2012-06-20 13:16 ` rguenth at gcc dot gnu.org
2012-06-20 13:17 ` rguenth at gcc dot gnu.org
2012-06-20 13:17 ` rguenth at gcc dot gnu.org

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=bug-52223-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).