On 12/03/08 14:35 -0400, Pete Wyckoff wrote:
> [EMAIL PROTECTED] wrote on Tue, 11 Mar 2008 22:44 -0400:
> > I've done a bit of patching to the 2.7.0 build system and am hoping that
> > some of the ideas expressed might be useful or even good enough to be
> > included in the source.
> > 
> > I apologize that the first one lumps so much together, but it was either 
> > that
> > or submitting patches that depended on each other.  Hopefully I chose the
> > least annoying method.
> 
> I'll take the first stab at a response.  There's a lot here that we
> might thread off the discussion some.  Thanks for all the fine
> patches!
> 
> Unfortunately some of this work may collide with other changes that
> went into CVS after 2.7.0.
> 
> > 2.7.0-ac_vars-threaded_libs-so_name.patch:
> >     - Fixes the use of variables inherited from autotools so that DESTDIR
> >       behaves in the normal fashion.  Also allows the user to define a few
> >       more paths and grabs some other nice path-related variables from
> >       autotools.
> >     - Adds version, minor and revision numbers to shared libraries.
> 
> There's a bit much in here to think about clearly.  I believe that
> the DESTDIR and shlib version numbers would be good bits; would you
> be willing to pull them out separately?  And based on CVS rather
> than 2.7.0 would make it a lot easier for us to deal with.

Done.  I've attached 2.7.0-branch-destdir-sover.patch that does just this.

> 
> >     - Enables the building of threaded libraries with 
> > --enable-threaded-libs.
> 
> I had a go at that area, sort of, post-2.7.0:
> 
>     http://www.pvfs.org/fisheye/changelog/PVFS?cs=MAIN:pw:20080215191720
> 
> And maybe you are doing something different.  Do you need a knob to
> control whether the threaded client libs get built?  The new default is
> that they don't, unless you go out of your way to ask for
> --enable-threaded-kmod-helper.  Do you have a reason to want to turn
> them on?

I think that works for me.  Someone else actually noticed that there were
threaded libraries that were not being built and quickly hacked in something
to build them.  I just polished it up a little, forwarded it on to you, and
was never sure why they wanted it :)  I fully agree that the above commit is
superior.

> 
> >     - Allows the building of just the kernel module, without the dependency
> >       on kernapps.
> 
> I thought that was what just_kmod did.  Maybe you want something else?

Yeah, I don't want to build kernapps when I build the kernel module.  For
instance, on a ppc64 machine, I may have a 32-bit userland, but still utilize
the 64 bit kernel.  Things break down when the kernel ABI differs from
userland.  Note, that I'm far from an expert here, just had to deal with this
a lot on some Xserves :)

> 
> > 2.7.0-configure-static-server.patch:
> >     - Fixes the use of AC_ARG_ENABLE so that --disable-static-server 
> > actually
> >       does disable the static server and build the shared one by default.
> 
> Looks obviously good; applied, thanks.
> 
> > 2.7.0-as-needed.patch:
> >     - Just fixes a couple of places where using -Wl,--as-needed will break
> >       the build.
> 
> I don't understand.  Do we need -lcrypto instead of -lcrypt, or
> both?  For the LDFLAGS part, I've just checked in a fix; thanks for
> that for sure.

Actually, I initially believed you needed both, but pkg-config and some quick
testing tells me I'm wrong.  You only need -lcrypto.

> 
> > 2.7.0-Wno-strict-aliasing-2-.patch
> >     - This one is strange and I'm not sure about it, but there were reports
> >       that this flag was actually causing warnings to be printed, instead of
> >       ignoring them, hence breaking builds.  See:
> >       http://bugs.gentoo.org/show_bug.cgi?id=210923
> 
> Just yesterday or so I may have fixed this one a different way:
> 
>     http://www.pvfs.org/fisheye/changelog/PVFS/?cs=MAIN:pw:20080311153354
> 
> Maybe there is some other need for changing the no-strict-alias
> arg, but I think what's in CVS should address the bug report.

Just got confirmation now that the above patch fixed this.  I would note that
the problem was with -Wno-strict-aliasing=2 and it seems that in this commit
you removed the code that added $extra_gcc_flags to CFLAGS.  I'm not sure if
that was your intention?

Next time, I'm going to have to poke around fisheye a bit more before trying
to solve things on my own :)

Thanks,

-- 
Justin Bronder
diff -urN a/Makefile.in b/Makefile.in
--- a/Makefile.in       2007-08-17 00:04:23.000000000 -0400
+++ b/Makefile.in       2008-03-13 16:26:35.000000000 -0400
@@ -50,12 +50,14 @@
 # Generic makefile setup 
 
 # define a few generic variables that we need to use
