Mike Hearn wrote:
On Sun, 24 Jul 2005 07:27:41 -0500, aaron-XW8b5UTxoeLYtjvyW6yDsg wrote:
I'm making a new package right now. In the last email I sent you I was trying something like this, but I noticed it didn't make the package size any larger. Could that be because I didn't append version numbers to the library names in that line? How do I know when I need to do that?
OK, here's a useful bit of shell script I use:
function needed() { objdump -x $1 | grep NEEDED; }
Whack that in your ~/.bashrc or something, then you can find out what libraries a binary needs by running "needed `which .proxy.inkscape`", for instance. On my system this gives the following result:
Incidentally, it's curious that a proxy file is generated. Normally that's only done when there's a program with that name already in the PATH. But for me there wasn't. Hmm.
I don't have a .proxy.* file here.
Anyway. You can see here that the *mm libraries are dynamically linked. To statically link them, we firstly chop off the leading lib prefix, then drop the .so suffix and anything after that:
libgtkmm-2.4.so.1 -> gtkmm-2.4
We also need to make sure there's a .a file for everything we statically link:
[mike@...628... main]$ file /usr/lib/libgtkmm-2.4.a /usr/lib/libgtkmm-2.4.a: current ar archive
So we can statically link this by putting in gtkmm-2.4
Excellent tutorial, thank you. I'm almost not confused anymore. So what this all means is that the gtkmm-dev package in Ubuntu doesn't include the *.a files. I guess I need to build that myself then (using apbuild?). That being the case I won't have this package up in the next few hours for you to test. What else do you do when you test the package?
Anything else I should know?
Aaron Spike