public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: libhandle/Makefile - fix make install
@ 2013-05-22 20:58 rjohnston
  2013-05-22 21:22 ` Eric Sandeen
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: rjohnston @ 2013-05-22 20:58 UTC (permalink / raw)
  To: xfs

In the default section of libhandle/Makefile, ltdepend prevented
libhandle.so from being installed properly so remove it.

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
--
diff --git a/libhandle/Makefile b/libhandle/Makefile
index 865ca22..2f39173 100644
--- a/libhandle/Makefile
+++ b/libhandle/Makefile
@@ -15,7 +15,7 @@ LTLDFLAGS += -Wl,--version-script,libhandle.sym
 CFILES = handle.c jdm.c
 LSRCFILES = libhandle.sym
 
-default: ltdepend $(LTLIBRARY)
+default: $(LTLIBRARY)
 
 include $(BUILDRULES)
 


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] xfsprogs: libhandle/Makefile - fix make install
  2013-05-22 20:58 [PATCH] xfsprogs: libhandle/Makefile - fix make install rjohnston
@ 2013-05-22 21:22 ` Eric Sandeen
  2013-05-22 22:05   ` Rich Johnston
  2013-05-22 22:16 ` Dave Chinner
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Eric Sandeen @ 2013-05-22 21:22 UTC (permalink / raw)
  To: rjohnston; +Cc: xfs

On 5/22/13 3:58 PM, rjohnston@sgi.com wrote:
> In the default section of libhandle/Makefile, ltdepend prevented
> libhandle.so from being installed properly so remove it.

Can you explain how it prevented it?

[sandeen@sandeen xfsprogs]$ grep ltdepend */Makefile
libdisk/Makefile:default: ltdepend $(LTLIBRARY)
libhandle/Makefile:default: ltdepend $(LTLIBRARY)
libxcmd/Makefile:default: ltdepend $(LTLIBRARY)
libxfs/Makefile:default: crc32selftest ltdepend $(LTLIBRARY)
libxlog/Makefile:default: ltdepend $(LTLIBRARY)

seems to exist in every subdir, why is this one causing trouble?

/me goes off to dig around in makefiles


> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
> --
> diff --git a/libhandle/Makefile b/libhandle/Makefile
> index 865ca22..2f39173 100644
> --- a/libhandle/Makefile
> +++ b/libhandle/Makefile
> @@ -15,7 +15,7 @@ LTLDFLAGS += -Wl,--version-script,libhandle.sym
>  CFILES = handle.c jdm.c
>  LSRCFILES = libhandle.sym
>  
> -default: ltdepend $(LTLIBRARY)
> +default: $(LTLIBRARY)
>  
>  include $(BUILDRULES)
>  
> 
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] xfsprogs: libhandle/Makefile - fix make install
  2013-05-22 21:22 ` Eric Sandeen
@ 2013-05-22 22:05   ` Rich Johnston
  2013-05-22 23:04     ` Dave Chinner
  0 siblings, 1 reply; 7+ messages in thread
From: Rich Johnston @ 2013-05-22 22:05 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

On 05/22/2013 04:22 PM, Eric Sandeen wrote:
> On 5/22/13 3:58 PM, rjohnston@sgi.com wrote:
>> In the default section of libhandle/Makefile, ltdepend prevented
>> libhandle.so from being installed properly so remove it.
>
> Can you explain how it prevented it?
>
> [sandeen@sandeen xfsprogs]$ grep ltdepend */Makefile
> libdisk/Makefile:default: ltdepend $(LTLIBRARY)
> libhandle/Makefile:default: ltdepend $(LTLIBRARY)
> libxcmd/Makefile:default: ltdepend $(LTLIBRARY)
> libxfs/Makefile:default: crc32selftest ltdepend $(LTLIBRARY)
> libxlog/Makefile:default: ltdepend $(LTLIBRARY)
>
> seems to exist in every subdir, why is this one causing trouble?
Because libhandle is the only one that is installed. ;)

make install
Installing include-install
gmake[1]: Nothing to be done for `install'.
Installing libxfs-install
gmake[1]: Nothing to be done for `install'.
Installing libxlog-install
gmake[1]: Nothing to be done for `install'.
Installing libxcmd-install
gmake[1]: Nothing to be done for `install'.
Installing libhandle-install
cd ../libhandle/.libs; ../../install-sh -o root -g root -m 755 -d 
/lib64; ../../install-sh -o root -g root -m 755 -T so_dot_version 
libhandle.lai /lib64; ../../install-sh -o root -g root -T so_dot_current 
libhandle.lai /lib64
Installing libdisk-install
gmake[1]: Nothing to be done for `install'.