-DESTDIR =
 srcdir = @srcdir@
-prefix = $(DESTDIR)@prefix@
-datarootdir = $(DESTDIR)@datarootdir@
-mandir = $(DESTDIR)@mandir@
-exec_prefix = $(DESTDIR)@exec_prefix@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+includedir = $(DESTDIR)/@includedir@
+mandir = $(DESTDIR)/@mandir@
+sbindir = $(DESTDIR)/@sbindir@
+bindir = $(DESTDIR)/@bindir@
+libdir = $(DESTDIR)/@libdir@
 
 VPATH = $(srcdir)
 SHELL = @SHELL@
@@ -63,6 +65,7 @@
 # TODO: should probably check for bison and flex in configure
 BISON = bison
 FLEX = flex
+LN_S = ln -snf
 BUILD_BMI_TCP = @BUILD_BMI_TCP@
 BUILD_GM = @BUILD_GM@
 BUILD_MX = @BUILD_MX@
@@ -162,6 +165,9 @@
 REDHAT_RELEASE = @REDHAT_RELEASE@
 NPTL_WORKAROUND = @NPTL_WORKAROUND@
 STRICT_CFLAGS = @STRICT_CFLAGS@
+SO_VER = 2
+SO_MINOR = 0
+SO_RELEASE = 0
 # for Solaris:
 # LIBS += -lsocket -lnsl
 
@@ -435,7 +441,7 @@
 LIBRARIES :=
 LIBRARIES_THREADED :=
 ifeq ($(build_shared),yes)
-LIBRARIES_SHARED = lib/libpvfs2.so
+LIBRARIES_SHARED = lib/libpvfs2.so.$(SO_VER).$(SO_MINOR).$(SO_RELEASE)
 LIBRARIES += $(LIBRARIES_SHARED)
 endif
 ifeq ($(build_static),yes)
@@ -627,16 +633,16 @@
        $(E)ar rcs $@ $(LIBTHREADEDOBJS)
 
 # rule for building the pvfs2 library
-lib/libpvfs2.so: $(LIBPICOBJS)
+lib/libpvfs2.so.$(SO_VER).$(SO_MINOR).$(SO_RELEASE): $(LIBPICOBJS)
        $(Q) "  LDSO            $@"
        $(E)$(INSTALL) -d lib
-       $(E)$(LDSHARED) -o $@ $(LIBPICOBJS)
+       $(E)$(LDSHARED) -Wl,-soname,libpvfs2.so -o $@ $(LIBPICOBJS)
 
 # rule for building the pvfs2 _multithreaded_ library
-lib/libpvfs2-threaded.so: $(LIBTHREADEDPICOBJS)
+lib/libpvfs2-threaded.so.$(SO_VER).$(SO_MINOR).$(SO_RELEASE): 
$(LIBTHREADEDPICOBJS)
        $(Q) "  LDSO            $@"
        $(E)$(INSTALL) -d lib
-       $(E)$(LDSHARED) -o $@ $(LIBTHREADEDPICOBJS)
+       $(E)$(LDSHARED) -Wl,-soname,libpvfs2-threaded.so -o $@ 
$(LIBTHREADEDPICOBJS)
 
 # rule for building the pvfs2 server library
 lib/libpvfs2-server.a: $(SERVEROBJS)
