https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119281

            Bug ID: 119281
           Summary: libgcobol install fails when
                    --enable-version-specific-runtime-libs
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

I get a weird error installing with --enable-version-specific-runtime-libs

> make install DESTDIR=/tmp/install
...
make[6]: Leaving directory '/tmp/obj/x86_64-pc-linux-gnu/32/libgcobol'
make[5]: Leaving directory '/tmp/obj/x86_64-pc-linux-gnu/32/libgcobol'
make[4]: Leaving directory '/tmp/obj/x86_64-pc-linux-gnu/libgcobol'
 /usr/bin/mkdir -p '/tmp/install/usr/local/lib64/gcc/x86_64-pc-linux-gnu/'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libgcobol.la
'/tmp/install/usr/local/lib64/gcc/x86_64-pc-linux-gnu/'
libtool: install: error: cannot install `libgcobol.la' to a directory not
ending in /usr/local/lib64/gcc/x86_64-pc-linux-gnu/
make[3]: *** [Makefile:540: install-toolexeclibLTLIBRARIES] Error 1
make[3]: Leaving directory '/tmp/obj/x86_64-pc-linux-gnu/libgcobol'
make[2]: *** [Makefile:856: install-am] Error 2
make[2]: Leaving directory '/tmp/obj/x86_64-pc-linux-gnu/libgcobol'
make[1]: *** [Makefile:18349: install-target-libgcobol] Error 2
make[1]: Leaving directory '/tmp/obj'
make: *** [Makefile:2671: install] Error 2

this is the following part of libtool:

        if test -n "$relink_command"; then
          # Determine the prefix the user has applied to our future dir.
          inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`

          # Don't allow the user to place us outside of our expected
          # location b/c this prevents finding dependent libraries that
          # are installed to the same prefix.
          # At present, this check doesn't affect windows .dll's that
          # are installed into $libdir/../bin (currently, that works fine)
          # but it's something to keep an eye on.
          test "$inst_prefix_dir" = "$destdir" && \
            func_fatal_error "error: cannot install \`$file' to a directory not
ending in $libdir"

We have

$destdir == /tmp/install/usr/local/lib64/gcc/x86_64-pc-linux-gnu
$libdir == /usr/local/lib64/gcc/x86_64-pc-linux-gnu/

so there's a trailing slash mismatch for some unknown reason that I didn't
manage to track down.

Reply via email to