WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to find minimal dependencies?  (Read 2012 times)

Offline StefanSch

  • WikiUser
  • *
  • Posts: 13
How to find minimal dependencies?
« on: May 23, 2014, 10:10:56 AM »
Hi forum,

I am working on a GUI kiosk application with QT and it already works and I am pretty happy with it.
One thing bothers me, though. Through the *.dep-dependencies I am pulling in (in total) 71 tcz files.
I am pretty convinced that I don't need all of them although they are listed as dependencies. E.g. I need
no sound, so all the libs for sound support are useless to me.

Is there a way to figure out smartly the "real" dependencies, i.e. the libraries/packages without which my
program wouldn't run? Is there a kind of flag or access bit that I can check to see that e.g. libpci or libmng are
actually not really needed for my application?

Thanks
Stefan

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to find minimal dependencies?
« Reply #1 on: May 23, 2014, 10:27:39 AM »
If a program  is compiled to load a library, and that library is missing, the program will fail to run.
A library  is only optional if the program is compiled to dynamically load it according to configuration settings, and is also written to gracefully handle its absence.

You can play around with the dep files, but be prepared for applications or deps with modified dep files to fail to run or be unstable.

Also, don't come here for support if you have problems after modifying dep files to try to eliminate what you think are unnecessary features.
We have no way to troubleshoot programs that have been modified.
« Last Edit: May 23, 2014, 10:32:05 AM by gerald_clark »

Offline StefanSch

  • WikiUser
  • *
  • Posts: 13
Re: How to find minimal dependencies?
« Reply #2 on: May 23, 2014, 10:56:33 AM »
Hi Gerald,

thank you for the amazingly fast feedback.

I read your answer to be essentially: I have to use trial and error to see which libs are really used.

My question was: Is there a way to determine if a dependency is optional or required other than trying
to remove the dependency and see if it fails?

Also, I am not going to bother anyone with debugging help non-standard modifications.


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to find minimal dependencies?
« Reply #3 on: May 23, 2014, 11:07:26 AM »
Generally, The dep file only lists required dependencies.
Optional modules are usually documented in the info file.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9879
Re: How to find minimal dependencies?
« Reply #4 on: May 24, 2014, 02:52:21 AM »
In the specific case of Qt, only its video libs would require gstreamer, and if your app does not use the Qt video functions nor link the lib, you should be able to get away with removing gstreamer from qt's dep file. Likewise for some other parts - check what Qt libs your app is linked against and what they require with ldd.
The only barriers that can stop you are the ones you create yourself.

Offline StefanSch

  • WikiUser
  • *
  • Posts: 13
Re: How to find minimal dependencies?
« Reply #5 on: May 24, 2014, 03:02:14 PM »
Thanks, curaga,
I will do that.