[PATCH libevdev] Disable test-static-link in case of shared only build.

Peter Seiderer ps.report at gmx.net
Fri Mar 13 14:05:28 PDT 2015


Hello Peter,

On Tue, Mar 10, 2015 at 08:48:15AM +1000, Peter Hutterer wrote:
> On Mon, Mar 09, 2015 at 10:47:26PM +0100, Peter Seiderer wrote:
> > Fixes the following buildroot compile failure:
> > 
> > libtool: link: [..]/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu99 -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -o test-static-link test_static_link-test-link.o  ../libevdev/.libs/libevdev.so -Wl,-rpath -Wl,[...]/build/libevdev-1.4/libevdev/.libs
> > [...]/arm-buildroot-linux-uclibcgnueabi/bin/ld: attempted static link of dynamic object `../libevdev/.libs/libevdev.so'
> > collect2: error: ld returned 1 exit status
> > Makefile:719: recipe for target 'test-static-link' failed
> > 
> > Signed-off-by: Peter Seiderer <ps.report at gmx.net>
> > ---
> >  configure.ac     | 1 +
> >  test/Makefile.am | 7 ++++++-
> >  2 files changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index c25b36f..be2e157 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -75,6 +75,7 @@ else
> >  fi
> >  AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"])
> >  AM_CONDITIONAL(ENABLE_RUNTIME_TESTS, [test "x$HAVE_CHECK" = "xyes"])
> > +AM_CONDITIONAL(ENABLE_STATIC_LINK_TEST, [test "x$enable_static" = "xyes"])
> >  
> >  with_cflags=""
> >  if test "x$GCC" = "xyes"; then
> > diff --git a/test/Makefile.am b/test/Makefile.am
> > index ab4752e..1fe1e7e 100644
> > --- a/test/Makefile.am
> > +++ b/test/Makefile.am
> > @@ -1,4 +1,9 @@
> > -build_tests = test-compile-pedantic test-link test-static-link
> > +build_tests = test-compile-pedantic test-link
> > +
> > +if ENABLE_STATIC_LINK_TEST
> > +build_tests += test-static-link
> > +endif
> > +
> >  noinst_PROGRAMS = $(build_tests)
> >  
> >  AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/libevdev
> > -- 
> > 2.1.4
> 
> ACK, but have a look at the HAVE_NM section in that makefile (and
> configure.ac), you'll still end up building it when it gets pulled in by the
> static link test. That should fail on your box during make check.
> 

Ahh, I see...(pure luck in the buildroot case, never calls 'make check' as it is a cross compile),
will try to cook up a patch fixing the 'make check' case too...

Regards,
Peter

> Cheers,
>    Peter


More information about the Input-tools mailing list