WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1509
how to help linker find just-installed library?
« on: September 16, 2019, 02:03:54 PM »
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, 02:09:12 PM by GNUser »

Offline Rich

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

Offline Rich

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

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1509
Re: how to help linker find just-installed library?
« Reply #3 on: September 16, 2019, 02:20:39 PM »
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: 11619
Re: how to help linker find just-installed library?
« Reply #4 on: September 16, 2019, 02:29:46 PM »
Hi GNUser
Thank you, Rich. You're the best. ...
Maybe second best, I have to correct myself again:
Code: [Select]
sudo ldconfig

Offline GNUser

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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: how to help linker find just-installed library?
« Reply #6 on: September 17, 2019, 03: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: 11619
Re: how to help linker find just-installed library?
« Reply #7 on: September 17, 2019, 09: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

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1509
Re: how to help linker find just-installed library?
« Reply #8 on: September 17, 2019, 09: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!