Created attachment 501632 [details] build.log media-gfx/sane-backends-1.0.27 fails to build with following error msg. Complete build.log attached. Generating sane.dvi from /var/tmp/portage/media-gfx/sane-backends-1.0.27/work/sane-backends-1.0.27/doc/sane.tex... Generating sane.pdf from /var/tmp/portage/media-gfx/sane-backends-1.0.27/work/sane-backends-1.0.27/doc/sane.tex... Generating sane.ps from sane.dvi... make[1]: *** [Makefile:989: sane.pdf] Error 1 make[1]: Leaving directory '/var/tmp/portage/media-gfx/sane-backends-1.0.27/work/sane-backends-1.0.27-abi_x86_64.amd64/doc' make: *** [Makefile:534: all-recursive] Error 1 * ERROR: media-gfx/sane-backends-1.0.27::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=media-gfx/sane-backends-1.0.27::gentoo'`, * the complete build log and the output of `emerge -pqv '=media-gfx/sane-backends-1.0.27::gentoo'`. * The complete build log is located at '/var/tmp/portage/media-gfx/sane-backends-1.0.27/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/media-gfx/sane-backends-1.0.27/temp/environment'. * Working directory: '/var/tmp/portage/media-gfx/sane-backends-1.0.27/work/sane-backends-1.0.27-abi_x86_64.amd64' * S: '/var/tmp/portage/media-gfx/sane-backends-1.0.27/work/sane-backends-1.0.27'
Portage 2.3.8 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.25-r8, 4.9.16-gentoo-3 x86_64) ================================================================= System uname: Linux-4.9.16-gentoo-3-x86_64-Intel-R-_Core-TM-_i7-3520M_CPU_@_2.90GHz-with-gentoo-2.4.1 KiB Mem: 8045252 total, 5357360 free KiB Swap: 2097148 total, 2096760 free Timestamp of repository gentoo: Tue, 31 Oct 2017 00:30:01 +0000 Head commit of repository gentoo: 334c26df69518ce5c6a2c9f9010218c51aa16705 sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1 app-shells/bash: 4.3_p48-r1::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.3::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo dev-util/cmake: 3.8.2::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.32.1::gentoo sys-apps/sandbox: 2.10-r4::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.28.1::gentoo sys-devel/gcc: 4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.25-r8::gentoo Repositories: gentoo location: /var/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/var/portage/distfiles" EMERGE_DEFAULT_OPTS="--ask --deep --tree --jobs --load-average=5" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildsyspkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="--jobs=8 --load-average=5" PKGDIR="/var/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl seccomp session spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Portage 2.3.8 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.25-r8, 4.9.16-gentoo-3 x86_64) ================================================================= System uname: Linux-4.9.16-gentoo-3-x86_64-Intel-R-_Core-TM-_i7-3520M_CPU_@_2.90GHz-with-gentoo-2.4.1 KiB Mem: 8045252 total, 5357360 free KiB Swap: 2097148 total, 2096760 free Timestamp of repository gentoo: Tue, 31 Oct 2017 00:30:01 +0000 Head commit of repository gentoo: 334c26df69518ce5c6a2c9f9010218c51aa16705 sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1 app-shells/bash: 4.3_p48-r1::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.3::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo dev-util/cmake: 3.8.2::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.32.1::gentoo sys-apps/sandbox: 2.10-r4::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.28.1::gentoo sys-devel/gcc: 4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.25-r8::gentoo Repositories: gentoo location: /var/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/var/portage/distfiles" EMERGE_DEFAULT_OPTS="--ask --deep --tree --jobs --load-average=5" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildsyspkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="--jobs=8 --load-average=5" PKGDIR="/var/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl seccomp session spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to Allan Gottlieb from comment #0) > Created attachment 501632 [details] > build.log > > media-gfx/sane-backends-1.0.27 fails to build with following error msg. > Complete build.log attached. > After failing for several days, it now builds fine on both my systems. I guess some update in the past week to another package is the cause. I run stable x86_64. I suggest closing the bug.
I still have this problem: Generating sane.dvi from /var/tmp/portage/media-gfx/sane-backends-1.0.27/work/sane-backends-1.0.27/doc/sane.tex... Generating manpage sane-kvs1025.5... Generating sane.pdf from /var/tmp/portage/media-gfx/sane-backends-1.0.27/work/sane-backends-1.0.27/doc/sane.tex... Generating manpage sane-ricoh.5... make[1]: *** [Makefile:989: sane.pdf] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/var/tmp/portage/media-gfx/sane-backends-1.0.27/work/sane-backends-1.0.27-abi_x86_32.x86/doc' make: *** [Makefile:534: all-recursive] Error 1 * ERROR: media-gfx/sane-backends-1.0.27::gentoo failed (compile phase): * emake failed *
This seems to be because the makefile runs LaTeX several times to generate various output formats for the same source document, and Gentoo's usual practice of running make with -j4 (or some other number of parallel jobs) means that these LaTeX jobs are run in parallel. Each of them reads and writes the file "sane.aux" in the same directory, thinking it's the only one doing so, where really the jobs are stomping all over each other. So a fix is to run MAKEOPTS=-j1 emerge sane-backends A permanent fix, I suppose, is to add MAKEOPTS=-j1 to the ebuild.
I see the same problem during emerge -e @world (for Gentoo-17) Also MAKEOPTS=-j1 emerge -1 sane-backends does fix this.
I found this problem (and workaround) too. Is it possible to disable -jX for the docs generation in Gentoo's ebuild? Regards, Robert Wolf.
(In reply to Robert Wolf from comment #6) > I found this problem (and workaround) too. Is it possible to disable -jX for > the docs generation in Gentoo's ebuild? > > Regards, > > Robert Wolf. Or is this upstream bug? Robert.
Hello all, user Hu has reported in Gentoo Forums for this problem following: ================================================== It is an upstream bug. Failure to build in parallel is a fairly common problem with handwritten makefiles, but it is always a bug if parallel build fails and sequential build succeeds. If the makefile were written correctly, make would automatically serialize jobs where necessary. In this case, upstream failed to inform make that these jobs cannot run in parallel and failed to take any measures to enable parallel builds to succeed (such as by not using the same filenames for multiple jobs). Forcing -j1 is a commonly used hack in the Gentoo ebuilds when neither the Gentoo maintainer nor the upstream project have the time and expertise to resolve the problem properly. Ideally, you should never see any ebuild pass -j1 to make because every Makefile ought to specify its dependencies completely, at which point it is parallel safe (though it may not run in parallel, depending on how the dependencies come out). ================================================== So I have reported this problem to upstream as [#315937] sane-backends docs (sane.dvi+sane.pdf) compilation fails if using parallel building -j 2 or more (https://alioth.debian.org/tracker/?group_id=30186&atid=410366&func=detail&aid=315937). Solution is to add .NOTPARALLEL: target to doc/Makefile. Could maybe some Gentoo developer update the sane-backends ebuild and add the patch to add .NOTPARALLEL target to doc/Makefile.in? The patch is simple, I have attached my local test patch. With this patch the sane-backends doc compile correctly with -j X option with X>1 (tested with -j 4). Thank you for including patch. Regards, Robert Wolf.
Created attachment 521240 [details] Add .NOTPARALLEL: target to doc/Makefile.in
(In reply to Robert Wolf from comment #9) > Created attachment 521240 [details] > Add .NOTPARALLEL: target to doc/Makefile.in The patch would need to apply to doc/Makefile.am, not .in (.in will be regenerated by autoreconf) Thanks
What's the status of this? I took the liberty of posting your patch, Robert Wolf, upstream for inclusion: https://alioth.debian.org/tracker/?group_id=30186&atid=410366&func=detail&aid=315937
Yes, Robert Wolf's patch fixes it for me on CHOST="x86_64-pc-linux-gnu". Thanks.
Hi all, you can use my patch, of course. But Hu from the forum thinks, the .NOTPARALLEL is not correct solution: https://forums.gentoo.org/viewtopic.php?p=8189852#8189852 The collision between two *latex commands should be solved somehow correctly. .NOTPARALLEL is quick workaround, but I am no developer, so I am not sure, how it should be solved correctly. Regards, Robert Wolf.
I have the same problem. Changing MAKEOPTS to -j1 worked.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4a4aa9c04d755547aa82b881499fd7a6172bfc9 commit b4a4aa9c04d755547aa82b881499fd7a6172bfc9 Author: Pacho Ramos <pacho@gentoo.org> AuthorDate: 2018-10-20 15:11:29 +0000 Commit: Pacho Ramos <pacho@gentoo.org> CommitDate: 2018-10-20 16:35:31 +0000 media-gfx/sane-backends: Fixes from Fedora and Debian... They fix an important bug with Samsung devices not being properly recognized and noises in some devices. We also start disabling locking as all the other distributions and stop trying to randomly generate extra documentation files that are not really needed and add a lot of hidden dependencies tend to break in several ways. Closes: https://bugs.gentoo.org/636202 Closes: https://bugs.gentoo.org/653300 Closes: https://bugs.gentoo.org/668232 Closes: https://bugs.gentoo.org/668350 Signed-off-by: Pacho Ramos <pacho@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 .../sane-backends-1.0.27-revert-samsung.patch | 406 +++++++++++++++++++++ ...ne-backends-1.0.27-uninitialized-variable.patch | 25 ++ .../sane-backends/sane-backends-1.0.27-r2.ebuild | 344 +++++++++++++++++ 3 files changed, 775 insertions(+)