W dniu 05.10.2014 o 15:44, Maciej Sieczka pisze:
W dniu 04.01.2013 o 00:13, Glynn Clements pisze:
Maciej Sieczka wrote:
The python interpreter is accessed via the make variable PYTHON, so
you can use e.g.:
make PYTHON=python2
Still one error crops out - ctypesgen.py has "#!/usr/bin/env python"
shebang, which calls Python 3.x on Arch, therefore:
Changing that shebang to python2 let the build complete OK. Do you know
if there is a workaround which does not involve modyfying the source
though?
Create a directory containing a symlink from "python" to the python2
executable, than add that directory to the front of the PATH.
I have successfully aplied this approach (symlink `python2' in the root
of releasebranch_7_0 working copy as `python', add that dir to the front
of the PATH, export PATH, run `make') until recently I started getting
the following error during build:
$ pwd
/home/pok/aur/grass70-svn/src/grass70-svn/gui/wxpython/iclass
$ make
make
Please ignore that make log. An excerpt with issues from the proper make log is as follows:
---
make[5]: Entering directory '/home/pok/aur/grass70-svn/src/grass70-svn/gui/wxpython/iclass'
/usr/bin/install -c g.gui.iclass.py /home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/scripts/g.gui.iclass
/usr/bin/install -c -m 644 iclass_frame.jpg /home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/docs/html/iclass_frame.jpg
make /home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/docs/html/g.gui.iclass.html
make[6]: Entering directory '/home/pok/aur/grass70-svn/src/grass70-svn/gui/wxpython/iclass'
GISRC=/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/demolocation/.grassrc70 GISBASE=/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu PATH="/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/bin:/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/bin:/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/scripts:$PATH" PYTHONPATH="/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/etc/python:/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/gui/wxpython:$PYTHONPATH" LD_LIBRARY_PATH="/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/bin:/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/scripts:/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/lib:/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/lib:" LC_ALL=C /home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/scripts/g.gui.iclass --html-description < /dev/null | grep -v '</body>\|</html>' > g.gui.iclass.tmp.html
Traceback (most recent call last):
File "/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/scripts/g.gui.iclass", line 62, in <module>
from iclass.frame import IClassMapFrame
File "/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/gui/wxpython/iclass/frame.py", line 61, in <module>
from iclass.plots import PlotPanel
File "/home/pok/aur/grass70-svn/src/grass70-svn/dist.x86_64-unknown-linux-gnu/gui/wxpython/iclass/plots.py", line 19, in <module>
import wx.lib.plot as plot
File "/usr/lib/python2.7/site-packages/wx-3.0-gtk2/wx/lib/plot.py", line 126, in <module>
raise ImportError, "NumPy not found.\n" + msg
ImportError: NumPy not found.
This module requires the NumPy module, which could not be
imported. It probably is not installed (it's not part of the
standard Python distribution). See the Numeric Python site
(http://numpy.scipy.org) for information on downloading source or
binaries.
../../../include/Make/GuiScript.make:36: recipe for target 'g.gui.iclass.tmp.html' failed
make[6]: *** [g.gui.iclass.tmp.html] Error 1
rm g.gui.iclass.tmp.html
make[6]: Leaving directory '/home/pok/aur/grass70-svn/src/grass70-svn/gui/wxpython/iclass'
../../../include/Make/GuiScript.make:22: recipe for target 'guiscript' failed
make[5]: *** [guiscript] Error 2
make[5]: Leaving directory '/home/pok/aur/grass70-svn/src/grass70-svn/gui/wxpython/iclass'
---
The configure was:
--with-cxx \
--with-cairo \
--with-freetype \
--with-freetype-includes=/usr/include/freetype2 \
--with-geos \
--with-liblas \
--with-nls \
--with-netcdf \
--with-odbc \
--with-openmp \
--with-postgres \
--with-python=/usr/bin/python2-config \
--with-readline \
--with-proj-includes=/usr/include \
--with-proj-libs=/usr/lib \
--with-proj-share=/usr/share/proj \
--with-pthread \
--with-sqlite \
--with-wxwidgets=/usr/bin/wx-config-2.8
Per 2.8 wxWidgets specified, I don't get it why /usr/lib/python2.7/site-packages/wx-3.0-gtk2/ gets involved in iclass build. I would rather expect it to pick /usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/. Some details:
---
$ /usr/bin/wx-config-2.8 --libs
-pthread -Wl,-O1,--sort-common,--as-needed,-z,relro -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8
$ /usr/bin/wx-config-2.8 --list
Default config is gtk2-unicode-release-2.8
Default config will be used for output
Also available in /usr:
gtk2-unicode-3.0
---
What do you make of this? Like I said, all the other Python bits seem to build fine. Only iclass doesn't. I'm attaching a complete build log if you want to look inside.
This is an Arch box. I do have all the NumPy stuff installed. There is a problem on Arch that wx-3.0-gtk2/wx/lib/plot.py fails to import numpy.oldnumeric [1] leading to those "NumPy not found" errors, but that would not happen if iclass build referred to wx-2.8-gtk2-unicode/wx/lib/plot.py instead - like I guess all the other GRASS 7 Python modules do.
Any helpfull thoughts or questions are most welcome.
[1] https://bugs.archlinux.org/task/42054?string=wxpython&project=1&type[0]=&sev[0]=&pri[0]=&due[0]=&reported[0]=&cat[0]=&status[0]=open&percent[0]=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto=
Maciek
--
Maciej Sieczka
http://www.sieczka.org
(attachments)
grass70-svn-62209-1-x86_64-build.log.tar.bz2 (110 KB)