WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline StefanSch

  • Newbie
  • *
  • Posts: 13
How to find minimal dependencies?
« on: May 23, 2014, 01:10:56 PM »
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, 01:27:39 PM »
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, 01:32:05 PM by gerald_clark »

Offline StefanSch

  • Newbie
  • *
  • Posts: 13
Re: How to find minimal dependencies?
« Reply #2 on: May 23, 2014, 01:56:33 PM »
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, 02:07:26 PM »
Generally, The dep file only lists required dependencies.
Optional modules are usually documented in the info file.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: How to find minimal dependencies?
« Reply #4 on: May 24, 2014, 05: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

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