Personal tools
You are here: Home / Installing Biskit / Troubleshooting / pvm_sharedlib patch

pvm_sharedlib patch

This patch modifies pvm 3.4.5+7 for building shared libraries. The modified files are conf/LINUX.def, conf/LINUX64.def and src/Makefile.aimk. If your architecture is neither LINUX nor LINUX64, you will need to manually add the -fpic option to the appropriate conf/*.def file.

differences between files icon pvm_sharedlib.patch — differences between files, 2 KB (2348 bytes)

File contents

diff -Naur pvm3/conf/LINUX64.def pvm3_new/conf/LINUX64.def
--- pvm3/conf/LINUX64.def	2006-07-27 20:17:35.000000000 +0200
+++ pvm3_new/conf/LINUX64.def	2007-03-07 17:21:09.000000000 +0100
@@ -26,7 +26,7 @@
 ARCHCFLAGS	=	-DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" \
 				-DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS \
 				-DHASSTDLIB -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM \
-				-DUSESTRERROR
+				-DUSESTRERROR -fpic
 ARCHDLIB	=
 ARCHDOBJ	=
 ARCHLIB		=
diff -Naur pvm3/conf/LINUX.def pvm3_new/conf/LINUX.def
--- pvm3/conf/LINUX.def	2003-08-25 19:12:17.000000000 +0200
+++ pvm3_new/conf/LINUX.def	2007-03-07 17:21:04.000000000 +0100
@@ -14,7 +14,9 @@
 #
 ARCHCFLAGS	=	-DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" \
 				-DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS \
-				-DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM -DUSESTRERROR
+				-DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM \
+                                -DUSESTRERROR -fpic
+
 #
 # For Absoft Fortran 95 Compiler:
 # ARCHFFLAGS	=	-B108 -YEXT_NAMES="LCS"
diff -Naur pvm3/src/Makefile.aimk pvm3_new/src/Makefile.aimk
--- pvm3/src/Makefile.aimk	2001-05-11 20:58:10.000000000 +0200
+++ pvm3_new/src/Makefile.aimk	2007-03-07 17:20:42.000000000 +0100
@@ -212,7 +212,7 @@
 
 OS2TARGETS		=	$(LIBDIR)/pvmd3-os2 $(LIBDIR)/lib-os2
 
-all:	pvmd3$(EXESFX) $(LIBPVM).a
+all:	pvmd3$(EXESFX) $(LIBPVM).a $(LIBPVM).so
 
 all-shm:	pvmd3-shm lib-shm $(LIBPVM)s.a
 
@@ -222,7 +222,8 @@
 
 all-os2:	pvmd3-os2 lib-os2
 
-install:	$(LIBDIR) $(LIBDIR)/pvmd3$(EXESFX) $(LIBDIR)/$(LIBPVM).a
+install:	$(LIBDIR) $(LIBDIR)/pvmd3$(EXESFX) $(LIBDIR)/$(LIBPVM).a \
+                $(LIBDIR)/$(LIBPVM).so
 
 install-shm:	$(LIBDIR) $(SHMEMTARGETS)
 
@@ -256,6 +257,9 @@
 $(LIBDIR)/$(LIBPVM)s.a:  $(LIBPVM)s.a
 	cp $(LIBPVM)s.a $(LIBDIR)/$(LIBPVM)s.a
 
+$(LIBDIR)/$(LIBPVM).so:  $(LIBPVM).so
+	cp $(LIBPVM).so $(LIBDIR)/$(LIBPVM).so
+
 # libdir mpp pvmd3 & libpvm3*.a
 
 $(LIBDIR)/pvmd3-mpp:	pvmd3-mpp
@@ -292,6 +296,13 @@
 	$(AR) cr $(LIBPVM).a $(LOBJ) $(LPVMSOCK) $(SOCKLOBJ)
 	case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(LIBPVM).a ;; esac
 
+## RAIK: shared libraries
+
+$(LIBPVM).so:    $(REGEXCONF) $(LOBJ) $(LPVMSOCK) $(SOCKLOBJ)
+	rm -f $(LIBPVM).so
+	$(CC) -shared -o $(LIBPVM).so $(LOBJ) $(LPVMSOCK) $(SOCKLOBJ)
+
+
 # shm pvmd3 & libpvm3*.a
 
 pvmd3-shm:	$(REGEXCONF) $(DOBJ) $(SHMEMDOBJ)