Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python bindings do not install with DESTDIR set, libtool complaining #4445

Closed
phopfgartner opened this issue Sep 6, 2012 · 6 comments
Closed

Comments

@phopfgartner
Copy link

As of 6.2.0-beta2:

./configure \
>    --prefix=/usr \
>    --with-gd \
>    --with-freetype=/usr/bin/freetype-config \
>    --with-gdal=/usr/bin/gdal-config \
>    --with-ogr=/usr/bin/gdal-config \
>    --with-geos=/usr/bin/geos-config \
>    --with-cairo=yes \
>    --with-proj \
>    --with-wfs \
>    --with-wcs \
>    --with-sos \
>    --with-wmsclient \
>    --with-wfsclient \
>    --with-postgis=/usr/bin/pg_config \
>    --with-curl-config=/usr/bin/curl-config \
>    --with-xml2-config=/usr/bin/xml2-config \
>    --with-php=/usr/bin/php-config \
>    --with-fribidi-config=/usr/lib64/pkgconfig/fribidi.pc \
>    --with-fastcgi=/usr \
>    --with-threads \
>    --enable-debug \
>    --with-kml=yes \
>    --with-xml-mapfile=yes \
>    --enable-python-mapscript

make
...
make DESTDIR="/home/rpmbuild/tmp/destdir.ms62" install
...
libtool: install: /usr/bin/install -c .libs/php_mapscript.lai /home/rpmbuild/tmp/destdir.ms62/usr/lib64/php/modules/php_mapscript.la
libtool: install: warning: remember to run `libtool --finish /usr/lib64/php/modules'
make[1]: Leaving directory `/home/rpmbuild/tmp/mapserver-6.2.0-beta2/mapscript/php'
cd mapscript/python; make install DESTDIR=/home/rpmbuild/tmp/destdir.ms62;
make[1]: Entering directory `/home/rpmbuild/tmp/mapserver-6.2.0-beta2/mapscript/python'
/bin/sh ../../libtool --mode=install /usr/bin/install -c _mapscript.la /home/rpmbuild/tmp/destdir.ms62`/usr/bin/python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"`
libtool: install: error: cannot install `_mapscript.la' to a directory not ending in /usr/lib64/python2.6/site-packages
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/rpmbuild/tmp/mapserver-6.2.0-beta2/mapscript/python'
make: *** [python_mapscript_install] Error 2
@ghost ghost assigned tbonfort Sep 6, 2012
@tbonfort
Copy link
Member

tbonfort commented Sep 6, 2012

@phopfgartner what do you get when you run

/usr/bin/python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"

from a shell?

This is the output I'm getting:

$ make DESTDIR="/Users/rpmbuild/tmp/destdir.ms62" install
...
cd mapscript/python; make install DESTDIR=/Users/rpmbuild/tmp/destdir.ms62;
/usr/bin/install -c -d /Users/rpmbuild/tmp/destdir.ms62`/usr/bin/python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"`
/bin/sh ../../libtool --mode=install /usr/bin/install -c _mapscript.la /Users/rpmbuild/tmp/destdir.ms62`/usr/bin/python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"`
libtool: install: /usr/bin/install -c .libs/_mapscript.0.so /Users/rpmbuild/tmp/destdir.ms62/Library/Python/2.7/site-packages/_mapscript.0.so
libtool: install: (cd /Users/rpmbuild/tmp/destdir.ms62/Library/Python/2.7/site-packages && { ln -s -f _mapscript.0.so _mapscript.so || { rm -f _mapscript.so && ln -s _mapscript.0.so _mapscript.so; }; })
libtool: install: /usr/bin/install -c .libs/_mapscript.lai /Users/rpmbuild/tmp/destdir.ms62/Library/Python/2.7/site-packages/_mapscript.la
libtool: install: warning: remember to run `libtool --finish /Library/Python/2.7/site-packages'
/usr/bin/install -c -c mapscript.py /Users/rpmbuild/tmp/destdir.ms62`/usr/bin/python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"`

@tbonfort
Copy link
Member

tbonfort commented Sep 6, 2012

@phopfgartner also, what do you get when you run ./libtool --version from /home/rpmbuild/tmp/mapserver-6.2.0-beta2 ?

@phopfgartner
Copy link
Author

It's:

[rpmbuild@rpm-el6-devel mapserver-6.2.0-beta2]$ ./libtool --version
libtool (GNU libtool) 2.4.2
Written by Gordon Matzigkeit gord@gnu.ai.mit.edu, 1996

Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@phopfgartner
Copy link
Author

And ...

[rpmbuild@rpm-el6-devel mapserver-6.2.0-beta2]$ /usr/bin/python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)"
/usr/lib64/python2.6/site-packages

@tbonfort
Copy link
Member

tbonfort commented Sep 6, 2012

can you:

  • pull branch-6-2 and work off the latest code
  • reconfigure and make clean

if it's still failing, can you provide the contents of mapscript/python/Makefile and mapscript/python/_mapscript.la

thanks,

@phopfgartner
Copy link
Author

Works fine, now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants