WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to help linker find just-installed library?  (Read 5157 times)

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
how to help linker find just-installed library?
« on: September 16, 2019, 11:03:54 AM »
Sometimes I notice that installing a missing library extension on a running system seems to have no effect: tce-status -i says the library is installed, I can see it listed in /usr/local/lib, but the application that was complaining about that missing library continues to complain. Adding the library to onboot.lst and rebooting makes the problem go away. (This comes up when checking for a new extension's dependencies; having to reboot after adding each missing library gets tiresome.)

Does ld's cache need to be refreshed when a library extension is installed on a system sometime after boot? If so, what's the recommended way to do it?
« Last Edit: September 16, 2019, 11:09:12 AM by GNUser »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: how to help linker find just-installed library?
« Reply #1 on: September 16, 2019, 11:17:00 AM »
Hi GNUser
Try:
Code: [Select]
ldconf

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: how to help linker find just-installed library?
« Reply #2 on: September 16, 2019, 11:19:02 AM »
Hi GNUser
Sorry, that's:
Code: [Select]
ldconfig

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
Re: how to help linker find just-installed library?
« Reply #3 on: September 16, 2019, 11:20:39 AM »
Thank you, Rich. You're the best.

Next time it happens I'll try that and will report back.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: how to help linker find just-installed library?
« Reply #4 on: September 16, 2019, 11:29:46 AM »
Hi GNUser
Thank you, Rich. You're the best. ...
Maybe second best, I have to correct myself again:
Code: [Select]
sudo ldconfig

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
Re: how to help linker find just-installed library?
« Reply #5 on: September 16, 2019, 11:30:54 AM »
Even if second best, still one of the most helpful guys around. Thanks again.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10961
Re: how to help linker find just-installed library?
« Reply #6 on: September 17, 2019, 12:15:39 AM »
tce-load runs ldconfig though, so I wonder what's happening.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: how to help linker find just-installed library?
« Reply #7 on: September 17, 2019, 06:42:07 AM »
Hi GNUser
... but the application that was complaining about that missing library continues to complain. Adding the library to onboot.lst and rebooting makes the problem go away. (This comes up when checking for a new extension's dependencies; having to reboot after adding each missing library gets tiresome.) ...
Something is off here. An extension won't load if something listed in its  .dep  file can't be found. Upon rereading you your original
post, it sounds like you might be creating an extension and the  .dep  file does not exist yet. By the way, dependencies should not
be listed in  onboot.lst.  To find the missing libraries an executable requires, do this:
Code: [Select]
ldd Path/To/Executable | grep -i foundThen using the  Apps  utility, click on the  Search  button and change it to  Provides.  Type the name of the missing library in the field
to the right of the  provides  button and hit enter. If the library is available the extension(s) providing it will show up. You can then
change the  OnBoot  button to  Download + Load  and load the extension without it being added to  onboot.lst.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
Re: how to help linker find just-installed library?
« Reply #8 on: September 17, 2019, 06:49:29 AM »
When I bumped into this issue I was still building the .dep file. I will pay more attention next time if/when it happens. Thanks!