Dear all, I am having lots of trouble to get the dependencies of inkscape sorted in a server, and was thinking of compiling it static in my machine and the just move the binary. Has anybody ever compiled a static binary of inkscape? I haven't seen any such options in the configure script, any help in this direction is welcome, Bruno
On Tue, Mar 03, 2009 at 08:37:48PM +0100, Bruno Contreras Moreira wrote:
I am having lots of trouble to get the dependencies of inkscape sorted in a server, and was thinking of compiling it static in my machine and the just move the binary. Has anybody ever compiled a static binary of inkscape? I haven't seen any such options in the configure script, any help in this direction is welcome,
Configure scripts for libraries (gtk, pango, cairo, ...) usually have --disable-shared / --disable-static options to control which types to install, but configure scripts for applications usually don't.
The first thing to try would be to configure with LDFLAGS=-static in your environment or at the end of the arguments to configure, and recompile. (I think it suffices to recompile just the final binaries, but you can make clean to be sure.)
You can check what libraries are still being linked to dynamically by doing `ldd src/inkscape'. That might be because you don't have the corresponding static library installed. (See below.)
If you want to choose on a library-by-library basis which libraries to link to statically (e.g. shared libc, statically-linked libcairo), then you can either change the link command line in the generated src/Makefile (change `-lcairo' to a filename /usr/lib/libcairo.a) or if you're the only user of the computer where you're compiling then you could temporarily move the .so files out of the way so that -lcairo only finds the .a version.
Static linking should be better (less du and I'd guess faster startup) than dynamic if only one program is using that library, but if for some reason static linking doesn't work (say you don't have the static library installed and can't be bothered recompiling it, or if there's some technical reason that dynamic linking is better) then you could try installing private copies of the libraries somewhere and use LD_LIBRARY_PATH environment variable to specify where to search for libraries when starting inkscape (perhaps by using a shell script wrapper, or by specifying -rpath or -R options in LDFLAGS when compiling inkscape).
Good luck,
pjrm.
participants (2)
-
Bruno Contreras Moreira
-
Peter Moulder