'make check' fails if there is a space in the filename

Vincent Lefevre vincent at vinc17.net
Fri Nov 13 15:47:34 UTC 2015

On 2015-11-13 08:40:23 +0100, Marc Glisse wrote:
> On Fri, 13 Nov 2015, Marc Glisse wrote:
> >On Fri, 13 Nov 2015, Marco Bodrato wrote:
> >>Uhmm... but I tried with mpfr-3.1.3 and "make check" worked with no
> >>errors... did you use some trick for that or it depends on directory
> >>structure or something alike?
> >
> >But then make install fails. The reason make check passes for mpfr and not
> >gmp is that tests/libfrtests is not linked with libmpfr (is that on
> >purpose? It is linked with gmp...).
> Hmm, linking libfrtests with libmpfr.la does not seem sufficient to make it
> fail...

On my Debian/unstable machine, MPFR's "make check" fails when the
directory contains a space. I get errors:

  error while loading shared libraries: libmpfr.so.6: cannot open shared object file: No such file or directory

The problem is that for the generated RPATH (where libmpfr.so.6 should
be found), the space is replaced by a ":". Instead of having

  /path/to/foo bar/src/.libs

I have:


because for linking, libtool runs something like:

  gcc [...] ../src/.libs/libmpfr.so -lgmp -Wl,-rpath -Wl,/path/to/foo -Wl,-rpath -Wl,bar/src/.libs

In libtool, something like

          if test "$linkmode" = lib; then
            searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
            searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"

is incorrect. There are also issues with the libdirs variable.

Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

More information about the gmp-bugs mailing list