[m-users.] Installed library not found

Volker Wysk post at volker-wysk.de
Tue Sep 13 21:47:59 AEST 2022


Am Dienstag, dem 13.09.2022 um 21:28 +1000 schrieb Zoltan Somogyi:
> 2022-09-13 20:48 GMT+10:00 "Volker Wysk" <post at volker-wysk.de>:
> > desktop ~/src/tt $ ./tt
> > ./tt: error while loading shared libraries: libposix.so: cannot open shared
> > object file: No such file or directory
> > 
> > The installed library is here:
> > 
> > /usr/local/lib/mercury-srcdist-rotd-2022-09-
> > 07/lib/mercury/lib/asm_fast.par.gc.stseg/libposix.so
> > 
> > When I put the above path (the directory part of it) in the LD_LIBRARY_PATH
> > variable, the program starts okay.
> 
> What you have is a mismatch between
> 
> - where the installed shared object is, and
> - where the system looks for it.
> 
> You can fix this either
> 
> - by putting the shared object where the system expects it, or
> - by telling to system to expect it where it is.
> 
> You did the latter by including that directory in LD_LIBRARY_PATH.
> You can also do it by installing the shared object into a directory
> that is already in your LD_LIBRARY_PATH. Section 6.2.1 of the
> user guide will tell you how.

I've installed the library the standard way, "mmc -j8 --make
libposix.install". I think this should work out of the box, if possible.

The problem is, that the grade is part of the install path:
/usr/local/lib/mercury-.../lib/asm_fast.par.gc.stseg/libposix.so

The Posix library in question got installed in only one grade
(asm_fast.par.gc.stseg), and I'm not sure why. If it were installed in
several grades, the dynamic linker would need to be told somehow, which
grade (hence, which directory) to look in. It would (right?) not be possible
to add all grades to the LD_LIBRARY_PATH variable, because the differently
compiled .so files, which have the same file name, would come into conflict
with each other, wouldn't they?

If I installed a library in some already existing place, I would get the
problem with the different grades again.

Bye, Volker


More information about the users mailing list