public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libffi/52223] New: [4.5,4.6,4.7 regression] libffi's man page install breaks with multilibs and overridden mandir
@ 2012-02-13  0:09 mikpe at it dot uu.se
  2012-02-13 11:17 ` [Bug libffi/52223] [4.5/4.6/4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: mikpe at it dot uu.se @ 2012-02-13  0:09 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-06-20 13:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13  0:09 [Bug libffi/52223] New: [4.5,4.6,4.7 regression] libffi's man page install breaks with multilibs and overridden mandir mikpe at it dot uu.se
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

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).