linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Karel Zak <kzak@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	util-linux-ng@vger.kernel.org
Subject: Re: [ANNOUNCE] util-linux-ng v2.16-rc2
Date: Fri, 03 Jul 2009 11:29:41 +0200	[thread overview]
Message-ID: <1246613381.1923.9.camel@yio.site> (raw)
In-Reply-To: <ac3eb2510907021332l2d0c1908s19d01c994f42b549@mail.gmail.com>

On Thu, 2009-07-02 at 22:32 +0200, Kay Sievers wrote:
> On Thu, Jul 2, 2009 at 20:10, Karel Zak<kzak@redhat.com> wrote:
> >
> > The second util-linux-ng 2.16 release candidate is available at
> >
> >   ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.16/
> >
> > Feedback and bug reports, as always, are welcomed.
> 
> It builds fine on the host, but fails to build in a clean chroot:
> 
> The hack with moving the devel files around to /usr with an install
> hook breaks the values stored in the libblkid.la file and relinking
> fails, because the lib devel files are now no longer in /lib but
> (silently) moved to /usr/lib:
> 
> libtool: relink: gcc -std=gnu99 -shared  .libs/cache.o .libs/dev.o
> .libs/devname.o .libs/devno.o .libs/getsize.o .libs/llseek.o
> .libs/probe.o .libs/read.o .libs/resolve.o .libs/save.o .libs/tag.o
> .libs/version.o .libs/verify.o .libs/encode.o .libs/config.o
> .libs/evaluate.o .libs/blkdev.o .libs/linux_version.o
> .libs/canonicalize.o .libs/md5.o  -Wl,--whole-archive
> probers/.libs/libblkid_probers.a -Wl,--no-whole-archive
> -L/var/tmp/util-linux-2.16-build/lib64 -L/lib64 -luuid
> -Wl,--version-script=../../../shlibs/blkid/src/blkid.sym   -Wl,-soname
> -Wl,libblkid.so.1 -o .libs/libblkid.so.1.0.0
> /usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld:
> cannot find -luuid
> collect2: ld returned 1 exit status
> 
> That the .so is installed in the root is really the implementation
> detail that should be hidden from anything but the ld loader on the
> system. I guess, we want to keep the original --libdir value, and use
> a --rootlibdir as it's own parameter, or something similar, and just
> move the .so image to the root with the install hook (or the spec
> file), instead of moving the devel stuff, faking the .pc files and
> patching the .la files. :)

This seems to make it work in the chroot.

It turns around the logic, and installs the libs in /usr, and moves
the .so to /, so the devel links and the .la files are not changed.

Thanks,
Kay


diff --git a/shlibs/blkid/src/Makefile.am b/shlibs/blkid/src/Makefile.am
index 8b1f46b..b585f0a 100644
--- a/shlibs/blkid/src/Makefile.am
+++ b/shlibs/blkid/src/Makefile.am
@@ -21,7 +21,7 @@ AM_CPPFLAGS += -I$(ul_libblkid_srcdir) $(common_cflags)
 blkidincdir = $(includedir)/blkid
 blkidinc_HEADERS = blkid.h
 
-lib_LTLIBRARIES = libblkid.la
+usrlibexec_LTLIBRARIES = libblkid.la
 libblkid_la_SOURCES = cache.c dev.c devname.c devno.c getsize.c llseek.c  \
 		     probe.c read.c resolve.c save.c tag.c version.c verify.c \
 		     encode.c blkid.h list.h blkidP.h probers/probers.h \
@@ -49,17 +49,15 @@ test_%: %.c
 	$(COMPILE) -DTEST_PROGRAM $< .libs/libblkid.a -o $@ $(common_ldadd)
 
 
-# move devel files from $(libdir) to $(usrlibexecdir) if needed
+# move lib from $(usrlibexecdir) to $(libdir) if needed
 install-data-hook:
-	rm  $(DESTDIR)$(libdir)/$(lib_LTLIBRARIES)
 	if test "$(usrlibexecdir)" != "$(libdir)"; then \
-		mkdir -p $(DESTDIR)$(usrlibexecdir); \
+		mkdir -p $(DESTDIR)$(libdir); \
 		mv $(DESTDIR)$(libdir)/libblkid.a $(DESTDIR)$(usrlibexecdir)/; \
-		so_img_name=$$(readlink $(DESTDIR)$(libdir)/libblkid.so); \
-		rm $(DESTDIR)$(libdir)/libblkid.so; \
+		so_img_name=$$(readlink $(DESTDIR)$(usrlibexecdir)/libblkid.so); \
 		so_img_rel_target=$$(echo $(usrlibexecdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
-		ln -sf  $$so_img_rel_target$(libdir)/$$so_img_name \
-			$(DESTDIR)$(usrlibexecdir)/libblkid.so; \
+		ln -sf  $$so_img_rel_target$(libdir)/$$so_img_name $(DESTDIR)$(usrlibexecdir)/libblkid.so; \
+		mv $(DESTDIR)$(usrlibexecdir)/libblkid.so.* $(DESTDIR)$(libdir); \
 	fi
 
 uninstall-hook:
diff --git a/shlibs/uuid/src/Makefile.am b/shlibs/uuid/src/Makefile.am
index fff1152..cdd51db 100644
--- a/shlibs/uuid/src/Makefile.am
+++ b/shlibs/uuid/src/Makefile.am
@@ -10,7 +10,7 @@ tst_uuid_CFLAGS = -I$(ul_libuuid_srcdir)
 uuidincdir = $(includedir)/uuid
 uuidinc_HEADERS = uuid.h
 
-lib_LTLIBRARIES = libuuid.la
+usrlibexec_LTLIBRARIES = libuuid.la
 libuuid_la_SOURCES = clear.c compare.c copy.c gen_uuid.c \
            isnull.c pack.c parse.c unpack.c unparse.c uuidd.h \
            uuidd.h uuidP.h uuid_time.c $(uuidinc_HEADERS)
@@ -30,17 +30,15 @@ test_%: %.c
 	$(COMPILE) -DTEST_PROGRAM $< .libs/libuuid.a -o $@
 
 
-# move devel files from $(libdir) to $(usrlibexecdir) if needed
+# move lib from $(usrlibexecdir) to $(libdir) if needed
 install-data-hook:
-	rm  $(DESTDIR)$(libdir)/$(lib_LTLIBRARIES)
 	if test "$(usrlibexecdir)" != "$(libdir)"; then \
-		mkdir -p $(DESTDIR)$(usrlibexecdir); \
+		mkdir -p $(DESTDIR)$(libdir); \
 		mv $(DESTDIR)$(libdir)/libuuid.a $(DESTDIR)$(usrlibexecdir)/; \
-		so_img_name=$$(readlink $(DESTDIR)$(libdir)/libuuid.so); \
-		rm $(DESTDIR)$(libdir)/libuuid.so; \
+		so_img_name=$$(readlink $(DESTDIR)$(usrlibexecdir)/libuuid.so); \
 		so_img_rel_target=$$(echo $(usrlibexecdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
-		ln -sf  $$so_img_rel_target$(libdir)/$$so_img_name \
-			$(DESTDIR)$(usrlibexecdir)/libuuid.so; \
+		ln -sf  $$so_img_rel_target$(libdir)/$$so_img_name $(DESTDIR)$(usrlibexecdir)/libuuid.so; \
+		mv $(DESTDIR)$(usrlibexecdir)/libuuid.so.* $(DESTDIR)$(libdir); \
 	fi
 
 uninstall-hook:



  reply	other threads:[~2009-07-03  9:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 18:10 [ANNOUNCE] util-linux-ng v2.16-rc2 Karel Zak
     [not found] ` <20090702181031.GB4122-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>
2009-07-02 20:32   ` Kay Sievers
2009-07-03  9:29     ` Kay Sievers [this message]
     [not found]       ` <1246613381.1923.9.camel-2/CBIq5w30c@public.gmane.org>
2009-07-03 10:53         ` Karel Zak
2009-07-13 17:05   ` [ANNOUNCE] util-linux-ng v2.16-rc2 -- a small patch Peter Breitenlohner
2009-07-13 17:22     ` [ANNOUNCE] util-linux-ng v2.16-rc2 -- shlib versions Peter Breitenlohner
     [not found]       ` <alpine.LNX.2.00.0907131913010.31109-Dg7zaCZAay86nLM4jOHr9xvVK+yQ3ZXh@public.gmane.org>
2009-07-13 22:01         ` Karel Zak
2009-07-13 18:35     ` [ANNOUNCE] util-linux-ng v2.16-rc2 -- a small patch Karel Zak

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=1246613381.1923.9.camel@yio.site \
    --to=kay.sievers@vrfy.org \
    --cc=kzak@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=util-linux-ng@vger.kernel.org \
    /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 NNTP newsgroup(s).