All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Wei Liu <wei.liu2@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Cc: samuel.thibault@ens-lyon.org, xuquan8@huawei.com,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	dgdegra@tycho.nsa.gov
Subject: Re: Stubdom GMP build failure for gcc 6
Date: Fri, 28 Oct 2016 16:44:10 +0200	[thread overview]
Message-ID: <72113d2b-153a-80f3-9587-63cea16938de@suse.com> (raw)
In-Reply-To: <20161028121057.GE30231@citrix.com>

On 28/10/16 14:10, Wei Liu wrote:
> Hi all
> 
> There have been a few reports on stubdom build failure with gcc 6
> toolchain. I spent some time yesterday to figure what went wrong. Here
> is what I found.
> 
> When building GMP library, its configure script generates small C
> programs to determine various aspects of the system. Unfortunately the
> build rune for it is incorrect, so the test program ends up consuming
> newlib headers while linking against the host glibc. It's amazing that
> this even worked in the past few years! :-)
> 
> Unfortunately my attempt to fix it by providing LDFLAGS="-nostdlib
> -LXXX" doesn't work. It turns out that there is no crt generated in
> newlib. I'm not sure if that's because the newlib port is incomplete or
> I haven't discovered a way to teach it to generate one.
> 
> So what should we do with this? I'm not sure if I can come up with a
> non-intrusive patch quickly.  GMP is only used by tpm emulator, so for
> the imminent 4.8 release I can write a patch to disable building that.
> 
> Ultimately we need to have a proper solution, because there can be other
> breakages in the future. And I do wish users who need tpm emulator can
> continue to use it. I don't have a clear answer as to how many people
> care about this and how can we fix it.
> 
> Thoughts?

I just tried to verify it is working (or failing) for me. On the machine
I normally did my Xen builds cmake was missing so it never tried to
build libgmp. After installing it I saw the following problem:

at the end of libgmp build:
Libraries have been installed in:
   /home/gross/xen/stubdom/cross-root-x86_64/x86_64-xen-elf/lib64

and when trying to link stubdom-vtpm:
make[2]: Entering directory '/home/gross/xen/extras/mini-os-remote'
ld -r -d -nostdlib
-L/home/gross/xen/stubdom/cross-root-x86_64/x86_64-xen-elf/lib  -m
elf_x86_64 -\( /home/gross/xen/stubdom/vtpm/vtpm.a -T app.lds -\) -ltpm
-ltpm_crypto -lgmp -lpolarssl --undefined main -o
/home/gross/xen/stubdom/mini-os-x86_64-vtpm/mini-os_app.o
ld: cannot find -lgmp

manually adding
"-L/home/gross/xen/stubdom/cross-root-x86_64/x86_64-xen-elf/lib64" lets
the link command succeed.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-10-28 14:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28 12:10 Stubdom GMP build failure for gcc 6 Wei Liu
2016-10-28 12:29 ` Jan Beulich
2016-10-28 12:50   ` Wei Liu
2016-10-28 12:56     ` Jan Beulich
2016-10-28 12:59       ` Wei Liu
2016-10-29 17:19     ` Wei Liu
2016-10-28 13:30 ` Ian Jackson
2016-10-28 13:36   ` Wei Liu
2016-10-28 15:42     ` Ian Jackson
2016-10-28 14:44 ` Juergen Gross [this message]
2016-10-28 15:38   ` Wei Liu
2016-10-29  5:16 Pry Mar
2016-10-29 17:28 ` Wei Liu

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=72113d2b-153a-80f3-9587-63cea16938de@suse.com \
    --to=jgross@suse.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xuquan8@huawei.com \
    /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.