Re: Can't cross-compile HEAD

From: Kyle Evans <kevans_at_freebsd.org>
Date: Fri, 21 Feb 2020 14:57:41 -0600
On Fri, Feb 21, 2020 at 3:27 AM Pavel Timofeev <timp87_at_gmail.com> wrote:
>
> пт, 10 янв. 2020 г. в 22:05, Kyle Evans <kevans_at_freebsd.org>:
> >
> > On Fri, Jan 10, 2020 at 12:59 PM Pavel Timofeev <timp87_at_gmail.com> wrote:
> > >
> > > пт, 10 янв. 2020 г. в 17:48, Kyle Evans <kevans_at_freebsd.org>:
> > > >
> > > > On Fri, Jan 10, 2020 at 12:31 AM Pavel Timofeev <timp87_at_gmail.com> wrote:
> > > > >
> > > > > чт, 9 янв. 2020 г. в 16:52, Pavel Timofeev <timp87_at_gmail.com>:
> > > > > >
> > > > > > Hello
> > > > > >
> > > > > > I'm trying to cross-compile HEAD r356551 for mips on my FreeBSD-12.1 amd64.
> > > > > > I'm using mips-gcc6-6.5.0 and this
> > > > > > https://github.com/freebsd/freebsd-wifi-build nice project to build
> > > > > > image for my tl-wdr3600
> > > > > >
> > > > > > The error I'm getting is:
> > > > > > ...
> > > > > > ===> usr.sbin/fmtree (all)
> > > > > > ===> usr.bin/vi (all)
> > > > > > ===> usr.sbin/freebsd-update (all)
> > > > > > ===> usr.sbin/gpioctl (all)
> > > > > > ===> usr.sbin/inetd (all)
> > > > > > /usr/home/pavel.timofeev/mips/head/usr.sbin/inetd/inetd.c: In function
> > > > > > 'getconfigent':
> > > > > > /usr/home/pavel.timofeev/mips/head/usr.sbin/inetd/inetd.c:1614:6:
> > > > > > warning: variable 'v4bind' set but not used
> > > > > > [-Wunused-but-set-variable]
> > > > > >   int v4bind;
> > > > > >       ^~~~~~
> > > > > > At top level:
> > > > > > /usr/home/pavel.timofeev/mips/head/usr.sbin/inetd/inetd.c:33:19:
> > > > > > warning: 'copyright' defined but not used [-Wunused-const-variable=]
> > > > > >  static const char copyright[] =
> > > > > >                    ^~~~~~~~~
> > > > > > /usr/home/pavel.timofeev/mips/head/usr.sbin/inetd/inetd.c: In function 'setup':
> > > > > > /usr/home/pavel.timofeev/mips/head/usr.sbin/inetd/inetd.c:1368:4:
> > > > > > error: 'netid' may be used uninitialized in this function
> > > > > > [-Werror=maybe-uninitialized]
> > > > > >     rpcb_set(sep->se_rpc_prog, i, netid, &nbuf);
> > > > > >     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > > cc1: all warnings being treated as errors
> > > > > > --- inetd.o ---
> > > > > > *** [inetd.o] Error code 1
> > > > > >
> > > > > >
> > > > > > Could anybody please help fix that?
> > > > >
> > > > >
> > > > >
> > > > > Terribly sorry, I forgot to mention a very important detail.
> > > > > My src.conf has the only option now.
> > > > > It's WITHOUT_INET6="YES"
> > > >
> > > > Thanks for that addition- you saved me a little bit of effort
> > > > examining why it's unused. =-)
> > > >
> > > > The inetd build should be clear after r356602, but you'll need to
> > > > build WITHOUT_GOOGLETEST=yes for now with the gcc ports. There are
> > > > some fundamental issues with mips-gcc{6,9} trying to emit
> > > > __floatunsidf references, but that's a hidden symbol in our libgcc.
> > > >
> > > > I expect to, by the end of the day, either have a fix pending or mark
> > > > it as a BROKEN_OPTION on mips+gcc while we hash out the details , as
> > > > gcc{6,9} is the only option we support for building mips at the
> > > > moment.
> > > >
> > > > Thanks,
> > > >
> > > > Kyle Evans
> > >
> > > Thanks a lot, Kyle!
> > > Build process passes further!
> > > Now I'm on r356606 and have these in src.conf
> > > WITHOUT_GOOGLETEST=yes
> > > WITHOUT_INET6="YES"
> > >
> > > Getting different error:
> > > ....
> >
> > I'm re-running the build WITHOUT_GOOGLETEST here outside of a
> > freebsd-wifi-build context, but CC'ing Adrian in case he's already
> > familiar since he's been battling libarchive stuff recently. Leaving
> > the context below intact in case he's not received this.
>
>
> Hi,
> Ok, seems like I found how to fix that particular libarchive/zstd
> issue. It happened during bsdbox build proccess BTW.
> So here is what I did:
>
> $ svn diff head/tools/bsdbox
> Index: head/tools/bsdbox/Makefile.base
> ===================================================================
> --- head/tools/bsdbox/Makefile.base     (revision 358209)
> +++ head/tools/bsdbox/Makefile.base     (working copy)
> _at__at_ -19,7 +19,7 _at__at_
>  # CRUNCH_PROGS_usr.bin+=       tar
>  CRUNCH_PROGS_usr.bin+= cpio
>  # XXX SSL ?
> -CRUNCH_LIBS+=          -larchive -lbz2 -lz -llzma -lbsdxml -lssl -lcrypto
> +CRUNCH_LIBS+=          -larchive -lbz2 -lz -llzma -lbsdxml -lssl
> -lcrypto -lprivatezstd -lthr
>
>  # Clear requires tput, and it's a shell script so it won't be crunched
>  CRUNCH_PROGS_usr.bin+= tput
> Index: head/tools/bsdbox/Makefile.depend
> ===================================================================
> --- head/tools/bsdbox/Makefile.depend   (revision 358209)
> +++ head/tools/bsdbox/Makefile.depend   (working copy)
> _at__at_ -11,6 +11,8 _at__at_
>         lib/${CSU_DIR} \
>         lib/lib80211 \
>         lib/libalias/libalias \
> +       lib/libzstd \
> +       lib/libthr \
>         lib/libarchive \
>         lib/libbsm \
>         lib/libbz2 \
>

Ahhh, this makes more sense now.

> Not sure about Makefile.depend file as it says 'Autogenerated - do NOT
> edit!' (would be great to extend the comment with info autogenerated
> by 'what' exactly), and not sure if I pointed dependency dirs right.
>

We'll just drop the Makefile.depend hunk of the patch -- this is
autogenerated and maintained by particular people, and shouldn't need
active attention.

> As far as I know Andrian is trying to get rid of libarchive entirely
> in freebsd-wifi-build project, so this should not be a problem in the
> future.
>
> But isn't it has to be fixed right now until we get a replacement?
>

I'd be inclined to agree. Unless Adrian objects, I think it'd be a
good idea to go ahead and commit the additional linkage until he does
get it hashed out.

Thanks,

Kyle Evans
Received on Fri Feb 21 2020 - 19:57:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:23 UTC