The TinyCOBOL Project. TinyCOBOL supports the IA32 (x86) architecture and the following platforms. - FreeBSD using the GCC compiler. - Linux using the GCC compiler. - Win32 using the GCC MinGW (Mingw32) compiler. - Win32 using the GCC Cygwin compiler and POSIX emulation layer. See 'INSTALL.Win32' file notes for information on the Win32 platforms. ------------------------------------------------------------------------------- Release Notes: Linux and FreeBSD. Due to multiple versions of Berkeley's DB library included in recent RPM type distributions such as Red Hat 7.x, Mandrake 8.x, SUSE 7.x. The configure script will attempt to properly configure such systems. However due to the number of permutations the configure script may fail to configure for Berkeley's DB library. If the normal configure fails to properly detect Berkeley's lib DB on your system, try the following option: ./configure --with-libdb=3 If the '--with-libdb=3' option fails to properly detect Berkeley's DB on your system, then some temporary links may be used to circumvent this problem. ln -s libdb1.so.xx libdb.so ln -s db1/db.h db.h ------------------------------------------------------------------------------- Requirements: GCC tool set (GCC, AS, LD): This compiler generates GAS compatible assembler code for the i386 Linux platform. The final compilation and linkage can be done by GCC, or by htcobol using the -x option. Bison or Berkeley's YACC (byacc) version 1.9.3 is required to compile the TC parser. Berkeley's YACC version 1.9.3 (byacc) can be downloaded only from the TC 'snapshot' web page. Previous versions will not work, as the table size is inadequate to handle the large COBOL grammar. Library DB (version db-1.85.4 or later): This library is used to access indexed files. It is available on iBiblio(1), or at Sleepycat(2). Note that version 1.85 and 2.0 may be named -ldb or -ldb1. Version 2.xx, 3.yy (xx > 0) may be named -ldb or -ldb2. Note that later versions of libdb, such as 3.0.55, have a compatibility to version 1.85 option, when configured with '--enable-compat185' (DB 1.85 compatibility API). Note that the configure script will try to determine and test for the library db version using various library names (-ldb -ldb1 -ldb2). However the test.code and test_suite directory Makefiles will require minor manual modifications if library db is named as libdb1, libdb2 or libdb3 on your system. This will be changed at a later date. The current configure script will try to determine which version of library db is been used, assuming the library is called libdb.so*, libdb.a. It does so by checking for the existence of the headers and library, and then performs the following tests: - If header db_185.h is found, it does a test compile with libdb, to ensure that the compatibility to version 1.85 option set. - If header db_185.h is not found, it searches for header db.h. - If header db.h is found, it does a test to ensure that the header belongs to version 1.85 of libdb, and finally it does a test compile, to ensure it is version 1.85 of libdb. Note that database file formats are incompatible between version 1.85.4 and 2.xx and later. Thus indexed files created by a COBOL program using version 1.85.4 of db, will not be readable by any COBOL program using later versions of db. 1) iBiblio (formerly known as Metalab, Sunsite) http://www.ibiblio.org/pub/linux/libs/db http://metalab.unc.edu/pub/linux/libs/db db-1.85.4-bin-ELF.tar.gz - shared lib of db 1.85.4 db-1.85.4-src.tar.gz - full source tree for db 1.85.4 2) Sleepycat Software http://www.sleepycat.com/ versions 2.xx and later (current 3.xx series) ncurses: The ncurses library is required. Used in screen I/O. readline: The realine library version 2 is optional. Set by WANT_READLINE build option. ------------------------------------------------------------------------------- To build: ./configure Edit htconfig.h and change if necessary. make make install (su access required) Note that the test programs found in test_suite and test.code directories, can be compiled and run without installing htcobol. configure options: --enable and --with options recognized: --with-compiler=[ARG] use compiler [gcc/kgcc/egcs default=gcc] --with-yacc=[ARG] use YACC [yacc193 default=bison] --enable-debug set C compiler debug option on [-g] --enable-debug-all enable all debug options --enable-debug-comp enable compiler and scanner debug options --enable-debug-compiler enable compiler debug option --enable-debug-scanner enable scanner debug option --enable-debug-rts enable debug Run-Time option --enable-debug-rts-move enable debug Run-Time Move routines option --enable-debug-pp enable debug pre-processor option --with-libdb=[ARG] use DB library version [2 3] --with-readline use readline library --with-dl use dynamic loader for RTS libraries Note: The '--enable-debug-comp' configure option will enable the compiler trace information generated by the compiler, and used to debug the compiler itself. It will not effect compiler debug option '-D', which adds debugging data to the generated binary. Unless you are a developer, or are planning to debug the compiler itself, or like to look at substantial amounts of trace data, it is recommended that the above configure option be omitted. To clean: Type make clean to clean lib and compiler. Type make cleanall to clean lib, compiler, utils, test.code. Type make distclean to clean lib and compiler and config.cache config.status config.log Makefiles. Some test programs can be found in test.code directory. The utils directory contains some utility programs. cobf2f (Option, not installed by default): Converts to/from fixed and free-form COBOL formats. ------------------------------------------------------------------------------- The TinyCOBOL pre-processor. What it does. - convert from fixed to free-form COBOL format. - Process the COPY command. - Process the REPLACE command (not functional in current version). Integration with the main compiler. - The new pre-processor will now be executed by default. To ensure backward compatibility, the original PP has not been removed from the main compiler. Further integration will be done once the pre-processor is deemed to be stable. - The main compiler does require that the full path of the pre-processor be known. This is problematic as the development and install directories are different. To circumvent this problem the 'TCOB_PPDIR' environmental variable has been added to set the location of the pre-processor. A bash script 'mak.sh', has been added in the test.code directory, which enables the user to build the test programs when the main compiler resides in the development directories. See Readme.txt file in the test.code directory for further information. See Readme.txt file in the cobpp directory for further information. ------------------------------------------------------------------------------- Environmental variables: The 'TCOB_DIR' environmental variable sets the directory where the compiler options file 'htcobolrc' can be found. The 'TCOB_PPDIR' environmental variable sets the directory where the pre-processor is located. ------------------------------------------------------------------------------- To install (su access required): If necessary edit directories and filenames htconfig.h, Makefile in compiler directory, and Makefile in lib directory to suit. Edit the compiler resource file called htcobolrc found in the compiler directory. The compiler resource file name can be set in htconfig.h. This file contains installation specific default information. As su, in the root directory type make install. ------------------------------------------------------------------------------- Reported problems: Configuring Berkeley's lib DB: Problems have been reported with configuring Berkeley's lib DB on systems with multiple versions of the library, or unusual locations of the headers, or library names with version numbers. An example would be libdb.so.3 renamed as libdb3.so. Problems such as this have been reported on Red Hat version 7. An attempt have been made to properly configure such systems. However due to the number of permutations, this has proved difficult. If the normal configure fails to properly detect Berkeley's lib DB on your system, try the following option. ./configure --with-libdb=3 If the 'configure --with-libdb=3' fails to properly detect Berkeley's lib DB on your system, some temporary links could be used to circumvent this problem. ln -s libdb1.so.xx libdb.so ln -s db1/db.h db.h If you encounter this problem please report it to the mailing list.