make install-dev
Installing include-install-dev
../install-sh -o root -g root -m 755 -d /usr/include/xfs
../install-sh -o root -g root -m 644 handle.h jdm.h xqm.h xfs.h xfs_fs.h 
xfs_types.h linux.h /usr/include/xfs
../install-sh -o root -g root -m 644 platform_defs.h /usr/include/xfs
Installing libxfs-install-dev
gmake[1]: Nothing to be done for `install-dev'.
Installing libxlog-install-dev
gmake[1]: Nothing to be done for `install-dev'.
Installing libxcmd-install-dev
gmake[1]: Nothing to be done for `install-dev'.
Installing libhandle-install-dev
cd ../libhandle/.libs; ../../install-sh -o root -g root -m 755 -d 
/usr/lib64; ../../install-sh -o root -g root -m 644 -T old_lib 
libhandle.lai /usr/lib64; ../../install-sh -o root -g root -m 644 
libhandle.lai /usr/lib64/libhandle.la ; ../../install-sh -o root -g root 
-m 755 -d /lib64; ../../install-sh -o root -g root -T so_base 
libhandle.lai /lib64; if test "x/usr/lib64" != "x/lib64" ; then 
../../install-sh -o root -g root -S /usr/lib64/libhandle.a 
/lib64/libhandle.a; ../../install-sh -o root -g root -S 
/usr/lib64/libhandle.la /lib64/libhandle.la; ../../install-sh -o root -g 
root -S /lib64/libhandle.so /usr/lib64/libhandle.so; fi
Installing libdisk-install-dev
gmake[1]: Nothing to be done for `install-dev'.


[xfsprogs]$ grep -A 2 install lib*/Makefile
libdisk/Makefile:install: default
libdisk/Makefile-
libdisk/Makefile:install-dev: default
libdisk/Makefile-
libdisk/Makefile:install-qa: install-dev
libdisk/Makefile-
libdisk/Makefile--include .ltdep
--
libhandle/Makefile:install: default
libhandle/Makefile-	$(INSTALL_LTLIB)
libhandle/Makefile-
libhandle/Makefile:install-dev: default
libhandle/Makefile-	$(INSTALL_LTLIB_DEV)
libhandle/Makefile-
libhandle/Makefile:install-qa: install-dev
libhandle/Makefile-
libhandle/Makefile--include .ltdep
--
libxcmd/Makefile:install install-dev install-qa: default
libxcmd/Makefile-
libxcmd/Makefile--include .ltdep
--
libxfs/Makefile:install: default
libxfs/Makefile-
libxfs/Makefile:install-dev: default
libxfs/Makefile-
libxfs/Makefile:install-qa: default
libxfs/Makefile-
libxfs/Makefile--include .ltdep
--
libxlog/Makefile:install install-dev install-qa: default
libxlog/Makefile-
libxlog/Makefile--include .ltdep

I compared it to libdm/Makefile which removed it from the default: target.

default: $(LTLIBRARY)

include $(BUILDRULES)

install: default
	$(INSTALL_LTLIB)

install-dev: default
	$(INSTALL_LTLIB_DEV)


