From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,55483e0ff179aa9a,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1994-09-30 13:14:48 PST Newsgroups: comp.os.linux.announce Path: bga.com!news.sprintlink.net!howland.reston.ans.net!swiss.ans.net!solaris.cc.vt.edu!MathWorks.Com!news.kei.com!travelers.mail.cornell.edu!cornell!bounce-bounce From: fock@fzi.de (Frank Fock) Subject: Shared libs for OBST3-4.2 Message-ID: Followup-To: comp.os.linux.misc Keywords: OBST OBST3-4 Sender: mdw@cs.cornell.edu (Matt Welsh) Reply-To: fzi.de@fzi.de Organization: Forschungszentrum Informatik (FZI), Karlsruhe, Germany Date: Fri, 30 Sep 1994 14:49:51 GMT README.linux.shared-libs ------------------------ Author: Frank Fock ({fock, obst}@fzi.de) Version: 28-9/94 This text explains how to build a jump table library (also called DLL or shared library) of libOBST on Linux. As you will see by reading this documentation, the process is not yet very much automated (to say the least). Future OBST versions (and hopefully especially future DLL tool versions) will probably offer more support. In particular, we do not have much experience in the installation of shared libraries and in controlling the as well the compile-time as the run-time link editor. Hence, you might have to change the final part of the following description (suggestions for improvement would be very much appreciated!). Perhaps the most tricky point is choosing proper values for the start address of the library in main memory (and for the other magic numbers at the head of Makefile.linux.shared-libs). Suggestions regarding these numbers (in particular for any automatism in choosing/updating them) are most welcome. Currently, these numbers are more or less just a guess that seems to work. However, problems might occur in conjunction with other shared libraries. First you have to check if the right DLL tools are present. You need to have at least version 2.16 of these tools. So, if needed, get the file tsx-11.mit.edu:/pub/linux/packages/GCC/src/tools-2.16.tar.gz from tsx-11.mit.edu (or another Linux ftp server), and install it. Read the README.tr in the doc subdirectory thoroughly. If you find the README.tr more up to date than the README.ps, you will have to recreate README.ps if you want a pretty Postscript version, but you *must* have groff installed. A `make README.ps' in the doc subdirectory should suffice. Unpack tools-2.16.tar.gz and read the file README. Next you compile and install the tools. To compile, type `make` in the tools-2.16/tools directory. Type `make install` as root, and all of the files will be moved to the correct locations. The remainder of the description refers to the OBST installation itself. You should replace the os_linux.cnf file in ./include/etc with: # ---------------------------------------------------------------------------- # os_linux.cnf # # Configuration parameters for Linux. # --------------------------------------------------------------------------- # Definition is needed as well for configure as for documentation purposes. OS_CONFFILE = os_linux.cnf MKSHOBJ = shSUFF.so = .so lex_LEXLIB = LEXLIB = CPP_NO_ERR = -DERR_NO_ASSERT HAVE_NO_INTERRUPT : 1 LOCKD_CORRECT : 1 PIC_CCFLAG = -B/usr/dll/jump/ CC_DO_pic = -B/usr/dll/jump/ CC_DO_PIC = -B/usr/dll/jump/ # ...jump/: the / is NEEDED! LD_DO_RTLPATH = shSUFF.sa = .sa shVERSIONSEP = shMAKELIB =$(MAKE) shOBSTCFLAGS=-no_sil shLIBSUFF=/pic localLIB=$(localLIB.so) shCFLAGS=$(PIC_CCFLAG) shMAKEPROG= # # Configuration parameters which are set incorrectly by the # autoconf mechanisms (will be improved in the next release) # # End of os_linux.cnf Now you first have to configure and compile OBST3-4 as described in the file README.install.OBST3-4. This will take some time ...:). If everthing compiled fine, you are now ready to build libOBST.sa and libOBST.so.342.0: o Read the file tools-2.16/doc/README.ps, especially if you are using shared libs (DLLs) other than those listed on page 7. If this is the case, you probably will have to adjust the values of ADDRESS, GOTSIZE, and JUMPSIZE. o Set the JUMP_DIR and the JUMP_LIB environment variable by typing % export JUMP_DIR=`pwd`/lib/pic % export JUMP_LIB=libOBST in the OBST3-4 directory. (The % symbolize the shell prompt.) o Create the ./lib/pic/jump.log file by executing: % make shared-lib Don't worry about an error message when make tries to create libOBST.so but fails. o If there is a file jump.log in ./lib/pic, you are now ready to create the symbol files. Run the following commands: % getvars % getfuncs % rm lib/pic/jump.log % rm lib/pic/*.o o libOBST imports symbols from libc, so you have to create a third file called jump.import in ./lib/pic. This is done by running the following command: % nm --no-cplus -o /usr/lib/libc.sa | grep __GOT_ |\ sed 's/ __GOT__/ _/' > lib/pic/jump.import o Recompile everthing by executing: % make shared-lib The ./lib/pic directory should now contain many new files of the form _GVAR_nnnnn.s and _GCMN_nnnnn.s. o Run % getsize > lib/pic/jump.vars-new to get a copy of jump.vars with the variable sizes filled in. o You can backup lib/pic/jump.vars and then run the command: % cp lib/pic/jump.vars-new lib/pic/jump.vars o OK, now you are nearly done. Execute % make -f Makefile.shlibs.linux to build the library images. o To verify if the libraries have been build correctly run: % verify-shlib -l lib/libOBST.so.342.0 lib/libOBST.sa The output produced by verify-shlib should look like: verify v2.16 (experimental) Used address range 0x70000000-0x7012aec8 be aware ! must be unique ! The stub library and the sharable libraries have identical symbols The address range can be different depending on your settings in Makefile.shlib.linux. o To move libOBST.so.342.0 to its proper place in the lib directory type: % mv libOBST.so.342.0 libOBST.sa lib/ o To make the shared library known to the link editor, type (these commands should/will probably be changed, see the initial remark): % ln -s `pwd`/lib/libOBST.so.342.0 /usr/lib/libOBST.so.342.0 % ldconfig -v o If you want to create the dynamically linked OBST executables now, run the following commands: % rm bin/bundle bin/gtbundle % make That's all folks. Appendix: Makefile.linux.shared-libs: # -------------------------------------------------------------------------- # Copyright 1992-1994 by Forschungszentrum Informatik (FZI) # # You can use and distribute this software under the terms of the license # version 1 you should have received along with this software. # If not or if you want additional information, write to # Forschungszentrum Informatik, "OBST Projekt", Haid-und-Neu-Strasse 10-14, # D-76131 Karlsruhe, Germany. # -------------------------------------------------------------------------- # Makefile for OBST-Version OBST3-4 - # shared libs for Linux | 9-5-94 | Frank Fock # -------------------------------------------------------------------------- default: all #These settings can be adjusted if needed. I have no experience with DLLs, #so feel free to try your own values. ADDRESS = 0x70000000 JUMPSIZE = 0x12000 GOTSIZE = 4096 libdir =./lib srcdir_rel =. ETCDIR =$(srcdir_rel)/include/etc LIB = $(libdir) shLIBSUFF = /pic # # module switches of the OBST core distribution # PSM_MON.o = CPP_WITH_MON = CPP_WITH_X =-DHAVE_XTOOLS XTOOLS_OBJS =$(xtools_OBJS) do_libincrld = use_libincrld= INCRLD_OBJS = SIL_OBJS =$(sil_OBJS) XTDSYNC_OBJS = SYNC_OBJS =$(sync_OBJS) JOYCE_OBJS =$(joyce_OBJS) PROT_OBJS = # # compilation macros, dependency data # include $(ETCDIR)/obst_common.mk include $(ETCDIR)/local_defs.mk JUMP_DIR = $(libdir)/pic JUMP_LIB = libOBST #The following line only works with newer versions of Make. #If Make barfs on this, comment it out. export JUMP_DIR JUMP_LIB MAJOR= 342 MINOR = 0 VERSION = $(MAJOR).$(MINOR) IMAGE = $(JUMP_LIB) all: image stubs # -------------------------------------------------------------------------- # OBST library # -------------------------------------------------------------------------- xtdsync_OBJS=$(ext_lock.o) $(ext_sync.o) $(ext_sync_obst.o) \ $(optimistic.o) $(timestamp.o) joyce_OBJS=$(sync_obst.o) $(trans_obst.o)\ $(sync.o) $(lock.o) $(queue.o) $(synccont.o) $(trans.o)\ $(XTDSYNC_OBJS) prot_OBJS=$(prot_class.o) $(prot_type.o) $(prot_schema.o) $(prot_history.o) \ $(prot_obst.o) $(prot_method.o) $(mta_prot.o) LIBOBJS=$(mta_obst.o) $(agg_obst.o) $(knl_obst.o) $(dir_obst.o)\ $(mta.o) \ $(mta_schema.o) $(mta_type.o) \ $(mta_class.o) $(mta_super.o) $(mta_out.o) \ $(mta_misc.o) $(mta_meth.o) \ $(mta_err.o) $(mta_gen.o) \ $(PROT_OBJS)\ $(cci.o) $(cci_obst.o)\ $(knl.o)\ $(psm.o) $(psm_util.o) $(smg.o)\ $(JOYCE_OBJS)\ $(trc.o) $(err.o)\ $(Agg.o) $(Array.o)\ $(Bag.o) $(List.o) $(Set.o)\ $(Mapping.o) $(MapHash.o) $(MapList.o)\ $(dir.o)\ $(PSM_MON.o) $(obst.o) $(obst_globals.o) image: $(IMAGE).so.$(VERSION) $(IMAGE).so.$(VERSION): mkimage -f -l $(libdir)/$(IMAGE) -v $(VERSION) -a $(ADDRESS) \ -j $(JUMPSIZE) -g $(GOTSIZE) -- $(LIBOBJS) -lg++ -lc \ `gcc --print-libgcc-file-name` -lc stubs: $(IMAGE).sa $(IMAGE).sa: mkstubs -l $(libdir)/$(IMAGE) -v $(VERSION) -a $(ADDRESS)\ -j $(JUMPSIZE) -g $(GOTSIZE) -- $(IMAGE) # END of Makefile.linux.shared-libs -- ------------------------------------------------------------------- OBST Team * Frank Fock Forschungszentrum Informatik (FZI) Haid-und-Neu-Str. 10-14 D-76131 Karlsruhe, Germany email fock@fzi.de ------------------------------------------------------------------- Please send all questions and remarks concerning OBST to obst@fzi.de If you ran into difficulties with the installation or usage of OBST, please give us information about your platform. Be so kind to add this info to every bug report: o OBST version o configuration parameters for your OBST version (from file config.status) o kind and version of C++ compiler o machine o operating system -- Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu Be sure to include Keywords: and a short description of your software.