Bug 16300 - Bug in vendor /usr/include/net/if.h needs fixincluding
Summary: Bug in vendor /usr/include/net/if.h needs fixincluding
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: ---
Assignee: Giovanni Bajo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-30 16:31 UTC by Daniel Richard G.
Modified: 2009-08-07 21:13 UTC (History)
4 users (show)

See Also:
Host: alphaev56-dec-osf4.0g
Target: alphaev56-dec-osf4.0g
Build: alphaev56-dec-osf4.0g
Known to work:
Known to fail:
Last reconfirmed: 2005-06-15 03:05:47


Attachments
/usr/include/net/if.h from Tru64 (13.38 KB, text/plain)
2004-10-15 22:25 UTC, Daniel Richard G.
Details
Tentative patch (419 bytes, patch)
2004-10-15 23:43 UTC, Giovanni Bajo
Details | Diff
inclhack.def and fixincl.x (60.12 KB, application/x-tar)
2004-10-25 23:12 UTC, Daniel Richard G.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Richard G. 2004-06-30 16:31:27 UTC
This error came up in bootstrapping:

----(cut here)----
/mnt/scratch/gcc-3.4.0/gcc/xgcc -shared-libgcc -B/mnt/scratch/gcc-3.4.0/gcc/
-nostdinc++ -L/mnt/scratch/gcc-3.4.0/alphaev56-dec-osf4.0g/libstdc++-v3/src
-L/mnt/scratch/gcc-3.4.0/alphaev56-dec-osf4.0g/libstdc++-v3/src/.libs
-B/mnt/freeport/arch/tru64/alphaev56-dec-osf4.0g/bin/
-B/mnt/freeport/arch/tru64/alphaev56-dec-osf4.0g/lib/ -isystem
/mnt/freeport/arch/tru64/alphaev56-dec-osf4.0g/include -isystem
/mnt/freeport/arch/tru64/alphaev56-dec-osf4.0g/sys-include -DHAVE_CONFIG_H -I.
-I/mnt/freeport/src/gcc/current/libjava -I./include -I./gcj
-I/mnt/freeport/src/gcc/current/libjava -Iinclude
-I/mnt/freeport/src/gcc/current/libjava/include
-I/mnt/freeport/src/gcc/gcc-3.4.0/boehm-gc/include -pthread -DGC_OSF1_THREADS=1
-DSILENT=1 -DNO_SIGNALS=1 -DALL_INTERIOR_POINTERS=1 -DJAVA_FINALIZATION=1
-DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1
-I/mnt/freeport/src/gcc/current/libjava/libltdl
-I/mnt/freeport/src/gcc/current/libjava/libltdl
-I/mnt/freeport/src/gcc/current/libjava/.././libjava/../gcc
-I/mnt/freeport/src/gcc/current/libjava/../zlib
-I/mnt/freeport/src/gcc/current/libjava/../libffi/include -I../libffi/include
-O2 -g -mieee -fno-rtti -fnon-call-exceptions -pthread -fdollars-in-identifiers
-Wswitch-enum -mieee -W -Wall -D_GNU_SOURCE
-DPREFIX=\"/mnt/freeport/arch/tru64\" -DLIBDIR=\"/mnt/freeport/arch/tru64/lib\"
-DBOOT_CLASS_PATH=\"/mnt/freeport/arch/tru64/share/java/libgcj-3.4.0.jar\" -g
-O2 -mieee -MD -MT java/net/natNetworkInterface.lo -MF
java/net/natNetworkInterface.pp -c java/net/natNetworkInterface.cc -o
java/net/natNetworkInterface.o
In file included from java/net/natNetworkInterface.cc:35:
/usr/include/net/if.h:144: error: expected `;' before '}' token
/usr/include/net/if.h:144: error: expected `;' before '}' token
java/net/natNetworkInterface.cc: In static member function `static
java::util::Vector* java::net::NetworkInterface::getRealNetworkInterfaces()':
java/net/natNetworkInterface.cc:77: warning: comparison between signed and
unsigned integer expressions
gmake[3]: *** [java/net/natNetworkInterface.lo] Error 1
gmake[3]: Leaving directory `/mnt/scratch/gcc-3.4.0/alphaev56-dec-osf4.0g/libjava'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/mnt/scratch/gcc-3.4.0/alphaev56-dec-osf4.0g/libjava'
gmake[1]: *** [all-target-libjava] Error 2
gmake[1]: Leaving directory `/mnt/scratch/gcc-3.4.0'
gmake: *** [bootstrap-lean] Error 2
----(cut here)----

Relevant snippet of the offending header file:

----(cut here)----
/*
 * struct used to identify virtual mac addresses. This are
 * created by the ARP code and will be used to identify non
 * default mac addresses. The list will be hashed to allow
 * for faster searches.
 * NOTE: that the flags field must be at the correct offset
 *       since this and the ifnet struct should be interchangable
 *       till a user can determin that this entry is a vmac ifnet
 */
struct vmac_ifnet {
        struct  vmac_ifnet *vmif_next;  /* the next structure in the list */
        char    *vmif_name;             /* name, e.g. ``en'' or ``lo'' */
        char    *vmif_version;          /* The version string.             */
        struct  sockaddr vmif_hwaddr;   /* address of interface */
        int     vmif_flags;             /* up/down, broadcast, etc. */
        int     vmif_refcnt;            /* last one out needs to delete this */
        struct  ifnet *vmif_ifnet;      /* point to the correct ifnet struct */
        struct  sockaddr vmif_paddr     /* protocol address */
};
----(cut here)----

Note the missing semicolon.

I was able to work around this by placing an edited if.h with other fixed
headers in gcc-3.4.0/gcc/include/root/usr/sys/include/net/.
Comment 1 Giovanni Bajo 2004-10-13 12:51:58 UTC
Daniel,

since you have access to the system, would you kindly attempt preparing a 
fixinclude patch yourself? I guess it's easier for you to verify. If this is 
impossible for you, please at least attacch a copy of the buggy if.h to this 
report.

Thanks
Comment 2 Daniel Richard G. 2004-10-15 22:25:21 UTC
Created attachment 7360 [details]
/usr/include/net/if.h from Tru64

As I am not familiar with the inclhack.def syntax, I am attaching an unmodified
copy of Tru64's /usr/include/net/if.h system header file.
Comment 3 Giovanni Bajo 2004-10-15 23:43:39 UTC
Created attachment 7361 [details]
Tentative patch

Can you try if this patch fixes it? Otherwise, you could try tweaking it a
little bit, if you are familiar with regular expressions. It should not be too
hard.
Comment 4 Giovanni Bajo 2004-10-16 03:30:10 UTC
CC'ing also Bruce because he's the fixincludes maintainer. Bruce, BTW, as a 
developer which digs for the first time in fixincludes, let me say that 
fixincludes/README is not very clear about how 'make check' is supposed to work.

Also, it does not explain if it is possible (and how) to use the test_text to 
verify the correctness of the fix. When I run 'make check' I don't understand 
if my new hack is being tested or not, and if it is correct or not.
Comment 5 bkorb 2004-10-18 05:06:11 UTC
Subject: Re:  Bug in vendor /usr/include/net/if.h needs
    fixincluding

giovannibajo at libero dot it wrote:
> 
> ------- Additional Comments From giovannibajo at libero dot it  2004-10-16 03:30 -------
> CC'ing also Bruce because he's the fixincludes maintainer. Bruce, BTW, as a
> developer which digs for the first time in fixincludes, let me say that
> fixincludes/README is not very clear about how 'make check' is supposed to work.

I can only fix things about which I get feedback so it incrementally
gets better.  I'm sorry you found it difficult.

> Also, it does not explain if it is possible (and how) to use the test_text to
> verify the correctness of the fix. When I run 'make check' I don't understand
> if my new hack is being tested or not, and if it is correct or not.

"test-text" should contain one or more examples of broken text that
needs to be fixed.  "make check" will spin a file with that text in it
and run the "fixinc" program, then run a recursive "diff" between the
patched files and a set of example files.  Any differences are highlighted.
So, when you make a fix, you should pretty well understand how the
broken text ought to be transformed.  In the "make check", you ought
to see a diff that includes that new transform in the new output and
not in the sample output.

> 4.  Rebuild the compiler and check the header causing the issue.
>     Make sure it is now properly handled.  Add tests to the
>     "test_text" entry(ies) that validate your fix.  This will
>     help ensure that future fixes won't negate your work.

That means first, ensure the header you want fixed is fixed.
Then, incorporate the brokenness in the "text-text" field.
Then, ensure it is fixed in the sample output.
Then, add the fixed result into the baseline sample files.
Finally:

> If you are having some problem with a system header that is either
> broken by the manufacturer, or is broken by the fixinclude process,
> then you will need to alter or add information to the include fix
> definitions file, ``inclhack.def''.  Please also send relevant
> information to gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org and,
> please, to me:  bkorb@gnu.org.

That means send me email if you are still having problems.

Regards, Bruce
Comment 6 Giovanni Bajo 2004-10-18 13:37:06 UTC
Subject: Re:  Bug in vendor /usr/include/net/if.h needs   fixincluding

Bruce Korb wrote:

>> I can only fix things about which I get feedback so it
>> incrementally gets better.  I'm sorry you found it difficult.

Sure, I did not want to sound offensive.


>> Also, it does not explain if it is possible (and how) to use the
>> test_text to
>> verify the correctness of the fix. When I run 'make check' I don't
>> understand
>> if my new hack is being tested or not, and if it is correct or not.
>
> "test-text" should contain one or more examples of broken text that
> needs to be fixed.  "make check" will spin a file with that text in it
> and run the "fixinc" program, then run a recursive "diff" between the
> patched files and a set of example files.  Any differences are
> highlighted.

I still do not understand. The diff is being performed between the patched file
and what example files? If I add a new fix, should I also put a patched
(correct) version in the set of example files (where are they)?


> So, when you make a fix, you should pretty well understand how the
> broken text ought to be transformed.  In the "make check", you ought
> to see a diff that includes that new transform in the new output and
> not in the sample output.

Now I am confused. I do not understand which of the following holds true:

- The diff shows what fixinclude did. It shows the different between the
original version (extracted from test-text) and the version that fixinclude
produced by applying your diff.
- The diff shows the mistakes of fixinclude, if any. It shows the different
between what fixinclude produced as output (by applying your fix to the
test-text) and what it is the expected result (which you have to put in a
different file -- where? how?).


>> 4.  Rebuild the compiler and check the header causing the issue.
>>     Make sure it is now properly handled.  Add tests to the
>>     "test_text" entry(ies) that validate your fix.  This will
>>     help ensure that future fixes won't negate your work.
>
> That means first, ensure the header you want fixed is fixed.
> Then, incorporate the brokenness in the "text-text" field.
> Then, ensure it is fixed in the sample output.
> Then, add the fixed result into the baseline sample files.

This process can be done if you have physical access to the host with the
broken header. In my case, I was developing a fixinclude for a broken header
for another system. I have the broken header as a file (attacched to the bug).
How can I test my fix in this situation?

BTW: "rebuild the compiler" is a tad too much as first quick test for a
fixinclude (e.g. check that the regulard expression does not have a typo or
so). Even assuming access to the host, would you please explain if there is a
quicker wasy to just run fixincludes without rebuilding everything? Of course,
a full bootstrap would be still required as a final check.


> That means send me email if you are still having problems.

Thanks
Giovanni Bajo


Comment 7 Daniel Richard G. 2004-10-18 15:16:49 UTC
The build still fails with the patched inclhack.def (same error, same place).
fixincludes does not appear to have patched the header in question; there is no
if.h present in the build tree.
Comment 8 bkorb 2004-10-18 16:06:04 UTC
Subject: Re:  Bug in vendor /usr/include/net/if.h needs
    fixincluding

skunk at iskunk dot org wrote:
> 
> ------- Additional Comments From skunk at iskunk dot org  2004-10-18 15:16 -------
> The build still fails ...


  /*
+  *  Fix missing semicolon on Alpha OSF/4 in <net/if.h>
+  */
+ fix = {
+     hackname  = alpha_if_semicolon;
+     files     = "if.h";
+     select    = "(struct[ \t]+sockaddr[ \t]+vmif_paddr)([ \t])([ \t]+/\*)";
+     c_fix     = format;
+     c_fix_arg = "%1;%2%3";
+     test_text = '     struct  sockaddr vmif_paddr     /* protocol address */';
+ };
+ 
+ 
+ /*
   * Remove erroneous parentheses in sym.h on Alpha OSF/1.
   */
  fix = {

The select clause requires two white space characters
between "vmif_paddr" and "/*".  Eliminate the unnecessary
subexpression stuff, thus:

  /*
+  *  Fix missing semicolon on Alpha OSF/4 in <net/if.h>
+  */
+ fix = {
+     hackname  = alpha_if_semicolon;
+     files     = "if.h";
+     select    = "struct[ \t]+sockaddr[ \t]+vmif_paddr[ \t]+/\*";
+     c_fix     = format;
+     c_fix_arg = "struct sockaddr vmif_paddr;\t/*";
+     test_text = '     struct  sockaddr vmif_paddr     /* protocol address */';
+ };
Comment 9 Daniel Richard G. 2004-10-20 20:14:00 UTC
Tried a new build, with the second patch given in comment #8; same failure mode
as before.

bkorb, are there embedded tabs in your patch? I can't pull it out of the comment
without expanding them; perhaps a patch-attachment would come through better?
Comment 10 bkorb 2004-10-20 20:22:56 UTC
Subject: Re:  Bug in vendor /usr/include/net/if.h needs
    fixincluding

skunk at iskunk dot org wrote:
> 
> ------- Additional Comments From skunk at iskunk dot org  2004-10-20 20:14 -------
> Tried a new build, with the second patch given in comment #8; same failure mode
> as before.
> 
> bkorb, are there embedded tabs in your patch? I can't pull it out of the comment
> without expanding them; perhaps a patch-attachment would come through better?

Should make no difference, as there are no embedded tabs.
Well, there might be in the "test-text", but ``[ \t]+'' should match either.
What does the fix expand to in fixincl.x?

Regards, Bruce
Comment 11 Daniel Richard G. 2004-10-25 23:12:38 UTC
Created attachment 7411 [details]
inclhack.def and fixincl.x

Gentlemen, I can't get the fix to work; the build is still going through as if
it were not there. I believe I have followed the procedure for recreating
fixincl.x correctly, but it was far from foolproof.

The attached tarfile contains the patched inclhack.def, and my generated
version of fixincl.x, both from my GCC 3.4.2 source tree. (These are the only
files I have modified; I trust none more need to be?) Please let me know if you
see evidence of any mistakes on my part....
Comment 12 bkorb 2004-10-26 00:21:01 UTC
Subject: Re:  Bug in vendor /usr/include/net/if.h needs
    fixincluding

skunk at iskunk dot org wrote:
> 
> ------- Additional Comments From skunk at iskunk dot org  2004-10-25 23:12 -------
> Created an attachment (id=7411)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7411&action=view)
> inclhack.def and fixincl.x
> 
> Gentlemen, I can't get the fix to work; the build is still going through as if
> it were not there. I believe I have followed the procedure for recreating
> fixincl.x correctly, but it was far from foolproof.
> 
> The attached tarfile contains the patched inclhack.def, and my generated
> version of fixincl.x, both from my GCC 3.4.2 source tree. (These are the only
> files I have modified; I trust none more need to be?) Please let me know if you
> see evidence of any mistakes on my part....

I do not see any:

> $ make bootstrap
> <<.......>>
> $ cd gcc/fixinc
> $ make check
> autogen -T ../../../gcc/fixinc/check.tpl ../../../gcc/fixinc/inclhack.def
> /bin/sh ./check.sh ../../../gcc/fixinc/tests/base
> [[...]]
> Fixed:  if.h
> [[...]]
> Newly fixed header:  if.h
> 
> There were fixinclude test FAILURES
> make: *** [check] Error 1
> $ diff -U3 tests/*/if.h
> --- tests/inc/if.h      Mon Oct 25 17:05:49 2004
> +++ tests/res/if.h      Mon Oct 25 17:05:51 2004
> @@ -1,5 +1,14 @@
> +/*  DO NOT EDIT THIS FILE.
> +
> +    It has been auto-edited by fixincludes from:
> +
> +       "fixinc/tests/inc/if.h"
> +
> +    This had to be done to correct non-standard usages in the
> +    original, manufacturer supplied header file.  */
> +
> 
> 
>  #if defined( ALPHA_IF_SEMICOLON_CHECK )
> -     struct  sockaddr vmif_paddr     /* protocol address */
> +     struct sockaddr vmif_paddr;       /** protocol address */
>  #endif  /* ALPHA_IF_SEMICOLON_CHECK */


Index: fixincl.x
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/Attic/fixincl.x,v
retrieving revision 1.177.4.7
diff -u -p -r1.177.4.7 fixincl.x
--- fixincl.x   14 Aug 2004 16:38:10 -0000      1.177.4.7
+++ fixincl.x   26 Oct 2004 00:18:02 -0000
@@ -2,11 +2,11 @@
  *
  * DO NOT EDIT THIS FILE   (fixincl.x)
  *
- * It has been AutoGen-ed  Thursday August 12, 2004 at 05:42:28 PM MDT
+ * It has been AutoGen-ed  Monday October 25, 2004 at 04:56:17 PM PDT
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Aug 12 17:42:28 MDT 2004
+/* DO NOT CVS-MERGE THIS FILE, EITHER Mon Oct 25 16:56:17 PDT 2004
  *
  * You must regenerate it.  Use the ./genfixes script.
  *
@@ -15,7 +15,7 @@
  * certain ANSI-incompatible system header files which are fixed to work
  * correctly with ANSI C and placed in a directory that GNU C will search.
  *
- * This file contains 177 fixup descriptions.
+ * This file contains 178 fixup descriptions.
  *
  * See README for more information.
  *
@@ -971,6 +971,41 @@ static const char* apzAlpha_GetoptPatch[

 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Alpha_If_Semicolon fix
+ */
+tSCC zAlpha_If_SemicolonName[] =
+     "alpha_if_semicolon";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zAlpha_If_SemicolonList[] =
+  "|if.h|";
+/*
+ *  Machine/OS name selection pattern
+ */
+#define apzAlpha_If_SemicolonMachs (const char**)NULL
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zAlpha_If_SemicolonSelect0[] =
+       "struct[ \t]+sockaddr[ \t]+vmif_paddr[ \t]+/*";
+
+#define    ALPHA_IF_SEMICOLON_TEST_CT  1
+static tTestDesc aAlpha_If_SemicolonTests[] = {
+  { TT_EGREP,    zAlpha_If_SemicolonSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Alpha_If_Semicolon
+ */
+static const char* apzAlpha_If_SemicolonPatch[] = {
+    "format",
+    "struct sockaddr vmif_paddr;\t/*",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Alpha_Parens fix
  */
 tSCC zAlpha_ParensName[] =
@@ -7018,9 +7053,9 @@ static const char* apzX11_SprintfPatch[]
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          199
+#define REGEX_COUNT          200
 #define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT            177
+#define FIX_COUNT            178

 /*
  *  Enumerate the fixes
@@ -7047,6 +7082,7 @@ typedef enum {
     ALPHA_ASSERT_FIXIDX,
     ALPHA_BAD_LVAL_FIXIDX,
     ALPHA_GETOPT_FIXIDX,
+    ALPHA_IF_SEMICOLON_FIXIDX,
     ALPHA_PARENS_FIXIDX,
     ALPHA_PTHREAD_FIXIDX,
     ALPHA_PTHREAD_GCC_FIXIDX,
@@ -7311,6 +7347,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      ALPHA_GETOPT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aAlpha_GetoptTests,   apzAlpha_GetoptPatch, 0 },

+  {  zAlpha_If_SemicolonName,    zAlpha_If_SemicolonList,
+     apzAlpha_If_SemicolonMachs,
+     ALPHA_IF_SEMICOLON_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aAlpha_If_SemicolonTests,   apzAlpha_If_SemicolonPatch, 0 },
+
   {  zAlpha_ParensName,    zAlpha_ParensList,
      apzAlpha_ParensMachs,
      ALPHA_PARENS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
Index: inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/Attic/inclhack.def,v
retrieving revision 1.190.4.7
diff -u -p -r1.190.4.7 inclhack.def
--- inclhack.def        14 Aug 2004 16:38:10 -0000      1.190.4.7
+++ inclhack.def        26 Oct 2004 00:18:04 -0000
@@ -651,6 +651,19 @@ fix = {


 /*
+ *  Fix missing semicolon on Alpha OSF/4 in <net/if.h>
+ */
+fix = {
+    hackname  = alpha_if_semicolon;
+    files     = "if.h";
+    select    = "struct[ \t]+sockaddr[ \t]+vmif_paddr[ \t]+/\*";
+    c_fix     = format;
+    c_fix_arg = "struct sockaddr vmif_paddr;\t/*";
+    test_text = '     struct  sockaddr vmif_paddr     /* protocol address */';
+};
+
+
+/*
  * Remove erroneous parentheses in sym.h on Alpha OSF/1.
  */
 fix = {

Should the file name be "net/if.h" ????
Comment 13 Daniel Richard G. 2004-10-28 21:07:22 UTC
cport@drum:/mnt/scratch/gcc-3.4.2-build> find . -name if.h
./gcc/include/root/usr/sys/include/net/if.h

Yes, that does appear to be it---the header needs to be specified as "net/if.h"
instead of merely "if.h". Confirmed appropriate modification of if.h with diff(1).

(GCC still isn't building, but now it's an unrelated issue, i.e. /usr/bin/ld
complaining about multiply defined pthread symbols....)
Comment 14 Giovanni Bajo 2004-10-29 01:31:27 UTC
> Yes, that does appear to be it---the header needs
> to be specified as "net/if.h" instead of merely "if.h".

Ok. Bruce, I guess this is more material for you to add to the documentation. 
Will you take care of committing the final patch please?
Comment 15 Daniel Richard G. 2007-02-01 17:18:50 UTC
**** This bug is still present in 3.4.6 ****

Bruce or Giovanni, could one of you please apply this patch?
Comment 16 Daniel Richard G. 2009-02-28 00:41:36 UTC
Building 4.3.3 fails with

/usr/home/cport/tmp/bash ./libtool --tag=CXX --mode=compile /usr/home/cport/build/gcc-4.3.3-build-test/./gcc/xgcc -shared-libgcc -B/usr/home/cport/build/gcc-4.3.3-build-test/./gcc -nostdinc++ -L/usr/home/cport/build/gcc-4.3.3-build-test/alphaev56-dec-osf4.0g/libstdc++-v3/src -L/usr/home/cport/build/gcc-4.3.3-build-test/alphaev56-dec-osf4.0g/libstdc++-v3/src/.libs -B/usr/home/cport/tmp/GCC/alphaev56-dec-osf4.0g/bin/ -B/usr/home/cport/tmp/GCC/alphaev56-dec-osf4.0g/lib/ -isystem /usr/home/cport/tmp/GCC/alphaev56-dec-osf4.0g/include -isystem /usr/home/cport/tmp/GCC/alphaev56-dec-osf4.0g/sys-include -DHAVE_CONFIG_H -I. -I/tg/freeport/src/gcc/gcc--4.3.3/libjava -I./include -I./gcj  -I/tg/freeport/src/gcc/gcc--4.3.3/libjava -Iinclude -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/include -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/classpath/include -Iclasspath/include -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/classpath/native/fdlibm -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/../boehm-gc/include -I../boehm-gc/include  -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/libltdl -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/libltdl -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/.././libjava/../gcc -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/../zlib -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/../libffi/include -I../libffi/include  -fno-rtti -fnon-call-exceptions -pthread -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -mieee -Wextra -Wall -D_GNU_SOURCE -DPREFIX="\"/usr/home/cport/tmp/GCC\"" -DTOOLEXECLIBDIR="\"/usr/home/cport/tmp/GCC/lib/gcc/alphaev56-dec-osf4.0g/4.3.3\"" -DJAVA_HOME="\"/usr/home/cport/tmp/GCC\"" -DBOOT_CLASS_PATH="\"/usr/home/cport/tmp/GCC/share/java/libgcj-4.3.3.jar\"" -DJAVA_EXT_DIRS="\"/usr/home/cport/tmp/GCC/share/java/ext\"" -DGCJ_ENDORSED_DIRS="\"/usr/home/cport/tmp/GCC/share/java/gcj-endorsed\"" -DGCJ_VERSIONED_LIBDIR="\"/usr/home/cport/tmp/GCC/lib/gcj-4.3.3-9\"" -DPATH_SEPARATOR="\":\"" -DECJ_JAR_FILE="\"\"" -DLIBGCJ_DEFAULT_DATABASE="\"/usr/home/cport/tmp/GCC/lib/gcj-4.3.3-9/classmap.db\"" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"gcj-4.3.3-9/classmap.db\"" -O2 -g    -mieee -c -o java/net/natVMNetworkInterface.lo java/net/natVMNetworkInterface.cc
libtool: compile:  /usr/home/cport/build/gcc-4.3.3-build-test/./gcc/xgcc -shared-libgcc -B/usr/home/cport/build/gcc-4.3.3-build-test/./gcc -nostdinc++ -L/usr/home/cport/build/gcc-4.3.3-build-test/alphaev56-dec-osf4.0g/libstdc++-v3/src -L/usr/home/cport/build/gcc-4.3.3-build-test/alphaev56-dec-osf4.0g/libstdc++-v3/src/.libs -B/usr/home/cport/tmp/GCC/alphaev56-dec-osf4.0g/bin/ -B/usr/home/cport/tmp/GCC/alphaev56-dec-osf4.0g/lib/ -isystem /usr/home/cport/tmp/GCC/alphaev56-dec-osf4.0g/include -isystem /usr/home/cport/tmp/GCC/alphaev56-dec-osf4.0g/sys-include -DHAVE_CONFIG_H -I. -I/tg/freeport/src/gcc/gcc--4.3.3/libjava -I./include -I./gcj -I/tg/freeport/src/gcc/gcc--4.3.3/libjava -Iinclude -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/include -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/classpath/include -Iclasspath/include -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/classpath/native/fdlibm -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/../boehm-gc/include -I../boehm-gc/include -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/libltdl -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/libltdl -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/.././libjava/../gcc -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/../zlib -I/tg/freeport/src/gcc/gcc--4.3.3/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -pthread -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -mieee -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/usr/home/cport/tmp/GCC\" -DTOOLEXECLIBDIR=\"/usr/home/cport/tmp/GCC/lib/gcc/alphaev56-dec-osf4.0g/4.3.3\" -DJAVA_HOME=\"/usr/home/cport/tmp/GCC\" -DBOOT_CLASS_PATH=\"/usr/home/cport/tmp/GCC/share/java/libgcj-4.3.3.jar\" -DJAVA_EXT_DIRS=\"/usr/home/cport/tmp/GCC/share/java/ext\" -DGCJ_ENDORSED_DIRS=\"/usr/home/cport/tmp/GCC/share/java/gcj-endorsed\" -DGCJ_VERSIONED_LIBDIR=\"/usr/home/cport/tmp/GCC/lib/gcj-4.3.3-9\" -DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"\" -DLIBGCJ_DEFAULT_DATABASE=\"/usr/home/cport/tmp/GCC/lib/gcj-4.3.3-9/classmap.db\" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.3.3-9/classmap.db\" -O2 -g -mieee -c java/net/natVMNetworkInterface.cc  -DPIC -o java/net/natVMNetworkInterface.o
In file included from java/net/natVMNetworkInterface.cc:35:
/usr/include/net/if.h:144: error: expected ';' before '}' token
/usr/include/net/if.h:144: error: expected `;' before '}' token
gmake[3]: *** [java/net/natVMNetworkInterface.lo] Error 1
gmake[3]: Leaving directory `/mnt/scratch/build/gcc-4.3.3-build-test/alphaev56-dec-osf4.0g/libjava'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/mnt/scratch/build/gcc-4.3.3-build-test/alphaev56-dec-osf4.0g/libjava'
gmake[1]: *** [all-target-libjava] Error 2
gmake[1]: Leaving directory `/mnt/scratch/build/gcc-4.3.3-build-test'
gmake: *** [bootstrap-lean] Error 2

This bug is nearly five years old, and has had a fix available for over four.
Comment 17 Bruce Korb 2009-02-28 16:39:32 UTC
Bruce Korb left Veritas 3 years ago.  It's called "Symantec" now anyway.
Comment 18 Daniel Richard G. 2009-08-07 21:13:34 UTC
Confirmed correct fixincluding of if.h in the GCC 4.4.1 build. Ding, dong, this bug is dead!