>
> /me goes off to dig around in makefiles
>
>
>> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
>> --
>> diff --git a/libhandle/Makefile b/libhandle/Makefile
>> index 865ca22..2f39173 100644
>> --- a/libhandle/Makefile
>> +++ b/libhandle/Makefile
>> @@ -15,7 +15,7 @@ LTLDFLAGS += -Wl,--version-script,libhandle.sym
>>   CFILES = handle.c jdm.c
>>   LSRCFILES = libhandle.sym
>>
>> -default: ltdepend $(LTLIBRARY)
>> +default: $(LTLIBRARY)
>>
>>   include $(BUILDRULES)
>>
>>
>>
>> _______________________________________________
>> xfs mailing list
>> xfs@oss.sgi.com
>> http://oss.sgi.com/mailman/listinfo/xfs
>>
>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] xfsprogs: libhandle/Makefile - fix make install
  2013-05-22 20:58 [PATCH] xfsprogs: libhandle/Makefile - fix make install rjohnston
  2013-05-22 21:22 ` Eric Sandeen
@ 2013-05-22 22:16 ` Dave Chinner
  2013-05-23 13:52 ` [PATCH V2] xfsprogs: libhandle/Makefile - fix make install-dev rjohnston
  2013-05-23 15:37 ` [PATCH V3] " rjohnston
  3 siblings, 0 replies; 7+ messages in thread
From: Dave Chinner @ 2013-05-22 22:16 UTC (permalink / raw)
  To: rjohnston; +Cc: xfs

On Wed, May 22, 2013 at 03:58:19PM -0500, rjohnston@sgi.com wrote:
> In the default section of libhandle/Makefile, ltdepend prevented
> libhandle.so from being installed properly so remove it.
> 
> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
> --
> diff --git a/libhandle/Makefile b/libhandle/Makefile
> index 865ca22..2f39173 100644
> --- a/libhandle/Makefile
> +++ b/libhandle/Makefile
> @@ -15,7 +15,7 @@ LTLDFLAGS += -Wl,--version-script,libhandle.sym
>  CFILES = handle.c jdm.c
>  LSRCFILES = libhandle.sym
>  
> -default: ltdepend $(LTLIBRARY)
> +default: $(LTLIBRARY)

PLease explain how removing the makefile build dependency generation
fixes a library install problem. This, AFAICT, will just break
rebuild detection of the library when we modify srouce files.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] xfsprogs: libhandle/Makefile - fix make install
  2013-05-22 22:05   ` Rich Johnston
@ 2013-05-22 23:04     ` Dave Chinner
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Chinner @ 2013-05-22 23:04 UTC (permalink / raw)
  To: Rich Johnston; +Cc: Eric Sandeen, xfs

On Wed, May 22, 2013 at 05:05:42PM -0500, Rich Johnston wrote:
> On 05/22/2013 04:22 PM, Eric Sandeen wrote:
> >On 5/22/13 3:58 PM, rjohnston@sgi.com wrote:
> >>In the default section of libhandle/Makefile, ltdepend prevented
> >>libhandle.so from being installed properly so remove it.
> >
> >Can you explain how it prevented it?
> >
> >[sandeen@sandeen xfsprogs]$ grep ltdepend */Makefile
> >libdisk/Makefile:default: ltdepend $(LTLIBRARY)
> >libhandle/Makefile:default: ltdepend $(LTLIBRARY)
> >libxcmd/Makefile:default: ltdepend $(LTLIBRARY)
> >libxfs/Makefile:default: crc32selftest ltdepend $(LTLIBRARY)
> >libxlog/Makefile:default: ltdepend $(LTLIBRARY)
> >
> >seems to exist in every subdir, why is this one causing trouble?
> Because libhandle is the only one that is installed. ;)

So, after you've done a builds what does libhandle/.libs contain?
it shoul dlook something lik ethis:

$ ls -l libhandle/.libs/ total 180
-rw-r--r-- 1 dave dave 39416 May 23 08:50 handle.o
-rw-r--r-- 1 dave dave 21936 May 23 08:50 jdm.o
-rw-r--r-- 1 dave dave 61834 May 23 08:50 libhandle.a
lrwxrwxrwx 1 dave dave    15 May 23 08:50 libhandle.la -> ../libhandle.la
-rw-r--r-- 1 dave dave   938 May 23 08:50 libhandle.lai
lrwxrwxrwx 1 dave dave    18 May 23 08:50 libhandle.so -> libhandle.so.1.0.3
lrwxrwxrwx 1 dave dave    18 May 23 08:50 libhandle.so.1 -> libhandle.so.1.0.3
-rwxr-xr-x 1 dave dave 45667 May 23 08:50 libhandle.so.1.0.3
$

And the libhandle.lai should contain:

$ cat libhandle/.libs/libhandle.lai
libhandle.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libhandle.so.1'

