Re: [gtk-osx-devel] configure: error: Python module libxml2 is needed to run this package



On Wed, Dec 24, 2014 at 8:11 PM, John Ralls <jralls ceridwen us> wrote:

On Dec 24, 2014, at 2:13 PM, Jim Charlton <charltn gmail com> wrote:

On 14-12-23 12:23 PM, Philip Chimento wrote:
On Tue, Dec 23, 2014 at 12:50 PM, Jim Charlton <charltn gmail com> wrote:
I am building gtk-osx on MAC Yosemite 10.10

1. gtk-osx-build-setup.sh

2. export PATH=$PATH:/Users/chartech/.local/bin

3. Added lines

checkoutroot = os.path.expanduser("/Applications/Drumroaster/gtk/Source/gtk")
prefix = os.path.expanduser("/Applications/Drumroaster/gtk/inst")
os.environ["ARCHFLAGS"] = "-arch x86_64"

to .jhbuildrc-custom as I want the installation in a non-standard location.

4. jhbuild bootstrap
5. alias jhbuild="PATH=/Applications/Drumroaster/gtk/inst/bin:$PATH jhbuild"
6. jhbuild build python
7. jhbuild build meta-gtk-osx-bootstrap

In step 7 I get a configure error while building itstool. "configure: error: Python module libxml2 is needed to run this package"

I have run this sequence before on MAVERICKS (10.9.5) with no problem.  Must be something about the way the python libs are being installed or used but I cannot figure it out.

Any help would be appreciated.

You may need to set the PYTHONPATH environment variable to include /Applications/Drumroaster/gtk/inst/lib/python2.7/site-packages (check that there is a libxml2.py file there.)

Regards,
--
Philip

A further comment... and perhaps a solution to my problem.

I checked and the installed version of python on MAC 10.10 is 2.7.6.  I reasoned that the problem I was having was caused by having two installations of python.  So I started again as above but I left out the 'jhbuild build python' step.  Now the next step 'jhbuild build meta-gtk-osx-bootstrap' completes successfully!

Thanks for listening to my moaning! :-)

I’ve had issues with that too. What happens is that the first build of python gets linked against /usr/lib/libpython instead of $PREFIX/lib/libpython, but libxml2.dylib gets linked against $PREFIX/lib/libpython and won’t import. Select 4, cd ../Python-2.7.6, rm python.exe, make && make install usually relinks python.exe correctly, after which iditools builds correctly.

I ran into this issue myself for the first time as well. I wasn't building Python but using the system one instead. For me, starting a shell and doing

cd ../libxml/python
make install

was enough to get the libxml2 Python module installed in the right place. Apparently, despite it finding Python at /usr/bin/python during configure, it still didn't install the module the first time around. Still not sure why this happens.
--
Philip


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