Opened 17 years ago

Closed 16 years ago

#1652 closed defect (invalid)

Problem building Python binding in svn version of GDAL on Sabayon Linux(Gentoo)

Reported by: cgsbob Owned by: hobu
Priority: normal Milestone: 1.5.0
Component: PythonBindings Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

I'm trying to build gdal 1.5 svn on Sabayon Linux (based on Gentoo). I am having problems with building the Python bindings. I am using Python 2.4.4, GCC 4.1.2 on an Intel Core2 processor. I have been able to build gdal 1.4.1 with no problems.

make[2]: Entering directory `/home/bobm/src/gis/gdal/swig/python' python setup.py install --prefix=/usr/local numpy include /usr/lib/python2.4/site-packages/numpy/core/include running install Checking .pth file support in /usr/local/lib64/python2.4/site-packages/ /usr/bin/python -E -c pass TEST FAILED: /usr/local/lib64/python2.4/site-packages/ does NOT support .pth files error: bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:

/usr/local/lib64/python2.4/site-packages/

and your PYTHONPATH environment variable currently contains:

Here are some of your options for correcting the problem:

  • You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files

  • You can add the installation directory to the PYTHONPATH environment variable. (It must then also be on PYTHONPATH whenever you run Python and want to use the package(s) you are installing.)

  • You can set up the installation directory to support ".pth" files by using one of the approaches described here:

http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations

Please make the appropriate changes for your system and try again. make[2]: * [install] Error 1

Attachments (1)

makeinstall.txt (31.8 KB ) - added by cgsbob 17 years ago.
Complete make install log with errors

Download all attachments as: .zip

Change History (5)

by cgsbob, 17 years ago

Attachment: makeinstall.txt added

Complete make install log with errors

comment:1 by cgsbob, 17 years ago

Component: defaultPythonBindings
Summary: Python4.1.2 Problem building svn version of GDAL on Sabayon Linux(Gentoo)Problem building Python binding in svn version of GDAL on Sabayon Linux(Gentoo)

in reply to:  description comment:2 by cgsbob, 17 years ago

Hobu, did you get a chance to look into my problem? I did what you said: 1) set --without-python and --without-ng-python upon configure 2) cd into ./swig/python and do 'sudo python setup.py build' 3) sudo python setup.py install'

(you didn't tell me to do this, but I assumed this is the way to install the Python bindings)

4) sudo make install

I checked to see if Python bindings is working and got this:

Python 2.4.4 (#1, May 28 2007, 11:52:45) [GCC 4.1.2 (Gentoo 4.1.2)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import gdal

Traceback (most recent call last):

File "<stdin>", line 1, in ? File "build/bdist.linux-x86_64/egg/gdal.py", line 7, in ? File "build/bdist.linux-x86_64/egg/_gdal.py", line 7, in ? File "build/bdist.linux-x86_64/egg/_gdal.py", line 6, in bootstrap

ImportError: /home/bobm/.python-eggs/GDAL_OGR-1.5.0-py2.4-linux-x86_64.egg-tmp/_gdal.so: undefined symbol: GDALCreateColorRamp

Got any ideas?

Bob

comment:3 by hobu, 17 years ago

Status: newassigned

Bob,

GDALCreateColorRamp was recently added to the library. I think the Python bindings are attempting to link against your already installed version of GDAL instead of against the newly built library.

Build the library --without-python and --without-ngpython and install it, and then go into ./swig/python and do 'make install'

I have also added configure logic to look for setuptools which slightly tweaks how the GDAL NG Python bindings are installed in that case (r11634).

Howard

comment:4 by hobu, 16 years ago

Resolution: invalid
Status: assignedclosed
Note: See TracTickets for help on using tickets.