emake failed Reproducible: Always Actual Results: emerge fails compiling package Expected Results: Should compile >>> Source configured. >>> Compiling source in /var/tmp/portage/net-misc/rsync-3.2.3/work/rsync-3.2.3 ... make -j3 gawk -f ./daemon-parm.awk ./daemon-parm.txt gawk -f ./help-from-md.awk -v hfile=help-rsync.h ./rsync.1.md gawk -f ./help-from-md.awk -v hfile=help-rsyncd.h ./rsync.1.md ./mkgitver gawk -f ./define-from-md.awk -v hfile=default-cvsignore.h ./rsync.1.md gawk -f ./define-from-md.awk -v hfile=default-dont-compress.h ./rsync.1.md sed 's;\@bindir\@;/usr/bin;g' <./stunnel-rsyncd.conf.in >stunnel-rsyncd.conf cp: no se puede efectuar `stat' sobre './proto.h': No existe el fichero o el directorio make: *** [Makefile:237: proto.h] Error 1 make: *** Se espera a que terminen otras tareas.... * ERROR: net-misc/rsync-3.2.3::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=net-misc/rsync-3.2.3::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-misc/rsync-3.2.3::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-misc/rsync-3.2.3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-misc/rsync-3.2.3/temp/environment'. * Working directory: '/var/tmp/portage/net-misc/rsync-3.2.3/work/rsync-3.2.3' * S: '/var/tmp/portage/net-misc/rsync-3.2.3/work/rsync-3.2.3' >>> Failed to emerge net-misc/rsync-3.2.3, Log file: >>> '/var/tmp/portage/net-misc/rsync-3.2.3/temp/build.log' * Messages for package net-misc/rsync-3.2.3: * ERROR: net-misc/rsync-3.2.3::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=net-misc/rsync-3.2.3::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-misc/rsync-3.2.3::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-misc/rsync-3.2.3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-misc/rsync-3.2.3/temp/environment'. * Working directory: '/var/tmp/portage/net-misc/rsync-3.2.3/w
Created attachment 656210 [details] generated with emerge --info
Please supply the full build.log with LANG=C for English so we can fully understand the error(s).
I tried with # export LANG=C | emerge net-misc/rsync and worked OK. Without the export LANG=C it fails. The error says that it dont fint the ./proto.h file cp: no se puede efectuar `stat' sobre './proto.h': No existe el fichero o el directorio make: *** [Makefile:237: proto.h] Error 1 (cp: cannot do 'stat' over './proto.h': the file or directory don't exist)
(In reply to Francisco Lloret from comment #3) > I tried with > > # export LANG=C | emerge net-misc/rsync > > and worked OK. Without the export LANG=C it fails. > That's interesting! Can you attach tbe full build.log from when it fails too?
After some tries, I found thet is working (or not) depending emerge net-misc/rsync -> Failed (several times) export LANG=C | emerge net-misc/rsync -> Worked OK export LANG=EN | emerge net-misc/rsync -> Worked OK export LANG=ES | emerge net-misc/rsync -> Worked OK emerge net-misc/rsync -> Worked OK exit root session with exit. new root session with su - emerge net-misc/rsync -> Failed export LANG=es_ES.UTF-8 | emerge net-misc/rsync worked OK emerge net-misc/rsync -> Failed export LANG=ES | emerge net-misc/rsync -> Worked OK emerge net-misc/rsync -> Worked OK This is the LANG set in system: # set |grep LANG LANG=es_ES.UTF-8 Any idea?
Created attachment 656320 [details] rsync build log
Attached build log.
I'm getting a similar error. My default LANG is US_en.utf8, but I also tried setting it to "C". >>> Source configured. >>> Compiling source in /var/tmp/portage/net-misc/rsync-3.2.3/work/rsync-3.2.3 ... make -j5 -l4 gawk -f ./daemon-parm.awk ./daemon-parm.txt gawk -f ./help-from-md.awk -v hfile=help-rsync.h ./rsync.1.md gawk -f ./help-from-md.awk -v hfile=help-rsyncd.h ./rsync.1.md ./mkgitver gawk -f ./define-from-md.awk -v hfile=default-cvsignore.h ./rsync.1.md gawk -f ./define-from-md.awk -v hfile=default-dont-compress.h ./rsync.1.md sed 's;\@bindir\@;/usr/bin;g' <./stunnel-rsyncd.conf.in >stunnel-rsyncd.conf cp: cannot stat './proto.h': No such file or directory make: *** [Makefile:237: proto.h] Error 1 make: *** Waiting for unfinished jobs.... * ERROR: net-misc/rsync-3.2.3::gentoo failed (compile phase): * emake failed
It's probably be a parallel make problem. Try building with MAKEOPTS=-j1.
Also having en_US.UTF-8 and it also fails with the same error. Tried setting MAKEOPTS=-j1 but it didn't help. I've disabled acl flag. This works but i don't want to keep it like that. I also don't want to move away from en_US.UTF-8.
Is rsync-3.2.2-r1 working for you?
Yes rsync-3.2.2-r1 is working as expected with ACL or not.
I also tried with MAKEOPTS set -j1, and still the same error: cp: cannot stat './proto.h': No such file or directory The previous version (3.2.2-r1) builds without problem.
I'mt testing in a musl x86 installation. The problem happens when the LANG enviromental variable is set, with a locale that isn't two-character defined. LANG=C emerge -u1 rsync -> Failed LANG=es_MX.utf8 -u1 rsync -> Failed LANG=es -> OK The problem is located in the Makefile at the following lines: .PHONY: proto proto: proto.h-tstamp proto.h: proto.h-tstamp @if test -f proto.h; then :; else cp -p $(srcdir)/proto.h .; fi proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h $(AWK) -f $(srcdir)/mkproto.awk $(srcdir)/*.c $(srcdir)/lib/compat.c daemon-parm.h With the "wrong" locale, the rule proto.h-tstamp doesn't execute the awk command and the proto.h include file isn't generated. I still don't understand why it happens. As a workaround, I add the following src_compile() function to the ebuild: src_compile() { rm -f proto.h-tstamp && emake } That change allows to compile and install rsync, regardless of the LANG setting.
Any chance this is related to bug #421625 maybe? We already have a line in the ebuild that runs "touch proto.h-tstamp" which stems from that bug.
*** Bug 739158 has been marked as a duplicate of this bug. ***
I can confirm that export 'LANG=C | emerge -v1 net-misc/rsync' merges rsync just fine.
After updating another machine, i ran into the same issue. It has the very same locales and overall setup but for some reason, one machine compiles rsync (just without ACL flag) and the other one does not. Since i've never changed my locales to anything other then en_US.utf8, i wonder if there is any side effect if i run 'LANG=C | emerge -v1 net-misc/rsync'?
There was a typo in my comment. The correct command was 'export LANG=C | emerge -v1 net-misc/rsync' This should redefine LANG for a current session only, as far as I understand it.
my locale is en_US.UTF-8 $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= I have tried: export LANG=C; emerge -v net-misc/rsync # not work MAKEOPTS=-j1 emerge -v net-misc/rsync # not work export LANG="C"; MAKEOPTS=-j1 emerge -v net-misc/rsync # not work export LANG="en_US.UTF-8"; MAKEOPTS=-j1 emerge -v net-misc/rsync # OK !!! So strange...
Is your system (@world) fully up to date or are we talking about systems where only selected packages will get updated?
My systems are updated at least every other week. I am not hand picking packages for updates. After running updates on a number of machines now, i've figured this: Some of my systems run through this version without any issue. Some others break over this error and 2 of them go through without ACL flag while others don't without ACL or not. I also tried and played around with the latest suggestion and found something else: export LANG="en_US.UTF-8"; MAKEOPTS=-j1 emerge -1 net-misc/rsync # breaks export LANG="en_US.UTF-8"; MAKEOPTS=-j1 emerge -v net-misc/rsync # OK !!! But even this is not the same on all the systems i've tested. I have at least two system (not tested all of them) where the shown behaviour is exactly the opposite. I have a hard time making any sense of it.
I ran into this again, when i was about to set up a system using some automation. It made me figure why i couldn't make anything out of the situation i had on real systems as this bug seems to appear kinda randomly. When i try to rerun the building a system, it works once and then it fails with the exact same building configuration the next time (the process is scripted). In order to get through, it needs me redoing the process like 3 or 4 times in row. It also might work 2 or 3 times in row while braking again the next. For some reason i still need to set the LANG and MAKEOPTS like this: export LANG="en_US.UTF-8"; MAKEOPTS=-j1 emerge net-misc/rsync If anyone runs into this, it might help to retry a couple times.
This also happens to me every time I do an update world that includes net-misc/rsync My current locale is en_IE.utf8, setting it to C for the merge fixes it: LC_ALL=C sudo -E emerge -1 net-misc/rsync
Please tell us how to reproduce using a clean stage3.
I had the same thing pop up today after I decided to rebuild my working system (I do this after the major compilers update (in this case LLVM 9.0.1 to 10.0.1 -- 10.0.0 broke a number of my tools and I masked it). I was able to get it to work by adding: =net-misc/rsync-3.2.3 LANG=C to /etc/portage/package.use/rsync, and then I recompiled just fine. I had also tried setting MAKEOPTS to "-j1" at the same time, so I slowly back things out to make sure what was working. The really weird thing is that I backed all of this out and sometimes it compiled, and sometimes it did not. As odd as this sounds try simply rerunning emerge a couple of times and see if it will compile. It looks like there is some race condition, or other intermittent issue, and the same setup sometimes compiles and not other times. Not sure how to suggest moving forward as these kinds of bugs are always a pain to track down. Also, rsync-3.2.3 is currently the only version in the tree, so I was not able to revert and test without creating my own mini-repository. I will restart my emerge -e world and let folks now if I cannot trick it to rebuild, but that is my current plan. Hopes this helps.
There is a net-misc/rsync-3.2.3-r1 now with the exact same issue. I've just stumbled across during an update. I've manage to fix this issue for me after going throught the entire list of comments again. It was posted here earlier already and i've tried it: src_compile() { rm -f proto.h-tstamp && emake } If you add this to a local copy of the ebuild, it will compile without an issue but i am not sure about the impact.
I have LANG=C.utf8 and get the same error with net-misc/rsync-3.2.3-r1. export LANG=C followed by emerge rsync did not solve the issue for me. But for some strange reason export LANG=C | emerge net-misc/rsync worked.
Use flags: acl iconv ssl xattr -examples -ipv6 -libressl -lz4 -stunnel -system-zlib -xxhash -zstd CPU_FLAGS_X86="sse2"
This is probably a race condition in the build system. I doubt the LANG setting actually has anything to do with it. You might try running emerge with MAKEOPTS="-j1" as a workaround.
MAKEOPTS="-j1" solved the problem here.
+1 for race condition. The first two tries failed, the third try worked as expected without changing anything at the system.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9b6dedccd92d42f526a74873d8f0da9a403f1b4 commit f9b6dedccd92d42f526a74873d8f0da9a403f1b4 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2020-10-25 17:07:26 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-10-25 17:07:26 +0000 net-misc/rsync: remove workaround for bug 421625 mkproto was rewritten in awk, so calling perl is no longer a concern. This may also resolve a parallel make race condition. Bug: https://bugs.gentoo.org/421625 Closes: https://bugs.gentoo.org/738606 Signed-off-by: Mike Gilbert <floppym@gentoo.org> net-misc/rsync/rsync-3.2.3-r1.ebuild | 1 - net-misc/rsync/rsync-9999.ebuild | 1 - 2 files changed, 2 deletions(-)