* 2.22-rc1 build fails if configured with --disable-static @ 2012-07-27 11:55 Petr Uzel 2012-07-30 7:21 ` Sami Kerola 2012-08-02 18:27 ` Karel Zak 0 siblings, 2 replies; 5+ messages in thread From: Petr Uzel @ 2012-07-27 11:55 UTC (permalink / raw) To: util-linux [-- Attachment #1: Type: text/plain, Size: 3172 bytes --] Hi list, I just encountered that 2.22-rc1 build fails if ./configure --disable-static make The error I'm getting is: ================== ... /bin/sh ./libtool --tag=CC --mode=link gcc -std=gnu99 -DTEST_PROGRAM -I./libblkid/src -I./libblkid/src -I./libuuid/src -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -D_GNU_SOURCE libuuid.la -static -o test_blkid_cache libblkid/src/test_blkid_cache-cache.o libblkid.la libtool: link: gcc -std=gnu99 -DTEST_PROGRAM -I./libblkid/src -I./libblkid/src -I./libuuid/src -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -D_GNU_SOURCE -o test_blkid_cache libblkid/src/test_blkid_cache-cache.o ./.libs/libuuid.so ./.libs/libblkid.so /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/.libs/libuuid.so -Wl,-rpath -Wl,/home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/.libs -Wl,-rpath -Wl,/usr/lib64 libblkid/src/test_blkid_cache-cache.o: In function `blkid_get_cache_filename': /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:113: undefined reference to `safe_getenv' /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:115: undefined reference to `blkid_strdup' /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:117: undefined reference to `blkid_strdup' /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:119: undefined reference to `blkid_read_config' /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:125: undefined reference to `blkid_free_config' /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:121: undefined reference to `blkid_strdup' libblkid/src/test_blkid_cache-cache.o: In function `blkid_get_cache': /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:162: undefined reference to `blkid_read_cache' /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:158: undefined reference to `blkid_strdup' libblkid/src/test_blkid_cache-cache.o: In function `blkid_put_cache': /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:178: undefined reference to `blkid_flush_cache' /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:188: undefined reference to `blkid_free_dev' /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:203: undefined reference to `blkid_free_tag' /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:205: undefined reference to `blkid_free_tag' libblkid/src/test_blkid_cache-cache.o: In function `blkid_gc_cache': /home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1/libblkid/src/cache.c:233: undefined reference to `blkid_free_dev' collect2: error: ld returned 1 exit status make[2]: *** [test_blkid_cache] Error 1 make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/abuild/rpmbuild/BUILD/util-linux-2.22-rc1' make: *** [all] Error 2 ================== Anyone else getting this? Petr -- Petr Uzel IRC: ptr_uzl @ freenode [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.22-rc1 build fails if configured with --disable-static 2012-07-27 11:55 2.22-rc1 build fails if configured with --disable-static Petr Uzel @ 2012-07-30 7:21 ` Sami Kerola 2012-07-30 13:49 ` Mike Frysinger 2012-08-02 18:27 ` Karel Zak 1 sibling, 1 reply; 5+ messages in thread From: Sami Kerola @ 2012-07-30 7:21 UTC (permalink / raw) To: util-linux On Fri, Jul 27, 2012 at 1:55 PM, Petr Uzel <petr.uzel@suse.cz> wrote: > I just encountered that 2.22-rc1 build fails if > > ./configure --disable-static > make > > The error I'm getting is: [snip] > Anyone else getting this? Yes, this seems to happen on all systems. I am not sure if my proposed fix is what is wanted. Maybe there is a way to make tests to compile, but I do not how with the current set up; meaning tests mixed with lib code. The following changes since commit 506eb04c3ddfda6257cfb332454fe7ce273a3230: docs: add note about partx output change (2012-07-27 10:17:10 +0200) are available in the git repository at: git://github.com/kerolasa/lelux-utiliteetit.git disable-static for you to fetch changes up to 2d0c4a51d7963286f785953eb292ba1d125f6b9f: >From 2d0c4a51d7963286f785953eb292ba1d125f6b9f Mon Sep 17 00:00:00 2001 From: Sami Kerola <kerolasa@iki.fi> Date: Mon, 30 Jul 2012 09:03:08 +0200 Subject: [PATCH] build-sys: do not build library tests when --disable-static is in use Organization: TomTom International B.V. Code for tests is in same directory with library code, which means LDFLAGS=-static is needed to separate objects. That also means when configure has option --disable-static building of the tests fail. Alternatively code for tests could be moved to tests/helpers/ directory, which may happen in future. Reported-by: Petr Uzel <petr.uzel@suse.cz> References: http://www.spinics.net/lists/util-linux-ng/msg06648.html Signed-off-by: Sami Kerola <kerolasa@iki.fi> --- configure.ac | 6 ++++++ libblkid/src/Makemodule.am | 4 ++++ libmount/src/Makemodule.am | 2 ++ 3 files changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index e32a1c1..d129bac 100644 --- a/configure.ac +++ b/configure.ac @@ -856,6 +856,12 @@ if test "x$build_fallocate" = xyes; then fi +if test "$enable_shared" = no; then + AC_MSG_WARN([Disabling shared libraries is incompatible with building library tests.]) +fi +AM_CONDITIONAL(BUILD_LIBRARY_TESTS, test "x$enable_shared" = xyes) + + AC_ARG_ENABLE([unshare], AS_HELP_STRING([--disable-unshare], [do not build unshare]), [], enable_unshare=check diff --git a/libblkid/src/Makemodule.am b/libblkid/src/Makemodule.am index af1764c..7a1fe6c 100644 --- a/libblkid/src/Makemodule.am +++ b/libblkid/src/Makemodule.am @@ -131,6 +131,8 @@ EXTRA_DIST += \ libblkid/src/blkid.sym \ libblkid/src/blkid.h.in +if !BUILD_LIBRARY_TESTS + noinst_PROGRAMS += \ test_blkid_cache \ test_blkid_config \ @@ -210,6 +212,8 @@ test_blkid_verify_CFLAGS = $(blkid_tests_cflags) test_blkid_verify_LDFLAGS = $(blkid_tests_ldflags) test_blkid_verify_LDADD = $(blkid_tests_ldadd) +endif # BUILD_LIBRARY_TESTS + # move lib from $(usrlib_execdir) to $(libdir) if needed install-exec-hook-libblkid: if test "$(usrlib_execdir)" != "$(libdir)"; then \ diff --git a/libmount/src/Makemodule.am b/libmount/src/Makemodule.am index 211834e..a82f7a4 100644 --- a/libmount/src/Makemodule.am +++ b/libmount/src/Makemodule.am @@ -50,6 +50,7 @@ EXTRA_DIST += \ libmount/src/libmount.sym \ libmount/src/libmount.h.in +if !BUILD_LIBRARY_TESTS noinst_PROGRAMS += \ test_mount_cache \ test_mount_context \ @@ -114,6 +115,7 @@ test_mount_version_CFLAGS = $(libmount_tests_cflags) test_mount_version_LDFLAGS = $(libmount_tests_ldflags) test_mount_version_LDADD = $(libmount_tests_ldadd) +endif # BUILD_LIBRARY_TESTS # move lib from $(usrlib_execdir) to $(libdir) if needed install-exec-hook-libmount: -- 1.7.9.5 -- Sami Kerola http://www.iki.fi/kerolasa/ ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: 2.22-rc1 build fails if configured with --disable-static 2012-07-30 7:21 ` Sami Kerola @ 2012-07-30 13:49 ` Mike Frysinger 2012-07-30 16:02 ` Karel Zak 0 siblings, 1 reply; 5+ messages in thread From: Mike Frysinger @ 2012-07-30 13:49 UTC (permalink / raw) To: kerolasa; +Cc: util-linux [-- Attachment #1: Type: Text/Plain, Size: 840 bytes --] On Monday 30 July 2012 03:21:27 Sami Kerola wrote: > On Fri, Jul 27, 2012 at 1:55 PM, Petr Uzel <petr.uzel@suse.cz> wrote: > > I just encountered that 2.22-rc1 build fails if > > > > ./configure --disable-static > > make > > > The error I'm getting is: > [snip] > > > Anyone else getting this? > > Yes, this seems to happen on all systems. I am not sure if my > proposed fix is what is wanted. Maybe there is a way to make > tests to compile, but I do not how with the current set up; > meaning tests mixed with lib code. these tests shouldn't be built in the first place by `make all` > --- a/libblkid/src/Makemodule.am > +++ b/libblkid/src/Makemodule.am > > +if !BUILD_LIBRARY_TESTS > + > noinst_PROGRAMS += \ > test_blkid_cache \ > test_blkid_config \ these should be in check_PROGRAMS -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.22-rc1 build fails if configured with --disable-static 2012-07-30 13:49 ` Mike Frysinger @ 2012-07-30 16:02 ` Karel Zak 0 siblings, 0 replies; 5+ messages in thread From: Karel Zak @ 2012-07-30 16:02 UTC (permalink / raw) To: Mike Frysinger; +Cc: kerolasa, util-linux On Mon, Jul 30, 2012 at 09:49:29AM -0400, Mike Frysinger wrote: > > noinst_PROGRAMS += \ > > test_blkid_cache \ > > test_blkid_config \ > > these should be in check_PROGRAMS Ah, nice idea. Fixed. Thanks! Karel -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.22-rc1 build fails if configured with --disable-static 2012-07-27 11:55 2.22-rc1 build fails if configured with --disable-static Petr Uzel 2012-07-30 7:21 ` Sami Kerola @ 2012-08-02 18:27 ` Karel Zak 1 sibling, 0 replies; 5+ messages in thread From: Karel Zak @ 2012-08-02 18:27 UTC (permalink / raw) To: util-linux On Fri, Jul 27, 2012 at 01:55:23PM +0200, Petr Uzel wrote: > I just encountered that 2.22-rc1 build fails if > > ./configure --disable-static > make > > The error I'm getting is: Fixed - "make check" is required to build tests - ./configure setups BUILD_LIBMOUNT_TESTS and BUILD_LIBBLKID_TESTS and the libtool variable $enable_static is required (so --disable-static disables the tests too). Karel -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-02 18:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-07-27 11:55 2.22-rc1 build fails if configured with --disable-static Petr Uzel 2012-07-30 7:21 ` Sami Kerola 2012-07-30 13:49 ` Mike Frysinger 2012-07-30 16:02 ` Karel Zak 2012-08-02 18:27 ` Karel Zak
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 NNTP newsgroup(s).