# Names of this library.
library_names='libhandle.so.1.0.3 libhandle.so.1 libhandle.so'

# The name of the static archive.
old_library='libhandle.a'

# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''

# Libraries that this one depends upon.
dependency_libs=''

# Names of additional weak libraries provided by this library
weak_library_names=''

# Version information for libhandle.
current=1
age=0
revision=3

# Is this an already installed library?
installed=yes

# Should we warn about portability when linking against -modules?
shouldnotlink=no

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/lib'
$

See $library_names? That should be all the names that are created,
and there are three. The are set up via 'install-sh -T so_????'
options.

So, look at the install rules being run:

> cd ../libhandle/.libs;

Obvious.

> ../../install-sh -o root -g root -m 755 -d /lib64;

Setting owner/perms on /lib64.

> ../../install-sh -o root -g root -m 755 -T so_dot_version libhandle.lai /lib64;

"-T so_dot_version" is supposed to copy libhandle.so.1.0.3 to
/lib64/libhandle.so.1.0.3. i.e. install the current library.

> ../../install-sh -o root -g root -T so_dot_current libhandle.lai /lib64

That's supposed to set up the /lib64/libhandle.so.1 link back to
/lib64/libhandle.so.1.0.3.

And that's it. So, what's missing? 

Right - there's nothing that sets up /lib64/libhandle.so i.e.
this is missing:

../../install-sh -o root -g root -T so_base libhandle.lai /lib64

which would set up the /lib64/libhandle.so link to
/lib64/libhandle.so.1.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH V2] xfsprogs: libhandle/Makefile - fix make install-dev
  2013-05-22 20:58 [PATCH] xfsprogs: libhandle/Makefile - fix make install rjohnston
  2013-05-22 21:22 ` Eric Sandeen
  2013-05-22 22:16 ` Dave Chinner
@ 2013-05-23 13:52 ` rjohnston
  2013-05-23 15:37 ` [PATCH V3] " rjohnston
  3 siblings, 0 replies; 7+ messages in thread
From: rjohnston @ 2013-05-23 13:52 UTC (permalink / raw)
  To: xfs

The dependency for install-dev: is incorrect "default" and prevents libhandle
from being installed correctly.

After make && make install-dev

  # ls -l /lib64/libhandle* /usr/lib64/libhandle*
  lrwxrwxrwx 1 root root /lib64/libhandle.a -> /usr/lib64/libhandle.a
  lrwxrwxrwx 1 root root /lib64/libhandle.la -> /usr/lib64/libhandle.la
  lrwxrwxrwx 1 root root /lib64/libhandle.so -> libhandle.so.1
  -rw-r--r-- 1 root root /usr/lib64/libhandle.a
  -rw-r--r-- 1 root root /usr/lib64/libhandle.la
  lrwxrwxrwx 1 root root /usr/lib64/libhandle.so -> /lib64/libhandle.so

The shared library /lib64/libhandle.so.1.0.3 is not installed and
the link /lib64/libhandle.so.1 -> libhandle.so.1.0.3 is not created.

Change the dependency for install-dev: to "install" so the install looks like
this.

  # ls -l /lib64/libhandle* /usr/lib64/libhandle*
  lrwxrwxrwx 1 root root /lib64/libhandle.a -> /usr/lib64/libhandle.a
  lrwxrwxrwx 1 root root /lib64/libhandle.la -> /usr/lib64/libhandle.la
  lrwxrwxrwx 1 root root /lib64/libhandle.so -> libhandle.so.1
  lrwxrwxrwx 1 root root /lib64/libhandle.so.1 -> libhandle.so.1.0.3
  -rwxr-xr-x 1 root root /lib64/libhandle.so.1.0.3
  -rw-r--r-- 1 root root /usr/lib64/libhandle.a
  -rw-r--r-- 1 root root /usr/lib64/libhandle.la
  lrwxrwxrwx 1 root root /usr/lib64/libhandle.so -> /lib64/libhandle.so

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
--
V1->V2
As Dave pointed out removing the ltdepend would prevent proper rebuilds.
Don't just make the install work ;) correct the dependency for install-dev.

diff --git a/libhandle/Makefile b/libhandle/Makefile
index 865ca22..081a386 100644
--- a/libhandle/Makefile
+++ b/libhandle/Makefile
@@ -22,7 +22,7 @@ include $(BUILDRULES)
 install: default
 	$(INSTALL_LTLIB)
 
