Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 624852 - www-client/lynx-2.8.9_pre16: /usr/bin/gmsgfmt: error while opening "pass2.tmp" for reading: No such file or directory
Summary: www-client/lynx-2.8.9_pre16: /usr/bin/gmsgfmt: error while opening "pass2.tmp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tim Harder
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-13 09:15 UTC by Kobboi
Modified: 2017-09-03 17:17 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,22.83 KB, text/x-log)
2017-07-13 09:15 UTC, Kobboi
Details
if_unicode_then_non_parallel_patch (lynx-2.8.9_pre16.ebuild.patch,313 bytes, patch)
2017-07-16 11:13 UTC, Ulenrich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kobboi 2017-07-13 09:15:08 UTC
Created attachment 483952 [details]
build.log

/bin/sh ./scripts/fixtext.sh ./LYMessages_en.h >LYMessages.c
make  DESTDIR="" CC="x86_64-pc-linux-gnu-gcc" -C ./po
make[1]: Entering directory `/var/tmp/portage/www-client/lynx-2.8.9_pre16/work/lynx2.8.9dev.16/po'
translating ca.po to ca.gmo
translating cs.po to cs.gmo
translating da.po to da.gmo
translating de.po to de.gmo
...updated homepage URL
...updated homepage URL
...updated homepage URL
...updated homepage URL
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... done.
.................... done.
........................................................................................................................................................................ done.
................... done.
...merged against ./lynx.pot
file=./`echo de | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
...merged against ./lynx.pot
file=./`echo ca | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
...merged against ./lynx.pot
file=./`echo da | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
translating eo.po to eo.gmo
...merged against ./lynx.pot
file=./`echo cs | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
translating et.po to et.gmo
/usr/bin/gmsgfmt: error while opening "pass2.tmp" for reading: No such file or directory
make[1]: *** [da.gmo] Error 1
make[1]: *** Waiting for unfinished jobs....
...updated homepage URL
/usr/bin/gmsgfmt: error while opening "pass2.tmp" for reading: No such file or directory
make[1]: *** [cs.gmo] Error 1
...updated homepage URL
pass1.tmp:6301: keyword "ons" unknown
pass1.tmp:6301:4: syntax error
pass1.tmp:6301: keyword "Screen" unknown
pass1.tmp:6301: keyword "this" unknown
pass1.tmp:6301: keyword "file" unknown
pass1.tmp:6301: keyword "will" unknown
pass1.tmp:6301: keyword "be" unknown
pass1.tmp:6301: keyword "completely" unknown
pass1.tmp:6301: keyword "rewritten" unknown
pass1.tmp:6301: keyword "n" unknown
pass1.tmp:6302: end-of-line within string
pass1.tmp:6320: duplicate message definition...
pass1.tmp:3181: ...this is the location of the first definition
pass1.tmp:6323: duplicate message definition...
pass1.tmp:3186: ...this is the location of the first definition
pass1.tmp:6326: duplicate message definition...
pass1.tmp:4904: ...this is the location of the first definition
pass1.tmp:6329: duplicate message definition...
pass1.tmp:4908: ...this is the location of the first definition
pass1.tmp:6332: duplicate message definition...
pass1.tmp:5155: ...this is the location of the first definition
msgmerge: found 16 fatal errors
...workaround without merging against ./lynx.pot
pass1.tmp:6301: keyword "ons" unknown
pass1.tmp:6301:4: syntax error
pass1.tmp:6301: keyword "Screen" unknown
pass1.tmp:6301: keyword "this" unknown
pass1.tmp:6301: keyword "file" unknown
pass1.tmp:6301: keyword "will" unknown
pass1.tmp:6301: keyword "be" unknown
pass1.tmp:6301: keyword "completely" unknown
pass1.tmp:6301: keyword "rewritten" unknown
pass1.tmp:6301: keyword "n" unknown
pass1.tmp:6302: end-of-line within string
pass1.tmp:6320: duplicate message definition...
pass1.tmp:3181: ...this is the location of the first definition
pass1.tmp:6323: duplicate message definition...
pass1.tmp:3186: ...this is the location of the first definition
pass1.tmp:6326: duplicate message definition...
pass1.tmp:4904: ...this is the location of the first definition
pass1.tmp:6329: duplicate message definition...
pass1.tmp:4908: ...this is the location of the first definition
pass1.tmp:6332: duplicate message definition...
pass1.tmp:5155: ...this is the location of the first definition
msgmerge: found 16 fatal errors
...workaround without merging against ./lynx.pot
file=./`echo et | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
file=./`echo eo | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
make[1]: Leaving directory `/var/tmp/portage/www-client/lynx-2.8.9_pre16/work/lynx2.8.9dev.16/po'
make: *** [all] Error 2
 * ERROR: www-client/lynx-2.8.9_pre16::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=www-client/lynx-2.8.9_pre16::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/lynx-2.8.9_pre16::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-client/lynx-2.8.9_pre16/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/lynx-2.8.9_pre16/temp/environment'.
 * Working directory: '/var/tmp/portage/www-client/lynx-2.8.9_pre16/work/lynx2.8.9dev.16'
 * S: '/var/tmp/portage/www-client/lynx-2.8.9_pre16/work/lynx2.8.9dev.16'
