[PATCH] cclass: fix .so loading file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 09, 2010 at 09:41:24AM -0700, Sage Weil wrote:
> On Fri, 9 Jul 2010, Christian Brunner wrote:
> > Hi,
> > 
> > in the following I'll send a few fixes and additions for the rpm spec file.
> > Please commit the patches that you like to the repository.
> 
> Thanks, committing now.
> 
> There's one other pitfall I ran into with the debs... by default symbols 
> are stripped from all binaries, but the libcls_rbd.so shared object needs 
> to _not_ be stripped, or else the class loading doesn't work.  I have no 
> idea where/when/if this is done during the rpmbuild.  The version in the 
> built package should look like so:
> 
> $ nm .libs/libcls_rbd.so
> 000000000000797d T __cls_init
> 000000000020ce50 D __cls_name
> 000000000020ce7c B __cls_name__rbd
> 000000000020ce78 B __cls_ver__1_1
> 000000000020ce48 D __cls_ver_maj
> 000000000020ce4c D __cls_ver_min
> 
> Thanks-
> sage

Hi Sage,

shared objects are not stript on our system. So I can't reproduce this.

The only thing I've found, is that the *.so files are included in the -devel
rpm. This leads to the fact that the 'find' in cclass doesn't return any
files. I'd suggest the attached change in the script.

Christian

---
 src/cclass.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/cclass.in b/src/cclass.in
index 69513fa..1a2a807 100755
--- a/src/cclass.in
+++ b/src/cclass.in
@@ -85,7 +85,7 @@ load() {
 }
 
 load_all() {
-	all=`find $libdir -name 'libcls_*.so'`;
+	all=`find $libdir -name 'libcls_*.so*' -type f`;
 	if [ -n "$all" ]; then
 		for fn in $all; do
 			echo Loading class: $fn: `$BINDIR/cclsinfo $fn`
-- 
1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux