public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Paul Smith <paul@mad-scientist.net>
Cc: "Frank Ch. Eigler" <fche@redhat.com>, elfutils-devel@sourceware.org
Subject: Re: ** POTENTIAL FRAUD ALERT - RED HAT ** building static libs
Date: Tue, 3 Nov 2020 00:16:34 +0100	[thread overview]
Message-ID: <20201102231634.GB3335@wildebeest.org> (raw)
In-Reply-To: <a31a6b27e294c2556f66a1759e67824b657067ea.camel@mad-scientist.net>

Hi,

(Interesting Subject. Disclaimer, I work for Red Hat, but had no idea
 we had a potential fraud alert detection system :)

On Sat, Oct 31, 2020 at 04:05:52PM -0400, Paul Smith wrote:
> On Sat, 2020-10-31 at 15:52 -0400, Frank Ch. Eigler wrote:
> > > I'd like to build, just as an example, libdebuginfod as ONLY a
> > > static library and link it statically with debuginfod, gdb, etc.
> > 
> > libdebuginfod relies on a bunch of other libraries (curl and all of
> > its dependencies), so a libdebuginfod.a is unlikely to buy you much.
> 
> Oh, I'm aware :).
> 
> I have all those other libraries built statically as well... they're
> pretty easy to build that way actually.
> 
> I'm already statically linking libdebuginfod.a with GDB, along with
> curl et.al.
> 
> But to do it, I need to build elfutils then reach into the build
> directory and pluck out the static library and copy it somewhere else
> then tell GDB to look there instead.
> 
> And, I have no solution for building the debuginfod server itself
> statically.

To be honest I recently removed the static development libraries from
Fedora since nobody was using the (and the only package that dependent
on them did so by accident). And was hoping to eventually remove the
static builds from the code.

That said, I also use parts of it for DTS (Developer ToolSet).  See
the git mjw/RH-DTS branch. But there I use the static bits to
"secretly" create "fake" shared libaries. Using linker scripts that
link the actual elfutils bits static, but any dependencies shared. It
is complicated... 

> > OTOH, libtool is one way to arrange building both .a and .so's from
> > such libraries, and propagate dependencies via the .la files.
> 
> Well, I've had pretty much nothing but problems with libtool TBH, in
> terms of trying to generate general-purpose, relocatable libraries.  In
> my experience the libtool solutions always seem to have some hardcoded
> paths somewhere that cause me to bang my forehead on my desk.
> 
> However, I can work with it if necessary.
> 
> I was mainly hoping someone had looked into this already; it doesn't
> sound like it.

Although I am also not a fan of libtool, it might be the only thing
that can do this cleanly. The current support for static code is
actually only for the libraries and is otherwise only really used for
doing the coverage checks (and it isn't clear that really has to be
done static, that might just be a really old requirement that is no
longer true).

Is there an alternative to libtool you would recommend?

Thanks,

Mark

  reply	other threads:[~2020-11-02 23:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 19:10 Paul Smith
2020-10-31 19:52 ` ** POTENTIAL FRAUD ALERT - RED HAT ** " Frank Ch. Eigler
2020-10-31 20:05   ` Paul Smith
2020-11-02 23:16     ` Mark Wielaard [this message]
2020-11-03 13:46       ` Paul Smith

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=20201102231634.GB3335@wildebeest.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=fche@redhat.com \
    --cc=paul@mad-scientist.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).