[CRIU] failing to build in launchpad upload environment

Tycho Andersen tycho.andersen at canonical.com
Thu Jun 30 07:08:55 PDT 2016


On Thu, Jun 30, 2016 at 04:51:55PM +0300, Cyrill Gorcunov wrote:
> On Tue, Jun 28, 2016 at 08:45:47AM -0600, Tycho Andersen wrote:
> > Hi guys,
> > 
> > CRIU is failing to build in our launchpad upload environment:
> > 
> > https://launchpadlibrarian.net/268362103/buildlog_ubuntu-yakkety-amd64.criu_2.2-1_BUILDING.txt.gz
> > 
> > We applied this patch for to debian/rules (and our most recent upload
> > to yakkety):
> > 
> > override_dh_auto_build:
> > 	# CRIU doesn't talk to the linker through gcc
> > 	LDFLAGS=-Bsymbolic-functions dh_auto_build
> > 
> > and it built fine. I noticed the latest debian upload has a changelog entry
> > that drops something that sounds suspiciously similar:
> > 
> >   * Drop build-Don-t-pass-wrap-on-every-linking-file-only-for.patch
> > 
> > but I'm not sure why it would build in debian then and not in ubuntu.
> > 
> > Any ideas on what the best fix of this is so we can keep debian and ubuntu in
> > sync?
> 
> Hi Tycho, I somehow missing -- the build system passes additional LDFLAGS?
> It seems so from your log (which happens when we build library and final criu
> executable -- gcc called and it executes ld underneath). So I would simply
> 
> LDFLAGS=$(filter-out -Bsymbolic-functions, $(LDFLAGS))
> 
> in your script. Or you really need it? Or maybe I miss something obvious?

Well, we'd like to avoid any build-script specific hacks to keep in
line with debian.

The build system passes its own LDFLAGS, but it passes them with the
gcc wrappers "-Wl". The problem is that CRIU's makefiles use ld
directly, and don't invoke it through gcc, and ld doesn't recognize
the -Wl bits.

I'm not sure how/why this works in the debian builds, because
presumably they're passing the same flags. Perhaps Salvatore can
elaborate?

Tycho


More information about the CRIU mailing list