All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@vates.tech>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Jan Beulich <jbeulich@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>, Juergen Gross <jgross@suse.com>
Subject: Re: Build system mess in stubdom
Date: Tue, 09 Jul 2024 15:34:23 +0000	[thread overview]
Message-ID: <Zo1YdgWj7E4doGEU@l14> (raw)
In-Reply-To: <44679adf-e657-4d38-b1e3-2bebb34f57a0@citrix.com>

On Tue, Jul 09, 2024 at 02:49:57PM +0100, Andrew Cooper wrote:
> Hello,
>
> I'm trying to investigate why stubdom/ is fatally failing now with a
> rebuilt ArchLinux container (GCC 14).
>
> It is ultimately:
>
> > ../../../../../newlib-1.16.0/newlib/libc/reent/signalr.c:61:14: error:
> > implicit declaration of function ‘kill’; did you mean ‘_kill’?
> > [-Wimplicit-function-declaration]
> >    61 |   if ((ret = _kill (pid, sig)) == -1 && errno != 0)
> >       |              ^~~~~
> > make[7]: *** [Makefile:483: lib_a-signalr.o] Error 1
>
> which doesn't make sense, but is a consequence of the ifdefary in
> newlib/libc/include/_syslist.h
>
> However, we've got problems ahead of that.
>
> First of all, with:
>
> [user@89aef714763e build]$ ./configure --disable-xen --disable-tools
> --disable-docs
> <snip>
> Will build the following stub domains:
>   xenstore-stubdom
>   xenstorepvh-stubdom
> configure: creating ./config.status
> config.status: creating ../config/Stubdom.mk
>
> both a top level `make` and `make stubdom` end up building all of tools,
> contrary to comments in the makefile.

:-(, I never noticed that but yeah, that rules is what end up building
the tools:

    install-stubdom: mini-os-dir install-tools

So unless you use one of the build targets, the top makefile end-up
wanting to also install (or dist) the tools. I don't think we can change
that:
    dc497635d93f ("build system: make install-stubdom depend on install-tools again")

> `make build-stubdom` does (AFAICT) only build stubdom.

How do you make that works with `./configure --disable-tools` ? I've got
this:
    $ make build-stubdom
    <snip>
    make -C tools/include build
    ....tools/include/../../tools/Rules.mk:212: *** You have to run ./configure before building or installing the tools.  Stop.
    make: *** [Makefile:44: build-tools-public-headers] Error 2

> However, building just the xenstore stubdoms recursively builds all of
> tools/libs/ even though only some are needed.  This includes libxl which
> then recurses further to get tools/libacpi, and libxenguest which
> recurses further to get libelf from Xen.

libxl? how? Did you run `make -C stubdom xenstore-stubdom`? Or maybe you
used ./configure to select only "xenstore-stubdom"? In that later case
only the build* targets will only build stubdom, the default target as
well as dist* and install* targets will want to "install-tools" as seen
above.

> What I can't figure out is why xenstore ends up pulling in all of newlib.

I think it's because of these in stubdom/Makefile:
    xenstore: $(CROSS_ROOT) xenstore-minios-config.mk
    $(CROSS_ROOT): cross-newlib cross-zlib cross-libpci

> Semi-irrespective, there's no way we can keep on bodging newlib to
> compile with newer compilers.  There's a whole bunch of other warnings
> (strict-prototypes, dangling-else, maybe-uninitialized, unused-function,
> pointer-sign, unused-variable) primed ready to cause breakage in any
> environment which makes these error by default.
>
> I'm going to be making ArchLinux non-blocking because it is a rolling
> distro, but we also can't do nothing here.

I guess we could try to update newlib, 1.16 is from 2007 apparently, and
there's now 4.4 from last year.

Cheers,

--

Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech



  parent reply	other threads:[~2024-07-09 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 13:49 Build system mess in stubdom Andrew Cooper
2024-07-09 13:53 ` Andrew Cooper
2024-07-09 14:55 ` Jan Beulich
2024-07-09 15:18   ` Andrew Cooper
2024-07-09 15:21   ` Charles Arnold
2024-07-09 15:34 ` Anthony PERARD [this message]
2024-07-09 16:46   ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zo1YdgWj7E4doGEU@l14 \
    --to=anthony.perard@vates.tech \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.