[Crash-utility] Error when compiling crash-4.0-2.21

Dave Anderson anderson at redhat.com
Tue Mar 21 20:08:12 UTC 2006


Nguyen Anh Quynh wrote:

> Hi,
>
> I am trying to compile crash-4.0-2.21 on my x86 box. I am running
> Ubuntu 5.10, with gcc 4.0.2. I grabbed crash from
> http://people.redhat.com/anderson/crash-4.0-2.21.tar.gz, untar it and
> inside the newly created crash-4.0-2.21 directory, I compiled it with
> "make". But there is a problem, see below. How could I fix it?
>
> Thank you,
> Q
>
> ^^^^
> $make
> ......
> ......
> ar: creating libgdb.a
> ranlib libgdb.a
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 build_data.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 main.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 tools.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 global_data.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 memory.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 filesys.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 -DGDB_6_1 help.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 -DGDB_6_1 task.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 -DGDB_6_1 kernel.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 test.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 -DGDB_6_1 gdb_interface.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 net.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 dev.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 -DGDB_6_1 alpha.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 -DMCLX x86.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 ppc.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 ia64.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 s390.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 s390x.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 ppc64.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 x86_64.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 extensions.c
> cc -c -g -DX86 -D_FILE_OFFSET_BITS=64 va_server.c
> va_server.c:60: error: initializer element is not constant
> make[4]: *** [va_server.o] Error 1
> make[3]: *** [gdb] Error 2
> make[2]: *** [all-gdb] Error 2
> make[1]: *** [gdb_merge] Error 2
> make: *** [all] Error 2
>

It's this remnant of the ancient "mcore" dumpfile format handling code
in va_server.c:

  int Page_Size = PAGE_SIZE;  /* temporary setting until disk header is read */

I believe it would be picking PAGE_SIZE up from <asm/page.h>, which looks
like this (on my machine):

  #ifndef _I386_PAGE_H
  #define _I386_PAGE_H

  /* PAGE_SHIFT determines the page size */
  #define PAGE_SHIFT      12
  #define PAGE_SIZE       (1UL << PAGE_SHIFT)
  #define PAGE_MASK       (~(PAGE_SIZE-1))

  #endif /* _I386_PAGE_H */

I don't know what the "initializer element is not constand" error message
means or requires exactly w/respect to this type of data initializer.  Is it
the use of a "UL" to initialize an int?  Does anybody else on the list know?

Try just setting it to 4096.  It's completely meaningless code unless
you're looking at a dumpfile generated from the mcore patch, which
I would presume is highly unlikely...

Dave



>
> Here is my gcc version:
> $ gcc -v
> Using built-in specs.
> Target: i486-linux-gnu
> Configured with: ../src/configure -v
> --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
> --with-gxx-include-dir=/usr/include/c++/4.0.2 --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 model: posix
> gcc version 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility




More information about the Crash-utility mailing list