Hi Nikhil,

> On 12/10/20 4:44 PM, Rainer Orth wrote:
>> I'm attaching the -save-temps output, so you can work on the real data
>> rather than trying to figure things out from the Illumos repos.
>
> Thanks, that was helpful. I also have successfully acquired access to
> gcc211, so I should be self sufficient moving forward. Thanks again for
> the pointer to the compile farm.
>
> I believe the attached patch will fix the issue. There are a few parts
> to the fix:
>
>   * Typedefs whose name matches the underlying struct tag, as in
>
>         typedef struct FILE {} FILE;
>       are suppressed, so that we output the interesting "struct FILE {}"
>     definition and not the useless "typedef FILE FILE" definition.
>
>   * Rewriting of _in6_addr to [16]byte is applied to all type
>     definitions, rather than to an enumerated subset. This follows the
>     approach used for timeval/timespec.
>
>     The old approach could not handle cases like:
>
>         type _mld2mar struct { addr _in6_addr /* ... */}
>         type _mld2mar_t _mld2mar
>       The old approach would filter out type _mld2mar but understandably
>     was not smart enough to filter out mld2mar_t, resulting in a
>     reference to non-existent type _mld2mar.
>
>   * Handling of _timestruc_t when it is just an alias for timespec.
>
>   * Inclusion of stdio.h to avoid an incomplete definition of the type
>     __FILE.
>
> There are a few more hurdles before this patch is ready for commit. The
> changes to godump.c deserve new test cases. And the changes to the
> mk[r]sysinfo.sh scripts will need to go upstream first. Hopefully I'll
> get to that soon. I wanted to send along what I had in the meantime.

with the revised godump.c patch and this one for mk*sysinfo.sh, I still
get failures on all of Solaris 11.3/x86, 11.4/x86, and 11.4/SPARC
(didn't try 11.3/SPARC):

* Solaris 11.3/x86 and 11.4/x86:

runtime_sysinfo.go:5995:6: error: redefinition of '_upad128_t'

  gen-sysinfo has

// type _upad128_t struct { _q INVALID-float-80; Godump_0_pad [4]byte; }
type _upad128_t struct {}

  and mk*sysinfo.sh adds

type _upad128_t struct { _l [4]uint32; }

* Solaris 11.4/SPARC and x86:

runtime_sysinfo.go:1178:55: error: use of undefined type '_in6_addr_t'

  runtime_sysinfo.go uses _in6_addr_t in _flow_arp_desc_s,
  _flow_l3_desc_s, _mac_ipaddr_s, _mac_resource_props_s, and
  _mactun_info_s, but there's no definition and you've removed the
  section of mk*sysinfo.sh to replace it by [16]byte.

  The issue is here, I believe:

+      -e 's/\([^a-zA-Z0-9_]\)_in6_addr\([^a-zA-Z0-9_]\)/\1[16]byte\2/g' \
+      -e 's/\([^a-zA-Z0-9_]\)_in6_addr$/\1[16]byte/g' \

  Neither line matches _in6_addr_t.  Removing '_' from the second char
  set on the first line fixes this, but I'm unsure what exactly this is
  going to match on different systems.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to