-install-dev: default
+install-dev: install
 	$(INSTALL_LTLIB_DEV)
 
 install-qa: install-dev


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH V3] xfsprogs: libhandle/Makefile - fix make install-dev
  2013-05-22 20:58 [PATCH] xfsprogs: libhandle/Makefile - fix make install rjohnston
                   ` (2 preceding siblings ...)
  2013-05-23 13:52 ` [PATCH V2] xfsprogs: libhandle/Makefile - fix make install-dev rjohnston
@ 2013-05-23 15:37 ` rjohnston
  3 siblings, 0 replies; 7+ messages in thread
From: rjohnston @ 2013-05-23 15:37 UTC (permalink / raw)
  To: xfs

Both make install and make install-dev are required to install all the
pieces of libhandle.

  # rm -f /lib64/libhandle* /usr/lib64/libhandle*
  # make install    
  # ls -l /lib64/libhandle* /usr/lib64/libhandle*
  ls: cannot access /usr/lib64/libhandle*: No such file or directory
  lrwxrwxrwx 1 root root /lib64/libhandle.so.1 -> libhandle.so.1.0.3
  -rwxr-xr-x 1 root root /lib64/libhandle.so.1.0.3

  # rm -f /lib64/libhandle* /usr/lib64/libhandle*
  # make install-dev    
  # ls -l /lib64/libhandle* /usr/lib64/libhandle*
  lrwxrwxrwx 1 root root /lib64/libhandle.a -> /usr/lib64/libhandle.a
  lrwxrwxrwx 1 root root /lib64/libhandle.la -> /usr/lib64/libhandle.la
  lrwxrwxrwx 1 root root /lib64/libhandle.so -> libhandle.so.1
  -rw-r--r-- 1 root root /usr/lib64/libhandle.a
  -rw-r--r-- 1 root root /usr/lib64/libhandle.la
  lrwxrwxrwx 1 root root /usr/lib64/libhandle.so -> /lib64/libhandle.so

Fix the libtool macros INSTALL_LTLIB and INSTALL_LTLIB_DEV.

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
--
V1->V2
As Dave pointed out removing the ltdepend would prevent proper rebuilds.
Don't just make the install work ;) correct the dependancy for install-dev.

V2->V3
Not a libtool expert, make the change to the libtool macros instead of
cluttering up the Makefile.

diff --git a/include/buildmacros b/include/buildmacros
index 7a01880..98d25af 100644
--- a/include/buildmacros
+++ b/include/buildmacros
@@ -54,13 +54,7 @@ LTLDFLAGS += -rpath $(PKG_ROOT_LIB_DIR)
 LTLDFLAGS += -version-info $(LTVERSION)
 endif
 
-ifeq ($(ENABLE_SHARED),yes)
-INSTALL_LTLIB = \
-       cd $(TOPDIR)/$(LIBNAME)/.libs; \
-       ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
-       ../$(INSTALL) -m 755 -T so_dot_version $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
-       ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_ROOT_LIB_DIR)
-endif
+INSTALL_LTLIB = $(INSTALL_LTLIB_DEV)
 
 # Libtool thinks the static and shared libs should be in the same dir, so
 # make the static lib appear in the place we chose as rpath (using the two
@@ -75,6 +69,8 @@ INSTALL_LTLIB_DEV = \
        ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR); \
        ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \
        ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \
+       ../$(INSTALL) -m 755 -T so_dot_version $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
+       ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
        ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \
        if test "x$(PKG_LIB_DIR)" != "x$(PKG_ROOT_LIB_DIR)" ; then \
        ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-23 15:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 20:58 [PATCH] xfsprogs: libhandle/Makefile - fix make install rjohnston
2013-05-22 21:22 ` Eric Sandeen
2013-05-22 22:05   ` Rich Johnston
2013-05-22 23:04     ` Dave Chinner
2013-05-22 22:16 ` Dave Chinner
2013-05-23 13:52 ` [PATCH V2] xfsprogs: libhandle/Makefile - fix make install-dev rjohnston
2013-05-23 15:37 ` [PATCH V3] " rjohnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox