Opened 9 years ago
Last modified 7 years ago
#2842 new defect
configure fails to detect missing HTMLParser
Reported by: | marisn | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.4 |
Component: | Compiling | Version: | svn-trunk |
Keywords: | Cc: | ||
CPU: | Unspecified | Platform: | Unspecified |
Description
Seems that Python module HTMLParser is a requirement to compile GRASS 7 trunk. Still configure part will give no warning if it is missing. If it is required, it should be tested during configure phase. If it is optional, compilation should not fail in case of its absence.
Example of failure message:
if [ "pngdriver" != "" -a -f "pngdriver".html ] ; then make html ; fi make[1]: Entering directory '/home/maris/soft/grass_trunk/lib/pngdriver' VERSION_NUMBER=7.1.svn /home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/tools/g.html2man.py /home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/docs/html/pngdriver.html /home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/docs/man/man1/pngdriver.1 Traceback (most recent call last): File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/tools/g.html2man.py", line 4, in <module> from html import HTMLParser, HTMLParseError File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/tools/html.py", line 4, in <module> import HTMLParser as base ImportError: No module named 'HTMLParser' ../../include/Make/Html.make:11: recipe for target '/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/docs/man/man1/pngdriver.1' failed make[1]: *** [/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-gnu/docs/man/man1/pngdriver.1] Error 1 make[1]: Leaving directory '/home/maris/soft/grass_trunk/lib/pngdriver' ../../include/Make/Lib.make:26: recipe for target 'lib' failed make: *** [lib] Error 2
Change History (9)
follow-up: 2 comment:1 by , 9 years ago
follow-up: 3 comment:2 by , 9 years ago
Replying to neteler:
Here it is part of the standard Python library package.
Thanks, Markus, for heads-up. The module has been renamed in Python 3, thus I worked around by setting a different python interpreter before compilation.
Still the issue is valid - configure step should check build time dependencies and fail if they are not met. It is done for C, C++ - why Python should be different?
comment:3 by , 9 years ago
Replying to marisn:
Still the issue is valid - configure step should check build time dependencies and fail if they are not met. It is done for C, C++ - why Python should be different?
For C/C++, the checks are often part of a more significant process, i.e. ensuring that the necessary parameters are stored in Platform.make, config.h, etc. That has to be done in order for the build to work, even when everything is in order. The fact that you get an error if something is wrong is almost a side-effect.
At present, we don't even check whether Python is installed. For C, the relevant compiler checks are part of autoconf (AC_PROG_CC); there isn't an equivalent for Python. With Python 3 becoming more common, it may be worthwhile checking for Python 2.x specifically.
comment:6 by , 8 years ago
Milestone: | 7.2.1 → 7.2.2 |
---|
comment:9 by , 7 years ago
Milestone: | → 7.2.4 |
---|
If problem or not seems to depend on the distro - which one do you use?
E.g., in Fedora no such issue:
Here it is part of the standard Python library package.