#20 kwave ftbfs on amd64 with gcc4

compiling (22)
Stephan Hermann


as u can read in the subject, on amd64 only kwave 0.7.3
is ftbfsing.

here the error:

x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I..
-I/usr/include/kde -I/usr/share/qt3/include -I.
-pthread -I/usr/include -I/usr/include/glib-2.0
-I/usr/include/kde/arts -I/usr/include/kde/artsc
-I/usr/lib/glib-2.0/include -I ../libaudiofile
-Wchar-subscripts -Wshadow -Wpointer-arith
-Wmissing-prototypes -Wwrite-strings
-Wformat-security -Wmissing-format-attribute -MT
cputest.lo -MD -MP -MF .deps/cputest.Tpo -c cputest.c
-fPIC -DPIC -o .libs/cputest.o
{standard input}: Assembler messages:
{standard input}:10: Error: suffix or operands invalid
for pop' {standard input}:13: Error: suffix or operands invalid forpush'
{standard input}:16: Error: suffix or operands invalid
for pop' make[3]: *** [cputest.lo] Error 1 make[3]: Leaving directory/build/buildd/kwave-0.7.3/libkwave'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/build/buildd/kwave-0.7.3'

The following toolchain is used:
Es werden eingebaute Spezifikationen verwendet.
Ziel: i486-linux-gnu
Konfiguriert mit: ../src/configure -v
--prefix=/usr --enable-shared --with-system-zlib
--libexecdir=/usr/lib --enable-nls
--without-included-gettext --enable-threads=posix
--program-suffix=-4.0 --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --enable-gtk-cairo
--enable-mpfr --disable-werror
--enable-checking=release i486-linux-gnu
Thread-Modell: posix
gcc-Version 4.0.2 20050720 (prerelease) (Debian

LD Version

GNU ld version 2.16.1 Debian GNU/Linux
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it
under the terms of
the GNU General Public License. This program has
absolutely no warranty.

The applied patch in cputest.c for amd64 is not working
here. neither with gcc3.4 nor gcc4.x

I'M not an assembler guy, so it would be nice, if we
could get a working solution until august 11th to ship
it with the next ubuntu release.

Thx and greetings from germany,

Stephan Hermann


  • Logged In: YES

    Hi Stephan,

    which "patch" are you talking about???
    Can you please try to compile the original sourcecode from
    http://kwave.sf.net/download.html ?

    I already had some users who have successfully compiled this
    code for AMD64, so I have to wonder a bit about what is
    going on...

    Have you also installed "xine", can you try to compile this
    I ask because I have copied this part of the code
    (cputest.c) from the xine project.


    (also from Germany)

  • Moritz Breit
    Moritz Breit

    Logged In: YES


    Same error here, gcc4 on amd64.
    It does not compile with the same error message that Stephan
    has posted.

    Moritz Breit

  • Logged In: YES

    still the same question: does "xine" compile on your system ?
    I have no AMD64 system here and therefore I cannot reproduce
    all of that here.

  • Logged In: YES

    I had the same error...

    A comment in cputest.c says something like: "use pop instead
    of popl for amd64 comiles". Unfortunately, pop and push
    requires a 64-bit operand on x64_64 systems. I found (and
    modified) a quick and dirty fix from here:


    See attached patch.

    By the way, I do have xine installed, but I'm not sure what
    patches gentoo installs along the way to make 64-bit work

  • Logged In: YES

    Uhhh... I must be missing something. I can't find the "attach
    file" button. No worries... here's the patch:

    --- libkwave/cputest.c.orig 2005-08-10 13:29:25.000000000
    +++ libkwave/cputest.c 2005-08-10 13:33:36.000000000
    @@ -52,18 +52,30 @@
    / See if CPUID instruction is supported ... /
    / ... Get copies of EFLAGS into eax and
    +#if defined(x86_64) || defined(amd64)
    + "popq %%rax\n\t"
    "pop %0\n\t"
    "movl %0, %1\n\t"

                           /* ... Toggle the ID bit in one copy and store

    to the EFLAGS reg */
    "xorl $0x200000, %0\n\t"
    +#if defined(x86_64) || defined(amd64)
    + "pushq %%rax\n\t"
    "push %0\n\t"

                           /* ... Get the (hopefully modified) EFLAGS */ 

    +#if defined(x86_64) || defined(amd64)
    + "popq %%rax\n\t"
    "pop %0\n\t"
    : "=a" (eax), "=c" (ecx)
    : "cc"

  • Logged In: YES

    should work now, please upgrade to Kwave-0.7.4

  • Logged In: YES

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).