Subject: Re: Building netbsd-3 on Current fails
To: None <current-users@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: current-users
Date: 07/25/2006 13:54:48
--zbGR4y+acU1DwHSi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 25, 2006 at 04:46:36PM +0200, Mark Weinem wrote:
> Bill Studenmund:
>=20
> > Unfortunately the important part was just above the text you posted,
> > where the compiler said what was wrong. Everything else is just a
> > sequence of Makefiles complaining about what was wrong.
> >
> > Off the top of my head, I expect the problem is that you're using gcc4
> > which dislikes the old gas source. I ran into this, but I've forgotten
> > how I hacked around it.
>=20
> Hi Bill,
>=20
> Many thanks for your reply!=20
>=20
> Do you mean these lines?
>=20
> ./build.sh -O ../obj -T ../tools -U -u tools
> [...]
> cc -DHAVE_CONFIG_H -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/=
gas -I. -D_GNU_SOURCE -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils=
/gas -I../bfd=20
> -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/config -I/usr/src/t=
ools/binutils/../../gnu/dist/binutils/gas/../include -I/usr/src/tools/binut=
ils/../../gnu/dist/binutils/gas/..=20
> -I/usr/src/tools/binutils/../../gnu/dist/binutils/gas/../bfd -I/usr/src/t=
ools/binutils/../../gnu/dist/binutils/gas/../intl -I../intl -DLOCALEDIR=3D"=
\"/usr/src/../tools/share/locale\""   =20
> -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -c /usr/src/tools/bi=
nutils/../../gnu/dist/binutils/gas/app.c
> In file included=20
> from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/as.h:94,
>                 =20
> from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c:30:
> /usr/src/tools/binutils/../../gnu/dist/binutils/gas/../include/getopt.h:1=
16:warning:function=20
> declaration isn't a prototype=20
>=20
> In file included from ./targ-cpu.h:1,=20
> from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/obj-elf.h=
:42,
> 	from ./obj-format.h:1,            =20
> from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/te-nbsd.h=
:24,
>                  from ./targ-env.h:1,         =20
> from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/as.h:626,       =
       =20
> from /usr/src/tools/binutils/../../gnu/dist/binutils/gas/app.c:30:
> /usr/src/tools/binutils/../../gnu/dist/binutils/gas/config/tc-i386.h:451:=
=20
> error: array type has incomplete element type

Yes, that one.

I found I had to copy the structure definition to get things to work.

I actually wrapped the definition in:

#ifndef FOO
#define FOO
struct .....
#endif

so that if a file included both files, all was well.

There also was another structure that needed the same treatment.

Take care,

Bill

--zbGR4y+acU1DwHSi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFExoUYWz+3JHUci9cRAr0yAJoC4mBh4DN5aDGzHJ0S42dBO3DQ2QCeJtzF
toTEpGlADezgB4vbYaGvIqM=
=0wpp
-----END PGP SIGNATURE-----

--zbGR4y+acU1DwHSi--