* [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
@ 2008-07-07 22:12 Thomas Koeller
2008-07-08 6:53 ` Harald Hoyer
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Thomas Koeller @ 2008-07-07 22:12 UTC (permalink / raw)
To: linux-hotplug
Installing 64-bit libraries in /lib and /usr/lib
is wrong.
Signed-off-by: Thomas Koeller <thomas@koeller.dyndns.org>
---
| 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
--git a/extras/volume_id/lib/Makefile b/extras/volume_id/lib/Makefile
index 96ee8f5..95bb2ed 100644
--- a/extras/volume_id/lib/Makefile
+++ b/extras/volume_id/lib/Makefile
@@ -5,8 +5,9 @@
# Released under the GNU General Public License, version 2.
#
includedir = ${prefix}/usr/include
-libdir = ${prefix}/lib
-usrlibdir = ${prefix}/usr/lib
+oslibdir = $(shell $(CC) $(CFLAGS) -print-multi-os-directory)
+libdir = $(realpath ${prefix}/lib/$(oslibdir))
+usrlibdir = $(realpath ${prefix}/usr/lib/$(oslibdir))
INSTALL = install -c
INSTALL_DATA = ${INSTALL} -m 644
--
1.5.6.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
@ 2008-07-08 6:53 ` Harald Hoyer
2008-07-09 19:51 ` Thomas Koeller
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Harald Hoyer @ 2008-07-08 6:53 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 203 bytes --]
Thomas Koeller wrote:
> Installing 64-bit libraries in /lib and /usr/lib
> is wrong.
>
Fedora has the attached patch and builds on 64bit systems with:
$ make libdir="/lib64" usrlibdir="/usr/lib64" ...
[-- Attachment #1.2: udev-091-lib64.patch --]
[-- Type: text/plain, Size: 2346 bytes --]
diff -up udev-120/extras/volume_id/lib/Makefile.lib64 udev-120/extras/volume_id/lib/Makefile
--- udev-120/extras/volume_id/lib/Makefile.lib64 2008-04-04 14:13:33.000000000 +0200
+++ udev-120/extras/volume_id/lib/Makefile 2008-04-04 14:15:05.000000000 +0200
@@ -4,9 +4,9 @@
#
# Released under the GNU General Public License, version 2.
#
-includedir = ${prefix}/usr/include
-libdir = ${prefix}/lib
-usrlibdir = ${prefix}/usr/lib
+includedir ?= ${prefix}/usr/include
+libdir ?= ${prefix}/lib
+usrlibdir ?= ${prefix}/usr/lib
INSTALL = install -c
INSTALL_DATA = ${INSTALL} -m 644
@@ -115,6 +115,7 @@ ifeq ($(libdir),$(usrlibdir))
else
ln -sf $(libdir)/$(SHLIB) $(DESTDIR)$(usrlibdir)/libvolume_id.so
endif
+ $(INSTALL_LIB) -D libvolume_id.a $(DESTDIR)$(usrlibdir)/libvolume_id.a
$(INSTALL) -d $(DESTDIR)$(usrlibdir)/pkgconfig
$(INSTALL_DATA) libvolume_id.pc $(DESTDIR)$(usrlibdir)/pkgconfig/libvolume_id.pc
.PHONY: install
diff -up udev-120/extras/volume_id/Makefile.lib64 udev-120/extras/volume_id/Makefile
--- udev-120/extras/volume_id/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200
+++ udev-120/extras/volume_id/Makefile 2008-04-04 14:13:33.000000000 +0200
@@ -17,6 +17,9 @@ usrsbindir = ${prefix}/usr/sbin
libudevdir = ${prefix}/lib/udev
mandir = ${prefix}/usr/share/man
configdir = ${etcdir}/udev/
+libdir ?= ${prefix}/lib
+usrlibdir ?= ${prefix}/usr/lib
+
INSTALL = install -c
INSTALL_PROGRAM = ${INSTALL}
@@ -34,7 +37,11 @@ all: lib $(PROG) $(MAN_PAGES)
$(Q) $(CC) -c $(CFLAGS) $< -o $@
lib:
- $(Q) $(MAKE) -C $@
+ $(Q) $(MAKE) \
+ libdir=$(libdir) \
+ usrlibdir=$(usrlibdir) \
+ -C lib
+# $(Q) $(MAKE) -C $@
.PHONY: lib
lib/libvolume_id.a: lib
diff -up udev-120/Makefile.lib64 udev-120/Makefile
--- udev-120/Makefile.lib64 2008-04-03 21:12:53.000000000 +0200
+++ udev-120/Makefile 2008-04-04 14:13:33.000000000 +0200
@@ -91,6 +91,8 @@ usrbindir = ${prefix}/usr/bin
libudevdir = ${prefix}/lib/udev
mandir = ${prefix}/usr/share/man
configdir = ${etcdir}/udev
+libdir ?= ${prefix}/lib
+usrlibdir ?= ${prefix}/usr/lib
udevdir = /dev
DESTDIR =
@@ -161,6 +163,8 @@ all: $(PROGRAMS) $(MAN_PAGES)
RANLIB="$(RANLIB)" \
LIB_OBJS="$(LIB_OBJS)" \
LIBUDEV="$(PWD)/$(LIBUDEV)" \
+ libdir=$(libdir) \
+ usrlibdir=$(usrlibdir) \
-C $$target $@ || exit 1; \
done;
.PHONY: all
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3636 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
2008-07-08 6:53 ` Harald Hoyer
@ 2008-07-09 19:51 ` Thomas Koeller
2008-07-09 21:26 ` Kay Sievers
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Koeller @ 2008-07-09 19:51 UTC (permalink / raw)
To: linux-hotplug
I see. However, with the proposed patch you can simply run
'make' without overloading any variables manually. The
patch is also simpler.
tk
On Dienstag, 8. Juli 2008, Harald Hoyer wrote:
> Thomas Koeller wrote:
> > Installing 64-bit libraries in /lib and /usr/lib
> > is wrong.
>
> Fedora has the attached patch and builds on 64bit systems with:
> $ make libdir="/lib64" usrlibdir="/usr/lib64" ...
--
Thomas Koeller
thomas at koeller dot dyndns dot org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
2008-07-08 6:53 ` Harald Hoyer
2008-07-09 19:51 ` Thomas Koeller
@ 2008-07-09 21:26 ` Kay Sievers
2008-07-09 21:35 ` Thomas Koeller
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2008-07-09 21:26 UTC (permalink / raw)
To: linux-hotplug
On Tue, Jul 8, 2008 at 08:53, Harald Hoyer <harald@redhat.com> wrote:
> Thomas Koeller wrote:
>>
>> Installing 64-bit libraries in /lib and /usr/lib
>> is wrong.
>>
>
> Fedora has the attached patch and builds on 64bit systems with:
> $ make libdir="/lib64" usrlibdir="/usr/lib64" ...
This is not needed, it works fine without the patch. We all do it that
way for long.
> diff -up udev-120/extras/volume_id/lib/Makefile.lib64
> udev-120/extras/volume_id/lib/Makefile
> + $(INSTALL_LIB) -D libvolume_id.a
What would be the point to package an intermediate internal udev build
file?. This is not a library, and nothing that should be distributed
with a package.
Thanks,
Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
` (2 preceding siblings ...)
2008-07-09 21:26 ` Kay Sievers
@ 2008-07-09 21:35 ` Thomas Koeller
2008-07-09 21:44 ` Kay Sievers
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Koeller @ 2008-07-09 21:35 UTC (permalink / raw)
To: linux-hotplug
When building with 'USE_STATIC = false' in the top level Makefile, which is
the default, a shared library is generated which of course needs to be
installed.
Thomas
On Mittwoch, 9. Juli 2008, Kay Sievers wrote:
> On Tue, Jul 8, 2008 at 08:53, Harald Hoyer <harald@redhat.com> wrote:
> > Thomas Koeller wrote:
> >> Installing 64-bit libraries in /lib and /usr/lib
> >> is wrong.
> >
> > Fedora has the attached patch and builds on 64bit systems with:
> > $ make libdir="/lib64" usrlibdir="/usr/lib64" ...
>
> This is not needed, it works fine without the patch. We all do it that
> way for long.
>
> > diff -up udev-120/extras/volume_id/lib/Makefile.lib64
> > udev-120/extras/volume_id/lib/Makefile
> > + $(INSTALL_LIB) -D libvolume_id.a
>
> What would be the point to package an intermediate internal udev build
> file?. This is not a library, and nothing that should be distributed
> with a package.
>
> Thanks,
> Kay
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Thomas Koeller
thomas@koeller.dyndns.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
` (3 preceding siblings ...)
2008-07-09 21:35 ` Thomas Koeller
@ 2008-07-09 21:44 ` Kay Sievers
2008-07-09 22:03 ` Dan Nicholson
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2008-07-09 21:44 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jul 9, 2008 at 23:35, Thomas Koeller <thomas@koeller.dyndns.org> wrote:
> When building with 'USE_STATIC = false' in the top level Makefile, which is
> the default, a shared library is generated which of course needs to be
> installed.
It's a .a, which is a static lib, not a shared one which is obviously
installed by default. But still, why would someone need that "lib",
which is usually only build to create a static vol_id?
Kay
> On Mittwoch, 9. Juli 2008, Kay Sievers wrote:
>> On Tue, Jul 8, 2008 at 08:53, Harald Hoyer <harald@redhat.com> wrote:
>> > Thomas Koeller wrote:
>> >> Installing 64-bit libraries in /lib and /usr/lib
>> >> is wrong.
>> >
>> > Fedora has the attached patch and builds on 64bit systems with:
>> > $ make libdir="/lib64" usrlibdir="/usr/lib64" ...
>>
>> This is not needed, it works fine without the patch. We all do it that
>> way for long.
>>
>> > diff -up udev-120/extras/volume_id/lib/Makefile.lib64
>> > udev-120/extras/volume_id/lib/Makefile
>> > + $(INSTALL_LIB) -D libvolume_id.a
>>
>> What would be the point to package an intermediate internal udev build
>> file?. This is not a library, and nothing that should be distributed
>> with a package.
>>
>> Thanks,
>> Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
` (4 preceding siblings ...)
2008-07-09 21:44 ` Kay Sievers
@ 2008-07-09 22:03 ` Dan Nicholson
2008-07-09 22:41 ` Thomas Koeller
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Dan Nicholson @ 2008-07-09 22:03 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jul 9, 2008 at 2:44 PM, Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Wed, Jul 9, 2008 at 23:35, Thomas Koeller <thomas@koeller.dyndns.org> wrote:
>> When building with 'USE_STATIC = false' in the top level Makefile, which is
>> the default, a shared library is generated which of course needs to be
>> installed.
>
> It's a .a, which is a static lib, not a shared one which is obviously
> installed by default. But still, why would someone need that "lib",
> which is usually only build to create a static vol_id?
Just for arguments sake, you could statically link libvolume_id.a into
HAL or util-linux or anyone else that wants to use libvolume_id.
However, I'd say that if someone has a special need like that then
they can certainly copy libvolume_id.a manually to $libdir.
--
Dan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
` (5 preceding siblings ...)
2008-07-09 22:03 ` Dan Nicholson
@ 2008-07-09 22:41 ` Thomas Koeller
2008-07-09 22:45 ` Kay Sievers
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Koeller @ 2008-07-09 22:41 UTC (permalink / raw)
To: linux-hotplug
On Mittwoch, 9. Juli 2008, Kay Sievers wrote:
> On Wed, Jul 9, 2008 at 23:35, Thomas Koeller <thomas@koeller.dyndns.org>
wrote:
> > When building with 'USE_STATIC = false' in the top level Makefile, which
> > is the default, a shared library is generated which of course needs to be
> > installed.
>
> It's a .a, which is a static lib, not a shared one which is obviously
> installed by default. But still, why would someone need that "lib",
> which is usually only build to create a static vol_id?
This is from extras/volume_id/lib/Makefile:
SHLIB = libvolume_id.so.$(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE)
...
all: libvolume_id.a $(SHLIB) libvolume_id.pc
As you can see, a shared libvolume_id.so is built, and this is what
actually happens when invoking make with the Makefile unmodified. Try
it if you don't believe me.
Thomas
--
Thomas Koeller
thomas@koeller.dyndns.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
` (6 preceding siblings ...)
2008-07-09 22:41 ` Thomas Koeller
@ 2008-07-09 22:45 ` Kay Sievers
2008-07-09 23:04 ` Thomas Koeller
2008-07-22 13:59 ` Kay Sievers
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2008-07-09 22:45 UTC (permalink / raw)
To: linux-hotplug
On Thu, 2008-07-10 at 00:41 +0200, Thomas Koeller wrote:
> On Mittwoch, 9. Juli 2008, Kay Sievers wrote:
> > On Wed, Jul 9, 2008 at 23:35, Thomas Koeller <thomas@koeller.dyndns.org>
> wrote:
> > > When building with 'USE_STATIC = false' in the top level Makefile, which
> > > is the default, a shared library is generated which of course needs to be
> > > installed.
> >
> > It's a .a, which is a static lib, not a shared one which is obviously
> > installed by default. But still, why would someone need that "lib",
> > which is usually only build to create a static vol_id?
>
> This is from extras/volume_id/lib/Makefile:
>
> SHLIB = libvolume_id.so.$(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE)
> ...
> all: libvolume_id.a $(SHLIB) libvolume_id.pc
>
>
> As you can see, a shared libvolume_id.so is built, and this is what
> actually happens when invoking make with the Makefile unmodified. Try
> it if you don't believe me.
Sure, I obviously know what that Makefile does. :)
But in the patch, it's about the .a file, not the .so:
> udev-120/extras/volume_id/lib/Makefile
> + $(INSTALL_LIB) -D libvolume_id.a
Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
` (7 preceding siblings ...)
2008-07-09 22:45 ` Kay Sievers
@ 2008-07-09 23:04 ` Thomas Koeller
2008-07-22 13:59 ` Kay Sievers
9 siblings, 0 replies; 11+ messages in thread
From: Thomas Koeller @ 2008-07-09 23:04 UTC (permalink / raw)
To: linux-hotplug
On Donnerstag, 10. Juli 2008, Kay Sievers wrote:
> Sure, I obviously know what that Makefile does. :)
>
> But in the patch, it's about the .a file, not the .so:
> > udev-120/extras/volume_id/lib/Makefile
> > + $(INSTALL_LIB) -D libvolume_id.a
What I really meant to say was:
Doesn't the fact that libvolume_id is normally (also) built
as a shared library contradict your claim that it is a
purely internal library that is not supposed to be installed?
Thomas
--
Thomas Koeller
thomas@koeller.dyndns.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
` (8 preceding siblings ...)
2008-07-09 23:04 ` Thomas Koeller
@ 2008-07-22 13:59 ` Kay Sievers
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2008-07-22 13:59 UTC (permalink / raw)
To: linux-hotplug
On Tue, Jul 8, 2008 at 00:12, Thomas Koeller <thomas@koeller.dyndns.org> wrote:
> Installing 64-bit libraries in /lib and /usr/lib
> is wrong.
Applied.
Thanks,
Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-07-22 13:59 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-07 22:12 [PATCH 2/2] Fixed installation path for 64-bit libvolume_id.so Thomas Koeller
2008-07-08 6:53 ` Harald Hoyer
2008-07-09 19:51 ` Thomas Koeller
2008-07-09 21:26 ` Kay Sievers
2008-07-09 21:35 ` Thomas Koeller
2008-07-09 21:44 ` Kay Sievers
2008-07-09 22:03 ` Dan Nicholson
2008-07-09 22:41 ` Thomas Koeller
2008-07-09 22:45 ` Kay Sievers
2008-07-09 23:04 ` Thomas Koeller
2008-07-22 13:59 ` Kay Sievers
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).