Comment 1 Kobboi 2017-07-13 09:22:07 UTC
Error message indicative of parallel build problem, and indeed, can be worked around by MAKEOPTS=-j1
Comment 2 Ulenrich 2017-07-13 17:00:39 UTC
Also here:
---
file=./`echo de | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
............................................................................................................................... done.
...merged against ./lynx.pot
file=./`echo en | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
/usr/bin/gmsgfmt: error while opening "pass2.tmp" for reading: No such file or directory
make[1]: *** [makefile:129: en.gmo] Error 1
----
I confirm the workaround using 
MAKEOPTS=-j1
worked through the compilation, 
thnx Kobboi
Comment 3 Juergen Rose 2017-07-15 17:43:42 UTC
(In reply to Kobboi from comment #1)
> Error message indicative of parallel build problem, and indeed, can be
> worked around by MAKEOPTS=-j1



Same here.
Comment 4 Ulenrich 2017-07-16 11:13:34 UTC
Created attachment 485078 [details, diff]
if_unicode_then_non_parallel_patch

patch for the ebuild to turn off parallel build if use
cjk or unicode
Comment 5 Fabian Groffen gentoo-dev 2017-07-16 15:06:55 UTC
confirming

po/makefile seems to use the same tmp files for all translations so non-parallel-safe

doing emake -j1 -C po prior to emake works for me.
Comment 6 Oleh 2017-07-17 03:19:21 UTC
just add MAKEOPTS="-j1" at compile phase. configure phase is always single threaded, anyway, so that patch not needed.
Comment 7 Martin von Gagern 2017-07-20 23:52:55 UTC
I seem to have gotten a partially written file:

file=./`echo de | sed 's,.*/,,'`.gmo \
  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
................................................................................
............................................................ done.
pass2.tmp:2056: end-of-file within string
/usr/bin/gmsgfmt: found 1 fatal error
make[1]: *** [makefile:129: de.gmo] Error 1

The rule in question reads like this:

.po.gmo:
        @echo "translating $< to $@"
        @$(SHELL) -c 'LC_ALL=C \
        sed     -e s,http://lynx.browser.org/,http://lynx.invisible-island.net/,g \
                -e s,http://lynx.isc.org/,http://lynx.invisible-island.net/,g $< >pass1.tmp;\
        if cmp -s $< pass1.tmp; \
        then \
                echo ...no change made to homepage URL; \
        else \
                echo ...updated homepage URL;\
        fi; \
        if $(MSGMERGE) -w 132 pass1.tmp $(srcdir)/$(PACKAGE).pot -o pass2.tmp; \
        then \
                echo "...merged against $(srcdir)/$(PACKAGE).pot";\
        else \
                echo "...workaround without merging against $(srcdir)/$(PACKAGE).pot";\
                cat  $< >pass2.tmp; \
        fi '
        file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
          && rm -f $$file && $(GMSGFMT) -o $$file pass2.tmp
        @-rm -f pass*.tmp

This is obviously not suited for concurrent execution, as the temporary files pass1.tmp and pass2.tmp are being reused. So even if there are no errors reported, the wrong content may end up in the wrong files. I'm not sure why all that merging and renaming is in there, shouldn't be required for a released version imo. But it could be made to work by using proper temportary files generated by tempfile.
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2017-07-25 13:01:20 UTC
> /bin/sh ./scripts/fixtext.sh ./LYMessages_en.h >LYMessages.c
> make  DESTDIR="" CC="x86_64-pc-linux-gnu-gcc" -C ./po
> make[1]: Entering directory '/var/tmp/portage/www-client/lynx-2.8.9_pre16/work/lynx2.8.9dev.16/po'
> msginit --no-translator -l en -i lynx.pot
> translating de.po to de.gmo
> ...updated homepage URL
> Created en.po.
> ...translating en.po to en.gmo
> ...........................................................................
> ......................... done.
> ...no change made to homepage URL
> ...merged against ./lynx.pot
> file=./`echo de | sed 's,.*/,,'`.gmo \
>   && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
> ...........................................................................
> ....... done.
> pass2.tmp:3764: end-of-file within string
> /usr/bin/gmsgfmt: found 1 fatal error
> make[1]: *** [makefile:129: de.gmo] Error 1
> make[1]: *** Waiting for unfinished jobs....
> ...merged against ./lynx.pot
> file=./`echo en | sed 's,.*/,,'`.gmo \
>   && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file pass2.tmp
> make[1]: Leaving directory '/var/tmp/portage/www-client/lynx-2.8.9_pre16/work/lynx2.8.9dev.16/po'
> make: *** [makefile:218: all] Error 2
>  * ERROR: www-client/lynx-2.8.9_pre16::gentoo failed (compile phase):
>  *   emake failed

I am not triggering this when emerging the whole package with MAKEOPTS=-j1
Comment 9 Tim Harder gentoo-dev 2017-09-03 17:17:16 UTC
Should be fixed now in the tree by first serially building the translation files and then parallelizing the rest of the build. If someone wants to rewrite the po file creation step so it works in parallel, feel free.