@@ -883,43 +889,47 @@
        install -m 644 $(srcdir)/doc/man/*.5 $(mandir)/man5
 
 install:: all install_doc
-       install -d $(prefix)/include
-       install -m 644 $(srcdir)/include/pvfs2.h $(prefix)/include
-       install -m 644 $(srcdir)/include/pvfs2-request.h $(prefix)/include
-       install -m 644 $(srcdir)/include/pvfs2-debug.h $(prefix)/include
-       install -m 644 $(srcdir)/include/pvfs2-sysint.h $(prefix)/include
-       install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(prefix)/include
-       install -m 644 $(srcdir)/include/pvfs2-types.h $(prefix)/include
-       install -m 644 $(srcdir)/include/pvfs2-util.h $(prefix)/include
-       install -m 644 $(srcdir)/include/pvfs2-encode-stubs.h $(prefix)/include
-
-       install -d $(prefix)/lib
-       install -m 755 $(LIBRARIES) $(prefix)/lib
+       install -d $(includedir)
+       install -m 644 $(srcdir)/include/pvfs2.h $(includedir)
+       install -m 644 $(srcdir)/include/pvfs2-request.h $(includedir)
+       install -m 644 $(srcdir)/include/pvfs2-debug.h $(includedir)
+       install -m 644 $(srcdir)/include/pvfs2-sysint.h $(includedir)
+       install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(includedir)
+       install -m 644 $(srcdir)/include/pvfs2-types.h $(includedir)
+       install -m 644 $(srcdir)/include/pvfs2-util.h $(includedir)
+       install -m 644 $(srcdir)/include/pvfs2-encode-stubs.h $(includedir)
+
+       install -d $(libdir)
+       install -m 755 $(LIBRARIES) $(libdir)
+ifdef LIBRARIES_SHARED
+       $(LN_S) libpvfs2.so.$(SO_VER).$(SO_MINOR).$(SO_RELEASE) 
$(libdir)/libpvfs2.$(SO_VER)
+       $(LN_S) libpvfs2.so.$(SO_VER).$(SO_MINOR).$(SO_RELEASE) 
$(libdir)/libpvfs2.so
+endif
 
 ifdef TARGET_OS_DARWIN
 #       TOC needs to be regenerated in libs after they get moved
        ranlib $(patsubst %,$(prefix)/%,$(LIBRARIES))
 endif
 
-       install -d $(prefix)/bin
-       install -m 755 $(ADMINTOOLS) $(prefix)/bin
-       install -m 755 src/apps/admin/pvfs2-config $(prefix)/bin
+       install -d $(bindir)
+       install -m 755 $(ADMINTOOLS) $(bindir)
+       install -m 755 src/apps/admin/pvfs2-config $(bindir)
        @# if we ever auto-generate genconfig, remove the $(srcdir)
-       install -m 755 $(srcdir)/src/apps/admin/pvfs2-genconfig $(prefix)/bin
-       install -m 755 $(srcdir)/src/apps/admin/pvfs2-config-convert 
$(prefix)/bin
+       install -m 755 $(srcdir)/src/apps/admin/pvfs2-genconfig $(bindir)
+       install -m 755 $(srcdir)/src/apps/admin/pvfs2-config-convert $(bindir)
 ifdef BUILD_KARMA
-       install -m 755 $(KARMA) $(prefix)/bin
+       install -m 755 $(KARMA) $(bindir)
 endif
 
-       install -d $(prefix)/sbin
+       install -d $(sbindir)
 
 ifdef BUILD_SERVER
-       install -m 755 $(ADMINTOOLS_SERVER) $(prefix)/bin
+       install -m 755 $(ADMINTOOLS_SERVER) $(bindir)
     ifeq ($(NPTL_WORKAROUND),)
-       install -m 755 $(SERVER) $(prefix)/sbin
+       install -m 755 $(SERVER) $(sbindir)
     else
-       install -m 755 $(srcdir)/$(SERVER_STUB) $(prefix)/sbin/pvfs2-server
-       install -m 755 $(SERVER) $(prefix)/sbin/pvfs2-server.bin
+       install -m 755 $(srcdir)/$(SERVER_STUB) $(sbindir)/pvfs2-server
+       install -m 755 $(SERVER) $(sbindir)/pvfs2-server.bin
     endif
 endif
 
@@ -940,8 +950,8 @@
 
 .PHONY: kmod_install
 kmod_install: kmod kernapps just_kmod_install
-       install -d $(prefix)/sbin
-       install -m 755 $(KERNAPPS) $(prefix)/sbin
+       install -d $(sbindir)
+       install -m 755 $(KERNAPPS) $(sbindir)
 endif
 
 ifneq (,$(LINUX24_KERNEL_SRC))
@@ -961,11 +971,11 @@
 
 .PHONY: kmod24_install
 kmod24_install: kmod24 kernapps just_kmod24_install
-       install -d $(prefix)/sbin
-       install -m 755 $(KERNAPPS) $(prefix)/sbin
-       install -m 755 src/apps/kernel/linux/mount.pvfs2 $(prefix)/sbin
+       install -d $(sbindir)
+       install -m 755 $(KERNAPPS) $(sbindir)
+       install -m 755 src/apps/kernel/linux/mount.pvfs2 $(sbindir)
        @echo ""
        @echo "For improved linux-2.4 support,"
-       @echo "install $(prefix)/sbin/mount.pvfs2 to /sbin/mount.pvfs2"
+       @echo "install $(sbindir)/mount.pvfs2 to /sbin/mount.pvfs2"
        @echo ""
 endif

Attachment: pgp0EYeSo9CYq.pgp
Description: PGP signature

_______________________________________________
Pvfs2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users

Reply via email to