[DebianGIS-dev] Bug#579987: FTBFS when python-setuptools is installed

2010-05-02 Thread Jeroen Dekkers
Package: libgdal1-1.6.0
Version: 1.6.3-3+b2
Severity: normal

GDAL fails to build when python-setuptools is installed. When I
uninstall python-setuptools it builds fine. The error I get is:

make[1]: Entering directory `/home/jeroen/src/debian/gdal-1.6.3/swig/python'
/usr/bin/python2.6 setup.py install
numpy include /usr/lib/python2.6/dist-packages/numpy/core/include
setup.py:78: DeprecationWarning: The popen2 module is deprecated.  Use the 
subprocess module.
  import popen2
running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied: 
'/usr/local/lib/python2.6/dist-packages/test-easy-install-13219.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

/usr/local/lib/python2.6/dist-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or root account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:
  
  http://peak.telecommunity.com/EasyInstall.html

Please make the appropriate changes for your system and try again.

make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/jeroen/src/debian/gdal-1.6.3/swig/python'
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libgdal1-1.6.0 depends on:
ii  libc6   2.10.2-6 Embedded GNU C Library: Shared lib
ii  libcurl3-gnutls 7.20.0-3+b1  Multi-protocol file transfer libra
ii  libexpat1   2.0.1-7  XML parsing C library - runtime li
ii  libgcc1 1:4.4.2-9GCC support library
ii  libgeos-c1  3.2.0-1  Geometry engine for Geographic Inf
ii  libgif4 4.1.6-9  library for GIF images (library)
ii  libhdf4-0-alt   4.2r4-10 The Hierarchical Data Format libra
ii  libhdf5-serial-1.8.4 [l 1.8.4-patch1-1   Hierarchical Data Format 5 (HDF5) 
ii  libjasper1  1.900.1-7The JasPer JPEG-2000 runtime libra
ii  libjpeg62   6b-16.1  The Independent JPEG Group's JPEG 
ii  libmysqlclient165.1.45-1 MySQL database client library
ii  libnetcdf4  1:3.6.3-1An interface for scientific data a
ii  libogdi3.2  3.2.0~beta2-6Open Geographic Datastore Interfac
ii  libpng12-0  1.2.43-1 PNG library - runtime
ii  libpq5  8.4.3-1  PostgreSQL C client library
ii  libsqlite3-03.6.23.1-1   SQLite 3 shared library
ii  libstdc++6  4.4.2-9  The GNU Standard C++ Library v3
ii  libxerces-c28   2.8.0+deb1-2 validating XML parser library for 
ii  odbcinst1debian22.2.14p2-1   Support library for accessing odbc
ii  unixodbc2.2.14p2-1   ODBC tools libraries
ii  zlib1g  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages libgdal1-1.6.0 recommends:
pn  proj-bin  none (no description available)

libgdal1-1.6.0 suggests no packages.

-- no debconf information



___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel


[DebianGIS-dev] Bug#579989: Tries to dlopen libproj.so instead of libproj.so.0

2010-05-02 Thread Jeroen Dekkers
Package: libgdal1-1.6.0
Version: 1.6.3-3+b2
Severity: normal
Tags: patch

I'm getting the following error:

ERROR 6: Unable to load PROJ.4 library (libproj.so), creation of
OGRCoordinateTransformation failed.

This is because GDAL tries to dlopen libproj.so, but it should dlopen
libproj.so.0. I tested the attached patch and that fixes the error.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libgdal1-1.6.0 depends on:
ii  libc6   2.10.2-6 Embedded GNU C Library: Shared lib
ii  libcurl3-gnutls 7.20.0-3+b1  Multi-protocol file transfer libra
ii  libexpat1   2.0.1-7  XML parsing C library - runtime li
ii  libgcc1 1:4.4.2-9GCC support library
ii  libgeos-c1  3.2.0-1  Geometry engine for Geographic Inf
ii  libgif4 4.1.6-9  library for GIF images (library)
ii  libhdf4-0-alt   4.2r4-10 The Hierarchical Data Format libra
ii  libhdf5-serial-1.8.4 [l 1.8.4-patch1-1   Hierarchical Data Format 5 (HDF5) 
ii  libjasper1  1.900.1-7The JasPer JPEG-2000 runtime libra
ii  libjpeg62   6b-16.1  The Independent JPEG Group's JPEG 
ii  libmysqlclient165.1.45-1 MySQL database client library
ii  libnetcdf4  1:3.6.3-1An interface for scientific data a
ii  libogdi3.2  3.2.0~beta2-6Open Geographic Datastore Interfac
ii  libpng12-0  1.2.43-1 PNG library - runtime
ii  libpq5  8.4.3-1  PostgreSQL C client library
ii  libsqlite3-03.6.23.1-1   SQLite 3 shared library
ii  libstdc++6  4.4.2-9  The GNU Standard C++ Library v3
ii  libxerces-c28   2.8.0+deb1-2 validating XML parser library for 
ii  odbcinst1debian22.2.14p2-1   Support library for accessing odbc
ii  unixodbc2.2.14p2-1   ODBC tools libraries
ii  zlib1g  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages libgdal1-1.6.0 recommends:
pn  proj-bin  none (no description available)

libgdal1-1.6.0 suggests no packages.

-- no debconf information
#! /bin/sh /usr/share/dpatch/dpatch-run
## libproj.dpatch by  jer...@dekkers.ch
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Dlopen libproj.so.0 instead of libproj.so

@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' gdal-1.6.3~/ogr/ogrct.cpp gdal-1.6.3/ogr/ogrct.cpp
--- gdal-1.6.3~/ogr/ogrct.cpp	2008-09-16 10:32:39.0 +0200
+++ gdal-1.6.3/ogr/ogrct.cpp	2010-05-02 21:24:39.087609517 +0200
@@ -80,7 +80,7 @@
 #elif defined(__APPLE__)
 #  define LIBNAME  libproj.dylib
 #else
-#  define LIBNAME  libproj.so
+#  define LIBNAME  libproj.so.0
 #endif
 
 //
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

[DebianGIS-dev] Bug#579989: Bug#579989: Tries to dlopen libproj.so instead of libproj.so.0

2010-05-03 Thread Jeroen Dekkers
At Mon, 3 May 2010 09:30:08 +0200,
Francesco P. Lovergine wrote:
 
 On Sun, May 02, 2010 at 10:24:17PM +0200, Jeroen Dekkers wrote:
  Package: libgdal1-1.6.0
  Version: 1.6.3-3+b2
  Severity: normal
  Tags: patch
  
  I'm getting the following error:
  
  ERROR 6: Unable to load PROJ.4 library (libproj.so), creation of
  OGRCoordinateTransformation failed.
  
  This is because GDAL tries to dlopen libproj.so, but it should dlopen
  libproj.so.0. I tested the attached patch and that fixes the error.
  
 
 This is a non-sense:
 
 fran...@blegrez:~$ ldd /usr/lib/libgdal1.6.0.so|grep proj
 libproj.so.0 = /usr/lib/libproj.so.0 (0xb4e7)
 
 So, _what_ are you doing _exactly_ to get this type of error?

But that's because libogdi.so.3 links with libproj:

runge:~% objdump -x /usr/lib/libogdi.so.3 | grep NEEDED
  NEEDED   libdl.so.2
  NEEDED   libz.so.1
  NEEDED   libexpat.so.1
  NEEDED   libproj.so.0
  NEEDED   libm.so.6
  NEEDED   libc.so.6

libgdal1.6.0.so.1 doesn't link directly to it:

runge:~% objdump -p /usr/lib/libgdal1.6.0.so.1 | grep NEEDED
  NEEDED   libgeos_c.so.1
  NEEDED   libsqlite3.so.0
  NEEDED   libodbc.so.1
  NEEDED   libodbcinst.so.1
  NEEDED   libexpat.so.1
  NEEDED   libxerces-c.so.28
  NEEDED   libjasper.so.1
  NEEDED   libhdf5.so.6
  NEEDED   libmfhdfalt.so.0
  NEEDED   libdfalt.so.0
  NEEDED   libogdi.so.3.2
  NEEDED   libgif.so.4
  NEEDED   libjpeg.so.62
  NEEDED   libpng12.so.0
  NEEDED   libnetcdf.so.4
  NEEDED   libpq.so.5
  NEEDED   libz.so.1
  NEEDED   libpthread.so.0
  NEEDED   librt.so.1
  NEEDED   libdl.so.2
  NEEDED   libcurl-gnutls.so.4
  NEEDED   libmysqlclient.so.16
  NEEDED   libstdc++.so.6
  NEEDED   libgcc_s.so.1
  NEEDED   libm.so.6
  NEEDED   libc.so.6

As far as I understand because GDAL only needs libproj for doing
certain kind of conversions. So it does a dlopen() when it needs it,
but uses libproj.so instead of libproj.so.0.

I found the bug when using the GIS part of django with the
OpenStreetMap widget, so that's a bit of a complex test case. But I've
also found a bug report for Fedora and they patched it the same way,
see
http://cvs.fedoraproject.org/viewvc/rpms/gdal/F-13/gdal.spec?revision=1.74view=markup
line 170. If you look at the source, ogr/ogrct.cpp is doing

pfn_pj_init = (projPJ (*)(int, char**)) CPLGetSymbol( pszLibName,
   pj_init );

where pszLibName is set to libproj.so earlier in the code, and
CPLGetSymbol is a platform independent wrapper defined in
port/cplgetsymbol.cp that calls dlopen/dlsym. And that's clearly
wrong, as it should always open libproj.so.0. And not just because
libproj.so only exists in the libproj-dev package, but if libproj gets
a SONAME bump because of an ABI change you would get a library with a
different ABI if you dlopen just libproj.so.

I hope this explanation clears everything up.

Kind regards,

Jeroen Dekkers



___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel