[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug default/19705] Can't build from HEAD without change



https://sourceware.org/bugzilla/show_bug.cgi?id=19705

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from dodji at redhat dot com ---
Thank you for taking the time to file this problem report.

> elfutils, libtool, libelf-dev, libdw-dev
> 
> It might be nice to mention these in the doc.

Right.  I guess you mean the COMPILING file in the source tree.  elfutils at
least is mentioned at https://www.sourceware.org/libabigail/#compile.

I need to add libtool there.  The COMPILING file is rather completely out of
date, I'll update it.  And I'll update the website too.

As for libelf-dev and libdw-dev, they should be part of the development variant
of elfutils, shouldn't they?  On my system, for instance, trying to install
elfutils-devel will install the packages necessary for the libraries (and
header files) of libelf and libdw.  Those two components are parts of the
elfutils project anyway.

I am asking this just so that I can in the docs to install the development
variants of the 'elfutils' package, without having to go into the specifics of
how each distro splits up its things.

In the mean time, I am committing this change into master to fix things
somewhat:
https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commitdiff;h=f48c0ef201a9d3051d34f1966a03fcc367fa62c8

> After running configure/make, I got a whole bunch of failures caused by
> unresolved externals to pthread_create() and the like. I fixed it by adding
> -pthread to tests/Makefile.am and tools/Makefile.am.

Weird, obviously, I don't get this on my system.

> git diff is:
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index caf49e6..36f3f29 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -14,6 +14,8 @@ CXX11_TESTS += runtestsvg
>  AM_CXXFLAGS = "-std=gnu++11"
>  endif
>  
> +AM_LDFLAGS = -pthread

This hunk makes all test binaries link with pthread, even those that don't need
it directly.  I'd rather have the tests that need pthreads *directly* to link
with it, and only those.

I think what is making all the test binaries blow up at link time is that
libabigail.so now uses pthreads, via the abigail::workers namespace.  And I
forgot the make the library itself link with pthread.  And your system might be
using more aggressive linking flags than mine :-)

So I think we should rather make libabigail.so itself link with pthreads.


>  TESTS=                         \
>  runtestreaddwarf               \
>  runtestcanonicalizetypes.sh    \
> diff --git a/tools/Makefile.am b/tools/Makefile.am
> index 6125842..de2dcad 100644
> --- a/tools/Makefile.am
> +++ b/tools/Makefile.am
> @@ -8,6 +8,8 @@ endif
>  
>  noinst_PROGRAMS = abisym abinilint
>  
> +AM_LDFLAGS = -pthread
> +

I have the same comment for the tools.  the only program using pthreads
directly in the tools is abipkgdiff.  Thus, no other tool should link with
pthreads.

[...]

> -abinilint_LDFLAGS = $(abs_top_builddir)/src/libabigail.la
> +abinilint_LDADD = $(abs_top_builddir)/src/libabigail.la

Ah, this one is a real typo.  Thanks for spotting that!

[...]

So, I have committed this patch to the master git branch, to make libabigail.so
itself to link with pthreads and fix the typo above:
https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commitdiff;h=12d56c861b77a0a462f59c90315c7ae6f94d658a

Hopefully the two patches should address your issues.

Please re-open the bug if you feel like they don't.

Thank you a lot for your time!

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