Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59139 - apmd-3.0.2-r3 bails against gcc 3.4.1
Summary: apmd-3.0.2-r3 bails against gcc 3.4.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-02 06:37 UTC by Rav
Modified: 2004-09-16 09:16 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rav 2004-08-02 06:37:04 UTC
apmd-3.0.2-r3 fails to compile with gcc 3.4.1

gcc --version
gcc (GCC) 3.4.1  (Gentoo Linux 3.4.1-r1, ssp-3.4-2, pie-8.7.6.3)

---- Error as follows ----
gcc -c  -march=athlon-xp -O3 -pipe -fomit-frame-pointer -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.2\" -DAPMD_PROXY_NAME=\"/etc/apm/apmd_proxy\" apmd.c
apmd.c: In function `apmd_call_proxy':
apmd.c:245: error: parse error before string constant
apmd.c:245: warning: left-hand operand of comma expression has no effect
apmd.c:245: error: parse error before ')' token
apmd.c:328: error: parse error before string constant
apmd.c:328: warning: left-hand operand of comma expression has no effect
apmd.c:328: error: parse error before ')' token
apmd.c:332: error: parse error before string constant
apmd.c:332: warning: left-hand operand of comma expression has no effect
apmd.c:332: warning: left-hand operand of comma expression has no effect
apmd.c:332: error: parse error before ')' token
apmd.c:357: error: parse error before string constant
apmd.c:357: warning: left-hand operand of comma expression has no effect
apmd.c:357: error: parse error before ')' token
apmd.c:374: error: parse error before string constant
apmd.c:374: warning: left-hand operand of comma expression has no effect
apmd.c:374: error: parse error before ')' token
apmd.c:382: error: parse error before string constant
apmd.c:382: warning: left-hand operand of comma expression has no effect
apmd.c:382: error: parse error before ')' token
apmd.c:394: error: parse error before string constant
apmd.c:394: warning: left-hand operand of comma expression has no effect
apmd.c:394: error: parse error before ')' token
apmd.c:402: error: parse error before string constant
apmd.c:402: warning: left-hand operand of comma expression has no effect
apmd.c:402: warning: left-hand operand of comma expression has no effect
apmd.c:402: error: parse error before ')' token
apmd.c:408: error: parse error before string constant
apmd.c:408: warning: left-hand operand of comma expression has no effect
apmd.c:408: warning: left-hand operand of comma expression has no effect
apmd.c:408: error: parse error before ')' token
apmd.c: In function `apmd_power_reset':
apmd.c:426: error: parse error before string constant
apmd.c:426: warning: left-hand operand of comma expression has no effect
apmd.c:426: error: parse error before ')' token
apmd.c: In function `apmd_suspend':
apmd.c:463: error: parse error before string constant
apmd.c:463: warning: left-hand operand of comma expression has no effect
apmd.c:463: error: parse error before ')' token
apmd.c: In function `apmd_standby':
apmd.c:497: error: parse error before string constant
apmd.c:497: warning: left-hand operand of comma expression has no effect
apmd.c:497: error: parse error before ')' token
apmd.c: In function `apmd_resume':
apmd.c:532: error: parse error before string constant
apmd.c:532: warning: left-hand operand of comma expression has no effect
apmd.c:532: error: parse error before ')' token
apmd.c: In function `apmd_low_battery':
apmd.c:593: error: parse error before string constant
apmd.c:593: warning: left-hand operand of comma expression has no effect
apmd.c:593: error: parse error before ')' token
apmd.c: In function `apmd_check_power':
apmd.c:612: error: parse error before string constant
apmd.c:612: warning: left-hand operand of comma expression has no effect
apmd.c:612: error: parse error before ')' token
apmd.c: In function `main':
apmd.c:959: error: parse error before string constant
apmd.c:959: warning: left-hand operand of comma expression has no effect
apmd.c:959: error: parse error before ')' token
make: *** [apmd.o] Error 1
rm apm.o
--------------------------

The error occurs due to the ADEBUG macro.

---- from apmd.c ----
#define APM_TRACE 1	/* enable to compile in debug tracing */


#ifdef APM_TRACE
#define ADEBUG(lev,args...) \
    if (APM_TRACE>=lev) syslog(LOG_DEBUG, __FUNCTION__ ": " args)
#else
#define ADEBUG(args...)
#endif
---------------------

Patch located here:
http://svn.rocklinux-consulting.de/rock-linux/trunk/package/x86/apmd/gcc34.patch
appears to fix the problem.
Comment 1 Robin Smidsrød 2004-08-18 05:03:40 UTC
I also have this problem. I'll test the patch when my world rebuild is finished (a day or two).

Added emerge info under:

Gentoo Base System version 1.4.16
Portage 2.0.50-r9 (gcc34-x86-2004.2, gcc-3.4.1, glibc-2.3.4.20040808-r0, 2.6.7)
=================================================================
System uname: 2.6.7 i686 Intel(R) Pentium(R) M processor 1700MHz
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium-m -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium-m -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo http://ftp.linux.ee/pub/gentoo/distfiles/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X X509 aalib accessibility acl acpi alsa apm arts avi berkdb bluetooth cdr crypt cups curl dga divx4linux doc dts dvd dvdr encode esd faac faad firebird flac foomaticdb gdbm gif gimpprint gnome gphoto2 gpm gstreamer gtk gtkhtml icc icc-pgo idea imlib innodb irda jack java jbig jpeg kde kerberos lcms ldap libg++ libwww mad mailwrapper matroska md5sum mikmod mmx mng motif mozilla mpeg mysql ncurses nls nptl oav odbc oggvorbis opengl oss pam pda pdflib perl pic png pnp postgres ppds pwdb python qt quicktime readline samba sasl scanner sdl skey slang slp snmp socks5 speex spell sse ssl tcltk tcpd theora threads tiff truetype trusted usb v4l v4l2 wifi wmf x86 xinerama xml2 xmms xosd xprint xv xvid zlib"

Comment 2 Mart Raudsepp gentoo-dev 2004-08-22 13:00:31 UTC
apmd-3.2.1_p4 compiled fine for me.
There is also some patch lying around at
http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/daemons/apmd/apmd-3.0.2.patch.diff?r1=1.1&r2=1.2
for archlinux' apmd-3.0.2
Comment 3 Travis Tilley (RETIRED) gentoo-dev 2004-09-02 03:45:41 UTC
apmd compiles here without problem, but the latest stable version on amd64 is 3.2.1_p4.

x86 and ppc, any reason not to mark 3.2.1_p4 stable on your archs?
Comment 4 Lars Weiler (RETIRED) gentoo-dev 2004-09-02 17:55:14 UTC
The latest version compiles on my ppc with gcc-3.4, though it is quite useful as we use pmu (and pbbuttonsd) on these machines.  Nevertheless made stable if somebody has use for it.
Comment 5 Lars Weiler (RETIRED) gentoo-dev 2004-09-02 18:13:06 UTC
Too late in the night...

s/though it is quite useful/though it is not quite useful/
Comment 6 Olivier Crete (RETIRED) gentoo-dev 2004-09-11 12:06:38 UTC
What does the mobile herd think? Its still their package.. 
Comment 7 Olivier Crete (RETIRED) gentoo-dev 2004-09-16 09:16:48 UTC
I've been testing it for 2 weeks, had no problems with it.. and since mobile@ doesnt seem to care.. I'm marking stable and closing bug..