Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 159108 - emerge =sys-power/apcupsd-3.12.4 fails
Summary: emerge =sys-power/apcupsd-3.12.4 fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Michael Imhof (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-25 20:20 UTC by Elvis Pranskevichus
Modified: 2006-12-26 13:51 UTC (History)
2 users (show)

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


Attachments
Fixed version of exit-status-build.patch (exit-status-build.patch,454 bytes, patch)
2006-12-26 09:57 UTC, Elvis Pranskevichus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elvis Pranskevichus 2006-12-25 20:20:03 UTC
emerge =sys-power/apcupsd-3.12.4 fails with the following error:

gmake[3]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/usb'
gmake[4]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/usb/linux'
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include -I..  linux-usb.c
ar rc libpusb.a linux-usb.o
/usr/bin/ranlib libpusb.a
gmake[4]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/usb/linux'
gmake[3]: *** [all-subdirs] Error 1
gmake[3]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/usb'
gmake[2]: *** [all-subdirs] Error 1
gmake[2]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers'
gmake[1]: *** [all-subdirs] Error 1
gmake[1]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src'
make: *** [all-subdirs] Error 1

!!! ERROR: sys-power/apcupsd-3.12.4 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  apcupsd-3.12.4.ebuild, line 67:   Called die


Tried to emerge with different CFLAGS and on two different boxes. The kernel is gentoo-2.6.19-r2.


emerge --info:

Portage 2.1.1-r2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.19-gentoo-r2 i686)
=================================================================
System uname: 2.6.19-gentoo-r2 i686 Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz
Gentoo Base System version 1.12.6
Last Sync: Mon, 25 Dec 2006 22:30:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe -fomit-frame-pointer -fno-ident -momit-leaf-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=nocona -pipe -fomit-frame-pointer -fno-ident -momit-leaf-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_CA.utf8"
LC_ALL="en_CA.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/portage-my"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac acpi aiglx alsa alsa_cards_intel8x0 alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol asf authdaemond bash-completion berkdb bitmap-fonts bzip2 cairo cdr chm cli cracklib crypt cups dbus divx djvu dlloader dri dvd dvdr dvdread eds elibc_glibc emboss encode exif firefox foomaticdb gdbm gif gpm hal iconv imlib input_devices_keyboard input_devices_mouse isdnlog jpeg kde kdeenablefinal kdehiddenvisibility kernel_linux libg++ linguas_en logrotate mad mikmod mmx mozilla mp3 mpeg mplayer ncurses nls nptl nptlonly nsplugin ogg opengl pam pcre pdf perl png ppds pppd python qt3 quicktime readline reflection sasl scanner sdl session slang spell spl sse sse2 sse3 ssl svg sysfs syslog tcpd threads tiff truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_i810 vorbis win32codecs xcomposite xine xml xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-12-26 03:17:50 UTC
(In reply to comment #0)
> emerge =sys-power/apcupsd-3.12.4 fails with the following error:

This is not useful; `MAKEOPTS="-j1" emerge =sys-power/apcupsd-3.12.4` and post the real error.
Comment 2 Elvis Pranskevichus 2006-12-26 09:00:57 UTC
I don't know what you mean by the real error, but

MAKEOPTS="-j1" CFLAGS="-O2" emerge -1 "=sys-power/apcupsd-3.12.4"

Configuration on Tue Dec 26 12:00:09 EST 2006:

  Host:                       i686-pc-linux-gnu -- gentoo 1.12.6
  Apcupsd version:            3.12.4 (19 August 2006)
  Source code location:       .
  Install binaries:           /sbin
  Install config files:       /etc/apcupsd
  Install man files:          /usr/share/man
  Nologin file in:            /etc
  PID directory:              /var/run
  LOG dir (events, status)    /var/log
  LOCK dir (for serial port)  /var/lock
  Power Fail dir              /etc/apcupsd
  Compiler:                   /usr/bin/g++ 4.1.1
  Compiler flags:             -O2 -Wall
  Linker flags:                -Wl,-O1
  Host and version:           gentoo 1.12.6
  Shutdown Program:           /sbin/shutdown
  Port/Device:                /dev/ttyS0
  Network Info Port (CGI):    3551
  Master/slave Port:          6666
  UPSTYPE                     usb
  UPSCABLE                    usb

  drivers (no-* are disabled): apcsmart dumb net usb no-snmp no-test

  enable-master-slave:        yes
  enable-nis:                 yes
  with-nisip:                 0.0.0.0
  enable-cgi:                 no
  with-cgi-bin:               /etc/apcupsd
  with-libwrap:
  enable-nls:                 yes
  enable-libintl:             no
  enable-powerflute:          yes
  enable-pthreads:            yes
  enable-dist-install:        yes

gmake[1]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src'
gmake[2]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/lib'
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apcconfig.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apcerror.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apcevents.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apcexec.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apcfile.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apclibnis.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apclock.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apclog.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apcsignal.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   apcstatus.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   asys.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   newups.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   wincompat.c
ar rc libapc.a apcconfig.o apcerror.o apcevents.o apcexec.o apcfile.o apclibnis.o apclock.o apclog.o apcsignal.o apcstatus.o asys.o newups.o wincompat.o
/usr/bin/ranlib libapc.a
gmake[2]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/lib'
gmake[2]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers'
gmake[3]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/apcsmart'
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   smartoper.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   smartsetup.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   smarteeprom.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   smartsetup2.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   smart.c
ar rc libapcsmart.a smartoper.o smartsetup.o smarteeprom.o smartsetup2.o smart.o
/usr/bin/ranlib libapcsmart.a
gmake[3]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/apcsmart'
gmake[3]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/dumb'
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   dumboper.c
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   dumbsetup.c
ar rc libdumb.a dumboper.o dumbsetup.o
/usr/bin/ranlib libdumb.a
gmake[3]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/dumb'
gmake[3]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/net'
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include   net.c
ar rc libnet.a net.o
/usr/bin/ranlib libnet.a
gmake[3]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/net'
gmake[3]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/usb'
gmake[4]: Entering directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/usb/linux'
/usr/bin/g++ -c -fno-exceptions -fno-rtti -O2 -Wall   -I/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/include -I..  linux-usb.c
ar rc libpusb.a linux-usb.o
/usr/bin/ranlib libpusb.a
gmake[4]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/usb/linux'
gmake[3]: *** [all-subdirs] Error 1
gmake[3]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers/usb'
gmake[2]: *** [all-subdirs] Error 1
gmake[2]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src/drivers'
gmake[1]: *** [all-subdirs] Error 1
gmake[1]: Leaving directory `/var/tmp/portage/apcupsd-3.12.4/work/apcupsd-3.12.4/src'
make: *** [all-subdirs] Error 1

!!! ERROR: sys-power/apcupsd-3.12.4 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  apcupsd-3.12.4.ebuild, line 67:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
Comment 3 Quentin Smith 2006-12-26 09:05:43 UTC
I, too, am having exactly the same problem building apcupsd-3.12.4. make never prints an error, it just erroneously thinks all-subdirs in src/drivers/usb failed. I was able to get apcupsd to compile by removing exit-status-build.patch from the list of patches applied to the source; that does, however, break exit status reporting, so if the build fails, emerge never finds out.
Comment 4 Elvis Pranskevichus 2006-12-26 09:50:43 UTC
The problem is in all-subdirs target.

all-subdirs:
        @if test ! x"$(subdirs)" = x; then \
            for file in . ${subdirs}; \
            do \
                (cd $$file && if test "$$file" != "."; then $(MAKE) DESTDIR=$(DESTDIR) all; fi); \
                  test "$$?" != "0" && exit 1 ; \
            done; \
        fi

Note the test "$$?" != "0" && exit 1 ;. If the exit status of make is 0, then the test fails and if the subdir is the last in the list the whole target fails. We should reset exit status if there was no error, something like 

for file in . ${subdirs}; \
do \
  (cd $$file && if test "$$file" != "."; then $(MAKE) DESTDIR=$(DESTDIR) all; fi); \
  test "$$?" != "0" && exit 1 ; \
  echo "Ok"; \
done; \

echo resets target exit status to "0" and everything works fine.
Comment 5 Elvis Pranskevichus 2006-12-26 09:57:01 UTC
Created attachment 104759 [details, diff]
Fixed version of exit-status-build.patch
Comment 6 SpanKY gentoo-dev 2006-12-26 13:51:31 UTC
i just added the patch i sent upstream rather