[parsec-users] compiling statically linked vips binary

Christian Bienia cbienia at CS.Princeton.EDU
Wed Apr 30 20:01:28 EDT 2008


You don't need parsecmgmt to use PARSEC. It's merely there for convenience.
If you modify the environment variables like in the global and local build
configurations you are able to build and run everything manually like
parsecmgmt does. In your case you seem to have forgotten the local build
configuration of vips that can be found in the parsec/ directory of each
package. Therefore the script cannot find the glib library that comes with
PARSEC that is only needed by vips, and your system does not have its own
version of glib installed.

You should be able to pass the -all-static flag to the linker via the
standard environment variables (e.g. LDFLAGS). Unfortunately the various
build systems are not fully consistent in their usage of those environment
variables. You can use the local build configurations to accommodate for
exotic interpretations of these variables.

If you are unable to get a static version of vips with the -all-static flag,
try disabling the shared version of the vips library. If libtool cannot find
a shared version, it will automatically use the static version. We use this
trick for the libraries that come with PARSEC so we don't have to mess with
loading of shared libraries from unusual locations.

- Chris

-----Original Message-----
From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Kshitij
Sent: Wednesday, April 30, 2008 7:34 PM
To: PARSEC Users
Subject: Re: [parsec-users] compiling statically linked vips binary

Is there a way to pass -all-static flag to the linker using parsecmgmt
tool? I tried compiling vips on it's own without using parsecmgmt, but
I am unable to include the correct path for libs provided with parsec.

configure script dies reporting the following message:

checking pkg-config is at least version 0.9.0... yes
checking for REQUIRED... configure: error: Package requirements
(glib-2.0 >= 2.6 gmodule-2.0 >= 2.4 libxml-2.0 gobject-2.0) were not

No package 'glib-2.0' found
No package 'gmodule-2.0' found
No package 'gobject-2.0' found


On Wed, Apr 30, 2008 at 4:34 AM,  <jcupitt at gmail.com> wrote:
> 2008/4/30 Kshitij Sudan <kshitij at cs.utah.edu>:
> >  I am trying to compile vips for Linux, such that it's statically
>  >  linked. I edited gcc.bldconf in $PARSEC/config and also vips specific
>  >  gcc.bldconf file by adding  -static and -static-libgcc to CCFLAGS,
>  >  CXXFLAG, and LDFLAGS. Still at the end of compilation, it produces a
>  >  dynamically linked executable. I am building it using "parsecmgmt"
>  >  tool.
>  vips is linked with libtool which (strangely) has it's own
>  interpretation of these flags. libtool -static means link the object
>  against the static versions of any uninstalled libtool libraries, but
>  link dynamically otherwise. -static-all means link against the static
>  versions of all libraries, including libtool, native, installed and
>  uninstalled. At least that's my understanding.
>  Unfortunately, you can't pass -all-static to configure, because then
>  the compiler sees it (since configure is not using libtool) and
>  breaks. Instead you have to do:
>   ./configure
>   make LDFLAGS=-all-static
>  John
>  _______________________________________________
>  parsec-users mailing list
>  parsec-users at lists.cs.princeton.edu
>  https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
parsec-users mailing list
parsec-users at lists.cs.princeton.edu

More information about the parsec-users mailing list