Ticket #23983 (closed defect: fixed)
gnome-doc-utils: xml2po python module in wrong path
| Reported by: | tony@… | Owned by: | devans@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.8.2 |
| Keywords: | Cc: | jeremyhu@…, raimue@…, stvnschwrz@…, jsg72@…, thedoobs@…, egall@… | |
| Port: | gnome-doc-utils |
Description (last modified by macsforever2000@…) (diff)
gnome-desktop fails to compile due to xml2po error.
Traceback (most recent call last):
File "/opt/local/bin/xml2po", line 185, in <module>
main(sys.argv[1:])
File "/opt/local/bin/xml2po", line 88, in main
from xml2po import Main
ImportError: No module named xml2po
make[3]: *** [ar/lgpl.xml] Error 1
Attachments
Change History
comment:1 Changed 3 years ago by macsforever2000@…
- Owner changed from macports-tickets@… to devans@…
- Description modified (diff)
comment:2 Changed 3 years ago by macsforever2000@…
That seems odd, you need to have gnome-doc-utils installed but that is a dependency already and it appears you have it installed. Try the following:
sudo port clean gnome-desktop sudo port install gnome-desktop
Otherwise try uninstalling and re-installing gnome-doc-utils and run the above again.
comment:3 Changed 3 years ago by tony@…
Uninstall and reinstall of gnome-doc-utils successfully completed. Ran 'port clean gnome-desktop' followed by 'port install gnome-desktop' and identical error appears:
Traceback (most recent call last):
File "/opt/local/bin/xml2po", line 185, in <module>
main(sys.argv[1:])
File "/opt/local/bin/xml2po", line 88, in main
from xml2po import Main
ImportError: No module named xml2po
make[3]: *** [ar/lgpl.xml] Error 1
Current steps taken to solve this issue have been complete reinstall of MacPorts (following instructions in FAQ) and after reinstall, running of 'port install gnome-desktop-suite' letting all dependencies install. First attempt appears successful until gnome-dekstop fails with xml2po error.
comment:4 Changed 3 years ago by jmr@…
- Cc jeremyhu@… added
It seems that xml2po was broken, see #23954. Does reinstalling gnome-doc-utils now fix this? If so, it needs a rev bump.
comment:5 Changed 3 years ago by tony@…
Issue persists after reinstallation of gnome-doc-utils (which still does not appear to error during install). Not sure if it was related to other bug report resolution but I also changed buildmakejobs to 1 before reinstalling gnome-doc-utils and the issue still persists.
comment:6 Changed 3 years ago by macsforever2000@…
What is the output of the following?
port provides /opt/local/bin/xml2po
comment:8 Changed 3 years ago by jeremyhu@…
Do you have PYTHONPATH set?
What is the output of:
port contents gnome-doc-utils | grep xml2po
and
head -1 /opt/local/bin/xml2po
comment:9 follow-up: ↓ 10 Changed 3 years ago by tony@…
PYTHONPATH is not set. Should it be?
output of port contents gnome-doc-utils|grep xml2po -- {{{ /opt/local/bin/xml2po
/opt/local/lib/pkgconfig/xml2po.pc /opt/local/lib/python2.6/site-packages/xml2po/init.py /opt/local/lib/python2.6/site-packages/xml2po/init.pyc /opt/local/lib/python2.6/site-packages/xml2po/init.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/init.py /opt/local/lib/python2.6/site-packages/xml2po/modes/init.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/init.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/basic.py /opt/local/lib/python2.6/site-packages/xml2po/modes/basic.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/basic.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/docbook.py /opt/local/lib/python2.6/site-packages/xml2po/modes/docbook.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/docbook.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/gs.py /opt/local/lib/python2.6/site-packages/xml2po/modes/gs.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/gs.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/mallard.py /opt/local/lib/python2.6/site-packages/xml2po/modes/mallard.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/mallard.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/ubuntu.py /opt/local/lib/python2.6/site-packages/xml2po/modes/ubuntu.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/ubuntu.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/xhtml.py /opt/local/lib/python2.6/site-packages/xml2po/modes/xhtml.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/xhtml.pyo /opt/local/share/man/man1/xml2po.1.gz
}}}
output of head -1 /opt/local/bin/xml2po --
#!/opt/local/bin/python2.6
comment:10 in reply to: ↑ 9 Changed 3 years ago by tony@…
Ugh. Sorry about that. PYTHONPATH is not set.
output of port contents gnome-doc-utils|grep xml2po --
/opt/local/bin/xml2po /opt/local/lib/pkgconfig/xml2po.pc /opt/local/lib/python2.6/site-packages/xml2po/__init__.py /opt/local/lib/python2.6/site-packages/xml2po/__init__.pyc /opt/local/lib/python2.6/site-packages/xml2po/__init__.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/__init__.py /opt/local/lib/python2.6/site-packages/xml2po/modes/__init__.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/__init__.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/basic.py /opt/local/lib/python2.6/site-packages/xml2po/modes/basic.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/basic.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/docbook.py /opt/local/lib/python2.6/site-packages/xml2po/modes/docbook.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/docbook.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/gs.py /opt/local/lib/python2.6/site-packages/xml2po/modes/gs.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/gs.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/mallard.py /opt/local/lib/python2.6/site-packages/xml2po/modes/mallard.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/mallard.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/ubuntu.py /opt/local/lib/python2.6/site-packages/xml2po/modes/ubuntu.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/ubuntu.pyo /opt/local/lib/python2.6/site-packages/xml2po/modes/xhtml.py /opt/local/lib/python2.6/site-packages/xml2po/modes/xhtml.pyc /opt/local/lib/python2.6/site-packages/xml2po/modes/xhtml.pyo /opt/local/share/man/man1/xml2po.1.gz
output of head -1 /opt/local/bin/xml2po --
#!/opt/local/bin/python2.6
comment:11 Changed 3 years ago by raimue@…
- Cc raimue@… added
- Port changed from gnome-desktop to gnome-doc-utils
- Summary changed from gnome-desktop build failure due to xml2po to gnome-doc-utils: xml2po python module in wrong path
I filed #24029 first not realizing there has been a related ticket.
I attached a patch there which is overriding the configure script, but solves the problem: patch-gnome-doc-utils-xml2po.diff
comment:12 Changed 3 years ago by tony@…
I can confirm that this resolves the original issue I was having, though perhaps not in the most graceful way. :)
comment:15 in reply to: ↑ 14 ; follow-up: ↓ 16 Changed 3 years ago by jsg72@…
I had the same symptom as the original problem, but it was installing gnome-terminal, not gnome-doc-utils (which built fine - go figure). I rebuilt/reinstalled gnome-doc-utils with the patch, and now gnome-terminal is failing with the following:
---> Building gnome-terminal
DEBUG: Executing org.macports.build (gnome-terminal)
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gnome-terminal/work/gnome-terminal-2.26.3.1" && /usr/bin/make -j4 all'
/usr/bin/make all-recursive
Making all in src
/usr/bin/make all-recursive
Making all in skey
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
Making all in po
make[2]: Nothing to be done for `all'.
Making all in help
if ! test -d el/; then mkdir el/; fi
if ! test -d pt_BR/; then mkdir pt_BR/; fi
if ! test -d ru/; then mkdir ru/; fi
if [ -f "C/gnome-terminal.xml" ]; then d="../"; else d="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gnome-terminal/work/gnome-terminal-2.26.3.1/help/"; fi; \
(cd el/ && \
`which xml2po` -e -p \
"${d}el/el.po" \
"${d}C/gnome-terminal.xml" > gnome-terminal.xml.tmp && \
cp gnome-terminal.xml.tmp gnome-terminal.xml && rm -f gnome-terminal.xml.tmp)
if [ -f "C/gnome-terminal.xml" ]; then d="../"; else d="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gnome-terminal/work/gnome-terminal-2.26.3.1/help/"; fi; \
(cd ru/ && \
`which xml2po` -e -p \
"${d}ru/ru.po" \
"${d}C/gnome-terminal.xml" > gnome-terminal.xml.tmp && \
cp gnome-terminal.xml.tmp gnome-terminal.xml && rm -f gnome-terminal.xml.tmp)
if [ -f "C/gnome-terminal.xml" ]; then d="../"; else d="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gnome-terminal/work/gnome-terminal-2.26.3.1/help/"; fi; \
(cd pt_BR/ && \
`which xml2po` -e -p \
"${d}pt_BR/pt_BR.po" \
"${d}C/gnome-terminal.xml" > gnome-terminal.xml.tmp && \
cp gnome-terminal.xml.tmp gnome-terminal.xml && rm -f gnome-terminal.xml.tmp)
Making all in bg
make[3]: Nothing to be done for `all'.
Making all in ro
make[3]: Nothing to be done for `all'.
Making all in ja
make[3]: Nothing to be done for `all'.
Making all in zh_CN
make[3]: Nothing to be done for `all'.
Making all in zh_TW
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
if ! test -d sv/; then mkdir sv/; fi
if [ -f "C/gnome-terminal.xml" ]; then d="../"; else d="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gnome-terminal/work/gnome-terminal-2.26.3.1/help/"; fi; \
(cd sv/ && \
`which xml2po` -e -p \
"${d}sv/sv.po" \
"${d}C/gnome-terminal.xml" > gnome-terminal.xml.tmp && \
cp gnome-terminal.xml.tmp gnome-terminal.xml && rm -f gnome-terminal.xml.tmp)
Traceback (most recent call last):
File "/opt/local/bin/xml2po", line 185, in <module>
main(sys.argv[1:])
File "/opt/local/bin/xml2po", line 171, in main
xml2po_main.merge(mofile, filenames[0])
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/xml2po/__init__.py", line 601, in merge
self.gt = gettext.GNUTranslations(mfile)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/gettext.py", line 180, in __init__
self._parse(fp)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/gettext.py", line 314, in _parse
plural = v[1].split('plural=')[1]
IndexError: list index out of range
make[2]: *** [el/gnome-terminal.xml] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gnome-terminal/work/gnome-terminal-2.26.3.1" && /usr/bin/make -j4 all " returned error 2
DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gnome-terminal/work/gnome-terminal-2.26.3.1" && /usr/bin/make -j4 all " returned error 2
while executing
"command_exec build"
(procedure "portbuild::build_main" line 9)
invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for gnome-terminal): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.
Is this the same issue or something else?
comment:16 in reply to: ↑ 15 Changed 3 years ago by raimue@…
Replying to jsg72@…:
Please use WikiFormatting next time, fixed your comment above.
Looks like a separate issue, please file a new ticket against gnome-terminal.
comment:18 Changed 3 years ago by raimue@…
- Status changed from new to closed
- Resolution set to fixed
Committed in r65510.


debug