GNU MP 6.1.2 error undefined symbol __gmpn_invert_limb in test t-constants

Niels Möller nisse at
Mon Aug 28 21:33:03 UTC 2017

Vincent Lefevre <vincent at> writes:

> This only works if the user is root. If a non-root user wants to
> install libraries in his home directory, the right solution is to
> use LD_LIBRARY_PATH (since GCC doesn't use a run path by default).

You'd either use LD_LIBRARY_PATH, which is going to be a bit brittle
when a build system or other script depends on using LD_LIBRARY_PATH for
its own purposes, or compile the stuff needing the libraries with
something like.

  LDFLAGS='-L $HOME/lib/ -Wl,-rpath,$HOME/lib'

Neither option is entirely painless, unfortunately.

In this particular case, it might work better if automake's test binary
magic did use LD_LIBRARY_PATH and *pre*pended the .lib directory, but I
guess it does things differently, either using -rpath or *a*ppending

I guess that the case of LD_LIBRARY_PATH pointing out a different
version of the libraries under test is broken/unsupported, or at least
isn't supported with the Solaris runtime linker.

(I should probably not speculate more on exactly how it fails, but I'd
be happy to hear the precise explanation if someone here really knows
the automake magic involved).


Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.

More information about the gmp-bugs mailing list