Tiny Core Linux

Tiny Core Extensions => TCE Tips & Tricks => Topic started by: StefanSch on May 23, 2014, 10:10:56 AM

Title: How to find minimal dependencies?
Post by: StefanSch 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
Title: Re: How to find minimal dependencies?
Post by: gerald_clark 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.
Title: Re: How to find minimal dependencies?
Post by: StefanSch 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.

Title: Re: How to find minimal dependencies?
Post by: gerald_clark 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.
Title: Re: How to find minimal dependencies?
Post by: curaga 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.
Title: Re: How to find minimal dependencies?
Post by: StefanSch on May 24, 2014, 03:02:14 PM
Thanks, curaga,
I will do that.