ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As the subject says, I have a few questions about how to create the smallest possible module of GTK (meaning GTK1 and GTK2 together) for the Live distribution SLAX. The module would be used to run programs such as gnumeric, gimp, abiword, firefox, etc. My questions are realted to slax, of course, bue also about what happens to file sizes when you compile for different architcturs
Here's my situation: I want to be able to run slax with custom-made modules on a 220 MB CD and putting as much as i can on it. I've already worked on the core and X modules, took off all the stuff I didn't want and made sure they still worked. I've also compiled almost all the software I want on the CD from source. (using checkinstall in combination with tgz2mo) Now i'm on to the reducing part, where I take out all the stuff I don't need.
I've tried just putting all my modules onto the CD and they all worked fine, the only problem was that I needed a 700 MB CD (thus the reducing part)
One of my freinds, who had similar ideas, gave me his GTK module as an example of what he did to reduce it. When I looked at it all there was were the /etc (containing GTK's config files) and /usr/lib directories. The total size of the 2 directories was 5.8 MB. When I tired to imitate him by taking out all except /etc and /usr/lib in my modules of GTK and GTK2, the total was 17 MB, and I recheked to make sure that there weren't any additional files that were in my GTK but not in his, and it still was 17 MB. So I started asking myself why the big difference in size ?
First thing that was apparent was the version numbers. his module contained GTK2.4.1, mine was 2.10.x (can't remember the last digit) but even if mine was drastically much more newer than his, it didn't quite seem to explain the difference in size
The other thing was how we created the modules. I compiled mine from source while he just took a bunch of tgz's and deb's and put them together. But then again, didn't satisfy me.
Third thing was how I compiled them. I compiled all my modules for the i386 artitechture (main reason was compatibility, and also to make sure that It would run on another really old computer that I've got in my room).
When I realised that I went and compared individual file sizes in both modules, and in most cases, My files were bigger than his. I also saw that the largest ones were the ELF executables. Then It clicked: maybe, since I compiled all the modules for i386, it somehow made the ELF files bigger. But I wasn't sure at all, this was just a hypothesis.
That's why I'm here, I've got a few main questions relating to all of this
1. Are their certain directories/files (like the documentation and var) that can be easily taken out to reduce size ? and, generally, which ones ?
2.Is the newer version of GTK that I compiled the reason for the bigger file size ?
3. Does compiling for i386 change the size of idividual files ?
I'm still a relatively new guy in linux, so that's why I came here to see if anyone around had any suggestions or answers to my questions.
I'd really appreciate the insight you can provide on this and thank you in advance !
Gzou.
P.S. : here's the list of the files in the lib directory and their size:
Using 2.10 will make a very large difference. Google for Project Ridley and you'll see why. 2.10 was the first release which incorporated Project Ridley. Basically, Project Ridley is an attempt to consolidate a bunch of, previously external, libraries which should probably be in GTK+ into GTK+. So you not only got the added features/enhancements of GTK+, but a whole whack load of other libraries' code added to it. Definitely remove debugging symbols, optimize for size (-Os as above), and make use of strip to strip all the unnecessary symbols.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.