#20 kwave ftbfs on amd64 with gcc4

reproducible
closed
compiling (22)
5
2014-08-24
2005-07-25
Stephan Hermann
No

Hi,

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
-DQT_THREAD_SUPPORT -D_REENTRANT -ansi -W -Wall
-Wchar-subscripts -Wshadow -Wpointer-arith
-Wmissing-prototypes -Wwrite-strings
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2
-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
--enable-languages=c,c++,java,f95,objc,ada,treelang
--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
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
--enable-mpfr --disable-werror
--enable-checking=release i486-linux-gnu
Thread-Modell: posix
gcc-Version 4.0.2 20050720 (prerelease) (Debian
4.0.1-2ubuntu3)

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

Discussion

  • Logged In: YES
    user_id=37622

    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
    package?
    I ask because I have copied this part of the code
    (cputest.c) from the xine project.

    greetings,
    Thomas

    (also from Germany)

     
  • Moritz Breit
    Moritz Breit
    2005-08-07

    Logged In: YES
    user_id=888

    Hi!

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

    Moritz Breit

     
  • Logged In: YES
    user_id=37622

    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
    user_id=379453

    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:

    http://crashrecovery.org/mp3-ripkit/kwave/mdk101/

    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
    correctly.

     
  • Logged In: YES
    user_id=379453

    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
    -0400
    +++ libkwave/cputest.c 2005-08-10 13:33:36.000000000
    -0400
    @@ -52,18 +52,30 @@
    / See if CPUID instruction is supported ... /
    / ... Get copies of EFLAGS into eax and
    ecx
    /
    "pushf\n\t"
    +#if defined(x86_64) || defined(amd64)
    + "popq %%rax\n\t"
    +#else
    "pop %0\n\t"
    +#endif
    "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"
    +#else
    "push %0\n\t"
    +#endif
    "popf\n\t"

                           /* ... Get the (hopefully modified) EFLAGS */ 
                           "pushf\n\t"
    

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

     
  • Logged In: YES
    user_id=37622

    should work now, please upgrade to Kwave-0.7.4

     
  • Logged In: YES
    user_id=1312539

    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).