[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Statically linking against bundled libagg



The upstream for my package mapnik builds against an embedded copy of
agg, basically an unmodified agg 2.4. I am aware that this is an
undesirable situation and would like to try and fix this.

As far as I can tell from upstream, the decision to bundle AGG is only a
convenience for building on systems which don't have agg available
already.

Building and rudimentary testing against the agg 2.5 shipped with
unstable works, however I have a couple of concerns which make me
reluctant to change the build:

When building against system agg, I get the lintian error:

E: libmapnik0.5: shlib-with-non-pic-code usr/lib/libmapnik.so.0.5.0

this does not occur when compiling mapnik's own agg library.
I'm not sure what's happening here; does it indicate a mistake in the
way the agg library was built to start with or the way I'm building
mapnik?

The other concern is basically about the possibility of introducing
regressions in functionality by changing the build at this late stage.
This is entirely my own fault; I have left this issue unresolved for too
long.

So, questions:

1) can anyone offer advice about how to correct the above lintian error?
2) assuming I can fix the problem and upload a fix, should I ask for it
   to enter testing -- ie is it better to fix the embedded code copy
   issue for lenny or minimise the possibility of regressions?

For reference I attach the patch against the version of mapnik in
unstable I am using to build against the system agg library.

Thanks,
Dominic.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)
Index: debian/control
===================================================================
--- debian/control	(revision 1047)
+++ debian/control	(working copy)
@@ -1,7 +1,7 @@
 Source: mapnik
 Priority: optional
 Maintainer: Dominic Hargreaves <dom@earth.li>
-Build-Depends: libboost-thread-dev (>= 1.34.0), libboost-filesystem-dev (>= 1.34.0), libboost-regex-dev (>= 1.34.0), libboost-program-options-dev (>= 1.34.0), libboost-python-dev (>= 1.34.1-9), libpng12-dev, libjpeg62-dev, libtiff4-dev, zlib1g-dev, libfreetype6-dev, libpq-dev, proj, libltdl3-dev, libfribidi-dev, python, debhelper (>= 5.0.38), python2.5-dev, python-central (>= 0.5.6), libgdal1-dev, libxml2-dev, libagg-dev, libboost-iostreams-dev (>= 1.34.0)
+Build-Depends: libboost-thread-dev (>= 1.34.0), libboost-filesystem-dev (>= 1.34.0), libboost-regex-dev (>= 1.34.0), libboost-program-options-dev (>= 1.34.0), libboost-python-dev (>= 1.34.1-9), libpng12-dev, libjpeg62-dev, libtiff4-dev, zlib1g-dev, libfreetype6-dev, libpq-dev, proj, libltdl3-dev, libfribidi-dev, python, debhelper (>= 5.0.38), python2.5-dev, python-central (>= 0.5.6), libgdal1-dev, libxml2-dev, libagg-dev, libboost-iostreams-dev (>= 1.34.0), libagg-dev
 Standards-Version: 3.7.3
 Section: libs
 XS-Python-Version: 2.5
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 1047)
+++ debian/changelog	(working copy)
@@ -1,3 +1,9 @@
+mapnik (0.5.1-3~test.1) unstable; urgency=low
+
+  * Link against system agg library
+
+ -- Dominic Hargreaves <dom@earth.li>  Sun,  6 Jul 2008 18:21:06 +0100
+
 mapnik (0.5.1-2) unstable; urgency=low
 
   * Update mapnik-utils extended description to fix formatting problem
Index: src/SConscript
===================================================================
--- src/SConscript	(revision 1047)
+++ src/SConscript	(working copy)
@@ -30,7 +30,7 @@
 prefix = env['PREFIX']
 install_prefix = env['DESTDIR'] + '/' + prefix
 
-libraries = ['agg'] + env['LIBS']
+libraries = env['LIBS']
 # Debian hack to clean up linking of main library (fixes dpkg-shlibdeps
 # warnings)
 libraries.remove('z')
Index: SConstruct
===================================================================
--- SConstruct	(revision 1047)
+++ SConstruct	(working copy)
@@ -94,7 +94,7 @@
     if not val in env[key]: env[key].append(val)
 
 # Libraries and headers dependency checks
-env['CPPPATH'] = ['#agg/include', '#include', '#']
+env['CPPPATH'] = ['/usr/include/agg2', '#include', '#']
 env['LIBPATH'] = ['#agg', '#src']
 
 # Solaris & Sun Studio settings (the `SUNCC` flag will only be
@@ -204,7 +204,7 @@
 #### Build instructions & settings ####
 
 # Build agg first, doesn't need anything special
-SConscript('agg/SConscript')
+#SConscript('agg/SConscript')
 
 # Build the core library
 SConscript('src/SConscript')

Reply to: