[Bug backends/26176] Backend modules of elfutils are always linked to shared library

mark at klomp dot org sourceware-bugzilla@sourceware.org
Sat Jun 27 23:27:56 GMT 2020


--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
(In reply to maarten from comment #2)
> Thanks for the quick reply!
> First, some background what we are trying to do:
> package elfutils using a conan recipe at
> https://github.com/conan-io/conan-center-index/pull/1768
> We would like to provide elfutils as a static and shared library.

Note that we already produce both a shared and static version of
libelf.so/libelf.a, libdw.so/libdw.a and libasm.so/libasm.a in out current
build. Although the static version of libdw.a didn't really work correctly till
0.180 because it was using dlopen.

I was actually going to propose we wouldn't build the static version by default
because I didn't think anybody is actually using it.

What is your use case? And would it be a problem if we dropped building the
static libraries by default, and you had to explicitly build the package with
static libs?

> The original version we were trying to add was 0.173, but I just updated it
> to 0.180 which indeed does not have loadable modules.
> So my problem is indeed gone!


> Some things we had to patch:
> - enable static builds (regardless of gprof or gcov configuration)

Yes, these are odd and almost never used. Once every release we build with gcov
to generate the https://sourceware.org/elfutils/coverage/ but those builds are
not really tested otherwise.

> - disable -Werror

What errors/warnings are you seeing?

> Also, it looks like `libasm.h` and `libdwfl.h` use types defined in
> `gelf.h`, but do not include the header.

There was an issue in libasm.h which got fixed in elfutils-0.178-24-g287a1845
libdwfl.h includes libdw.h which includes gelf.h so should be usable

> Some feedback/comments about these patches would be appreciated.

Could you attach concrete patches to this bug report?

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Elfutils-devel mailing list