<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>59139</bug_id>
          
          <creation_ts>2004-08-02 06:37 0000</creation_ts>
          <short_desc>apmd-3.0.2-r3 bails against gcc 3.4.1</short_desc>
          <delta_ts>2004-09-16 09:16:48 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>reen@otakumail.com</reporter>
          <assigned_to>gcc-porting@gentoo.org</assigned_to>
          <cc>mobile@gentoo.org</cc>
    
    <cc>robin@smidsrod.no</cc>

      

      
          <long_desc isprivate="0">
            <who>reen@otakumail.com</who>
            <bug_when>2004-08-02 06:37:04 0000</bug_when>
            <thetext>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=\&quot;3.0.2\&quot; -DAPMD_PROXY_NAME=\&quot;/etc/apm/apmd_proxy\&quot; apmd.c
apmd.c: In function `apmd_call_proxy&apos;:
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 &apos;)&apos; 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 &apos;)&apos; 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 &apos;)&apos; 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 &apos;)&apos; 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 &apos;)&apos; 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 &apos;)&apos; 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 &apos;)&apos; 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 &apos;)&apos; 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 &apos;)&apos; token
apmd.c: In function `apmd_power_reset&apos;:
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 &apos;)&apos; token
apmd.c: In function `apmd_suspend&apos;:
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 &apos;)&apos; token
apmd.c: In function `apmd_standby&apos;:
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 &apos;)&apos; token
apmd.c: In function `apmd_resume&apos;:
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 &apos;)&apos; token
apmd.c: In function `apmd_low_battery&apos;:
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 &apos;)&apos; token
apmd.c: In function `apmd_check_power&apos;:
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 &apos;)&apos; token
apmd.c: In function `main&apos;:
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 &apos;)&apos; 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&gt;=lev) syslog(LOG_DEBUG, __FUNCTION__ &quot;: &quot; 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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robin@smidsrod.no</who>
            <bug_when>2004-08-18 05:03:40 0000</bug_when>
            <thetext>I also have this problem. I&apos;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=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-march=pentium-m -O2 -fomit-frame-pointer -pipe&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
COMPILER=&quot;gcc3&quot;
CONFIG_PROTECT=&quot;/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&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-march=pentium-m -O2 -fomit-frame-pointer -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs ccache sandbox&quot;
GENTOO_MIRRORS=&quot;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/&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;&quot;
SYNC=&quot;rsync://rsync.europe.gentoo.org/gentoo-portage&quot;
USE=&quot;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&quot;

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>leio@gentoo.org</who>
            <bug_when>2004-08-22 13:00:31 0000</bug_when>
            <thetext>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&amp;r2=1.2
for archlinux&apos; apmd-3.0.2
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lv@gentoo.org</who>
            <bug_when>2004-09-02 03:45:41 0000</bug_when>
            <thetext>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?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pylon@gentoo.org</who>
            <bug_when>2004-09-02 17:55:14 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pylon@gentoo.org</who>
            <bug_when>2004-09-02 18:13:06 0000</bug_when>
            <thetext>Too late in the night...

s/though it is quite useful/though it is not quite useful/</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tester@gentoo.org</who>
            <bug_when>2004-09-11 12:06:38 0000</bug_when>
            <thetext>What does the mobile herd think? Its still their package.. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tester@gentoo.org</who>
            <bug_when>2004-09-16 09:16:48 0000</bug_when>
            <thetext>I&apos;ve been testing it for 2 weeks, had no problems with it.. and since mobile@ doesnt seem to care.. I&apos;m marking stable and closing bug.. </thetext>
          </long_desc>
      
    </bug>

</bugzilla>