[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compiling octave with egcs 1.1 ?

From: John W. Eaton
Subject: compiling octave with egcs 1.1 ?
Date: Thu, 3 Sep 1998 23:26:36 -0500 (CDT)

On  3-Sep-1998, Muzaffer Kal <address@hidden> wrote:

| has anyone done this ? Does it work ?

I doubt that it will work for the 2.0.13 distribution without the
patches that Mumit Khan posted to the bug-octave mailing list.  You
can get them from the mailing list archive on Octave web site at

Even with the patches, you may have some trouble

FWIW, I just picked up egcs-1.1a to try to compile Octave on a Linux
system and and found the following problem.  If anyone has a solution
for this problem that is better than just redefining the W* macros in
Octave's syswait.h include file, please let me know (or better yet,
just post it to the bug-octave mailing list).

The rest of this message is the text of the bug report I just sent in
to address@hidden

The following code compiles fine with the C compiler, but fails with
the C++ compiler.

  foobar (void)
    int foo = 0;
    foo = __extension__ ({
      union {
        __typeof (foo) __in;
      } __u;
      __u.__in = foo;

Here is the output from running g++ -v:

  Reading specs from 
  gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
-lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 
-D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux 
-Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386) -Amachine(i386) 
-Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ 
-D__pentiumpro -D__pentiumpro__ /tmp/ccLSx5ek.ii
  GNU CPP version egcs-2.91.57 19980901 (egcs-1.1 release) (i386 Linux/ELF)
  #include "..." search starts here:
  #include <...> search starts here:
  End of search list.
/tmp/ccLSx5ek.ii -quiet -dumpbase -version -o /tmp/ccIAN1Ct.s
  GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release) 
(i686-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.57 19980901 
(egcs-1.1 release). In function `void foobar()': `foo' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.) warning: ANSI C++ forbids declaration `__in' with no type

The code fragment above is what I came up with after expanding macros
and simplifying code in Octave that looks like this:

  #include <sys/types.h>
  #include <sys/wait.h>


  int status = 0;


  if (WIFEXITED (status))
    status = WEXITSTATUS (status);


and produces the same errors.

I built egcs with

  configure --enable-shared --prefix=/usr/local/egcs/1.1a
  make bootstrap

on a Linux 2.0.30 system with libc 5.4.33.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]