#20087: Host Python's pyexpat module fails building, causes errors in compiling
other packages
------------------------+------------------------
Reporter: mystica555 | Owner: developers
Type: defect | Status: new
Priority: normal | Milestone:
Component: packages | Version: Trunk
Keywords: |
------------------------+------------------------
I've been pulling my hair out trying to compile openwrt recently.
OpenVSwitch and a few other programs make use of Python's XML.SAX parser
as part of their build processes.
The host Python that is compiled to facilitate this, is not properly
building the pyexpat.so; it complains it cannot import the module, and
thus names it pyexpat_failed.so "Pyexpat_failed.so" is so rare, that
there are -5- hits on Google. This will now be the 6th.
First, the build log from when the pyexpat module is being built, starting
off first with the configure script and then finishing after it cannot
import the python module.
Excerpt:
gcc -pthread -shared
-L/home/mike/softsys/openwrt/openwrt/staging_dir/host/lib
-L/home/mike/softsys/openwrt/openwrt/staging_dir/host/usr/lib -fno-strict-
aliasing -O2 -I/home/mike/softsys/openwrt/openwrt/staging_dir/host/include
-I/home/mike/softsys/openwrt/openwrt/staging_dir/host/usr/include
-I/usr/include/ncursesw -I/usr/include/ncurses -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes build/temp.linux-
x86_64-2.7/home/mike/softsys/openwrt/openwrt/build_dir/host/Python-2.7.10/Modules/pyexpat.o
build/temp.linux-
x86_64-2.7/home/mike/softsys/openwrt/openwrt/build_dir/host/Python-2.7.10/Modules/expat/xmlparse.o
build/temp.linux-
x86_64-2.7/home/mike/softsys/openwrt/openwrt/build_dir/host/Python-2.7.10/Modules/expat/xmlrole.o
build/temp.linux-
x86_64-2.7/home/mike/softsys/openwrt/openwrt/build_dir/host/Python-2.7.10/Modules/expat/xmltok.o
-L/home/mike/softsys/openwrt/openwrt/staging_dir/host/lib -L/usr/local/lib
-o build/lib.linux-x86_64-2.7/pyexpat.so
*** WARNING: renaming "pyexpat" since importing it failed: build/lib
.linux-x86_64-2.7/pyexpat.so: undefined symbol: XML_SetCommentHandler
(then a bit later)
*** WARNING: renaming "_elementtree" since importing it failed:
PyCapsule_Import could not import module "pyexpat"
(and a bit later)
Python build finished, but the necessary bits to build these modules were
not found:
bsddb185 dl imageop
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the
module's name.
Failed to build these modules:
_elementtree pyexpat
Second, the OpenVSwitch compile failing
Excerpt:
make[3]: Entering directory '/home/mike/softsys/openwrt/openwrt/build_dir
/target-x86_64_glibc-2.21/openvswitch-2.3.90'
PYTHONPATH=./python":"$PYTHONPATH PYTHONDONTWRITEBYTECODE=yes
/home/mike/softsys/openwrt/openwrt/staging_dir/host/bin/python ./ofproto
/ipfix-gen-entities ofproto/ipfix.xml > ofproto/ipfix-entities.def.tmp &&
\
mv ofproto/ipfix-entities.def.tmp ofproto/ipfix-entities.def
Traceback (most recent call last):
File "./ofproto/ipfix-gen-entities", line 132, in <module>
print_ipfix_entity_macros(args[0])
File "./ofproto/ipfix-gen-entities", line 94, in
print_ipfix_entity_macros
xml.sax.parse(xml_file, IpfixEntityHandler())
File "/home/mike/softsys/openwrt/openwrt/staging_dir/target-
x86_64_glibc-2.21/usr/lib/python2.7/xml/sax/__init__.py", line 30, in
parse
parser = make_parser()
File "/home/mike/softsys/openwrt/openwrt/staging_dir/target-
x86_64_glibc-2.21/usr/lib/python2.7/xml/sax/__init__.py", line 93, in
make_parser
raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found
Makefile:5046: recipe for target 'ofproto/ipfix-entities.def' failed
make[3]: *** [ofproto/ipfix-entities.def] Error 1
Third, the OpenConnect compile failing
Very similar excerpt to OpenVSwitch:
make[6]: Entering directory '/home/mike/softsys/openwrt/openwrt/build_dir
/target-x86_64_glibc-2.21/openconnect-7.06/www'
/home/mike/softsys/openwrt/openwrt/staging_dir/host/bin/python2
"./html.py" -d . csd.xml > csd.html || (rm csd.html; exit 1)
Traceback (most recent call last):
File "./html.py", line 253, in <module>
parseConfig(arguments[0])
File "./html.py", line 194, in parseConfig
parser = xml.sax.make_parser()
File
"/home/mike/softsys/openwrt/openwrt/staging_dir/host/lib/python2.7/xml/sax/__init__.py",
line 93, in make_parser
raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found
Makefile:739: recipe for target 'csd.html' failed
make[6]: *** [csd.html] Error 1
Any ideas here?
--
Ticket URL: <https://dev.openwrt.org/ticket/20087>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets