From: Reg <re...@ri...> - 2007-12-14 22:39:12
|
Hi David, Decided to get rid of all the clutter, removed all versions of TC and re-installed from CVS. Compilations worked perfectly. Thanks. Next problem:- Whether I compile with -m and run vis htcobrun or compile with -x for an executable, when I call the next program in the system I get:- /TinyCat/startpass1: line 4: 13359 Segmentation fault /TinyCobol/development/cobrun/htcobrun PASSCHEC1 (different number for fault from -x version). This seems to occur when PASSCHEC1 calls the next program, which was compiled with -m. Could be the next program is large or the single parameter passed in linkage is too big? Anyway, seems like a memory fault similar to the compile problem prior to the CVS version. Regards, Reg. David Essex-2 wrote: > > Reg wrote: > > > This now works to create a static binary, but > > how do I create a dynamic loading system? > > What was created in the example was a binary linked with shared > libraries (DLL's) and a static TC RT library. > The system linker will try to use a shared library, failing that it will > try using a static library. > > So I'm not sure what you mean by a 'dynamic loading system'. > > If you want to create a shared TC RT library (DLL), just change the > 'lib' make file. > > #all: static-libs > all: static-libs shared-libs > ... > #install: install-rts-config install-static-libs > install: install-rts-config install-static-libs install-shared-libs > > Then from the 'development' directory, > make clean > make > make install (as root) > > If you prefer to use modules (shared library), just use the '-m' option > then run it using 'htcobrun'. > > > When I change the -c to -x on the compile stage, > > I get the problem again. > > What do I need to put in on the compile line? > > (htcobol ......-x or -m.....XYZ.COB) > > The reason you are getting those linkage error messages, is that you are > using two different versions of TC to create a binary. > You are using 'htcobol' from version 0.63.87 (I think), and the RTL from > another TC version. > > The best fix would be to remove all installed TC files, then do a new TC > install using the source from version 0.63.87. > > A quich fix is to use add the following to the xterm config ('.bashrc' > or '.profile'), or what ever you are using as a terminal. > > export TCOB_OPTIONS_PATH=/TinyCobol/development/compiler > export TCOB_RTCONFIG_PATH=/TinyCobol/development/lib > export TCOB_LD_LIBRARY_PATH=/TinyCat > export LD_LIBRARY_PATH=/TinyCobol/development/lib:/TinyCat > > To the TC compile time resource file 'htcobolrc', found in the > 'development/compiler' directory, add the following. > > LD_PATH: -L/TinyCobol/development/lib > > Now do the following. > Check the version of TC used, a test compile and run the binary created. > You should get the following results with no linker errors. > > #/TinyCobol/development/compiler/htcobol -V > TinyCOBOL - pre alpha 0.63.87 ... > > #cd /TinyCat > > #/TinyCobol/development/compiler/htcobol -v -x DEGRABBER.COB > as -o DEGRABBER.o DEGRABBER.s > gcc -o DEGRABBER DEGRABBER.o -L/TinyCobol/development/lib -lhtcobol > -ldl -ldb -lncurses -lm > > #./DEGRABBER > > Now create a module and use 'htcobrun' to load it and run it. > > #/TinyCobol/development/compiler/htcobol -v -m DEGRABBER.COB > as -o DEGRABBER.o DEGRABBER.s > gcc -shared -Wl,-soname,DEGRABBER.so -o DEGRABBER.so > DEGRABBER.o -L/TinyCobol/development/lib -lhtcobol > > #/TinyCobol/development/cobrun/htcobrun DEGRABBER > > Cheers. > > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Tin...@li... > https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users > > -- View this message in context: http://www.nabble.com/Segmentation-Fault-tp12496784p14339835.html Sent from the tiny-cobol-users mailing list archive at Nabble.com. |