While trying to install GnuCobol (under Windows 8 64-bit and MSYS2), I get the following error:
configure: error: Berkeley DB db.h is missing, you may adjust BDB_CFLAGS
Can someone tell me what exactly I should change, in which file? I'd like to configure it to use MySQL, since I already have that installed, but I don't know if that's possible.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can someone tell me what exactly I should change, in which file? I'd
like to configure it to use MySQL, since I already have that
installed, but I don't know if that's possible.
Thanks.
Berkeley DB is used ONLY for ISAM data files and not as a SQL Database etc,
If you wish to use Mysql (or Mariadb) then you must install that package
along as always with the development header package element as well.
You can use Mysql or Mariadb packages and in fact for many distros
mariadb is installed in place of MySQL when selecting it.
You also need to install the Client libraries as well (and the headers etc).
In addition you will need to select and install the Cobol Pre compiler
for that DB such as JC-Precompiler or dbpre and both are in the Contrib
libraries on SF under GC.
There is documentation for both included within each product,
.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Why MSYS2 ? Why not use Arnold's 32 bit prebuilt.
Unless you have a COBOL application application requiring more than 2,114,000,000 (two billion bytes) bytes of addressability Arnold's 32 bit prebuilit works just fine with a 64 bit Windows OS.
I am of the opinion that the GnuCOBOL back-end uses none of the newer version of the "C" support in MSYS2.
BDB is fully functional if you download the Arnold build which installs BDB.
IMO the MSYS2 build is a solution in search of a problem to solve.
Ralph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
NEW GnuCOBOL 3.2 BDB (13Aug2023) GC32-BDB-SP1-rename-7z-to-exe.7z -- MinGW GnuCOBOL compiler for Windows XP/7/8/10/11. Includes GCC 9.2.0, Berkeley DataBase 18.1.40 for Indexed Sequential file access support, GMP 6.2.1, and PDCursesMod 4.3.7 (25.6 megabytes). Rename .7z to .exe for self-extracting archive.
Ralph
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks! I was able to install it (after fighting with Windows and Norton, neither of which would allow me to run the installer at first) and ran 'TestGC.cmd' successfully.
If I understand correctly, I'd have to build it from source to add support for MySQL, is that correct?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That all depends. If you want to use MySQL via EXEC SQL you will - in any case - need to use a preparser (GixSQL or esqlOC).
If you want to use MySQL with ORGANIZATION INDEXED then you'd need to build it from source, using the "trunk" version (GnuCOBOL 4.x+) with a workable ODBC (which may be unixodbc, that can also be installed via pacman).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Too much information! I need to take things a little more slowly, I've never installed GnuCobol before. First of all, how do I get rid of that error message, so I can just do a default install?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just get the binaries, unpack them somewhere and be ready, for that, see Arnold's page as mentioned by Ralph (this includes all necessary components, either from "old" MinGW or the much bigger and newer MSYS2 provided ones; note that this is likely not MSYS2 provided build of GnuCOBOL but possibly a self-built one using different components).
Build GnuCOBOL itself from source, commonly starting with unpacking a release tarball then running configure. For this you need all the dependencies installed or configure those to not be used.
This commonly means you'd install things like gmp, bdb, curses, ... both as "normal" and as "dev" packages (MSYS2 has only "full" packages as it is a developer-only environment, not a common distribution).
The good thing about installing from source is that:
you can adjust the installed version (for example include some official patches or tweak/tinker)
you can debug GnuCOBOL itself
If you just want to use GnuCOBOL and use MSYS2 as distribution for that: pacman -S mingw-w64-x86_64-gnucobol (adjust the arch as necessary). To use that from within any of the MSYS2-MinGW environments execute . cobenv.sh from there once, to use it from outside of those environments (cmd.exe or skripts) start with calling "cobenv.bat".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
While trying to install GnuCobol (under Windows 8 64-bit and MSYS2), I get the following error:
Can someone tell me what exactly I should change, in which file? I'd like to configure it to use MySQL, since I already have that installed, but I don't know if that's possible.
Thanks.
On 27/11/2023 21:47, David wrote:
If you wish to use Mysql (or Mariadb) then you must install that package
along as always with the development header package element as well.
You can use Mysql or Mariadb packages and in fact for many distros
mariadb is installed in place of MySQL when selecting it.
You also need to install the Client libraries as well (and the headers etc).
In addition you will need to select and install the Cobol Pre compiler
for that DB such as JC-Precompiler or dbpre and both are in the Contrib
libraries on SF under GC.
There is documentation for both included within each product,
.
Why MSYS2 ? Why not use Arnold's 32 bit prebuilt.
Unless you have a COBOL application application requiring more than 2,114,000,000 (two billion bytes) bytes of addressability Arnold's 32 bit prebuilit works just fine with a 64 bit Windows OS.
I am of the opinion that the GnuCOBOL back-end uses none of the newer version of the "C" support in MSYS2.
BDB is fully functional if you download the Arnold build which installs BDB.
IMO the MSYS2 build is a solution in search of a problem to solve.
Ralph
Why MSYS2? Just because I already had it installed. Where can I download "Arnold's 32 bit prebuilt"?
https://www.arnoldtrembley.com/GnuCOBOL.htm
This URL (first one)
NEW GnuCOBOL 3.2 BDB (13Aug2023) GC32-BDB-SP1-rename-7z-to-exe.7z -- MinGW GnuCOBOL compiler for Windows XP/7/8/10/11. Includes GCC 9.2.0, Berkeley DataBase 18.1.40 for Indexed Sequential file access support, GMP 6.2.1, and PDCursesMod 4.3.7 (25.6 megabytes). Rename .7z to .exe for self-extracting archive.
Ralph
Thanks! I was able to install it (after fighting with Windows and Norton, neither of which would allow me to run the installer at first) and ran 'TestGC.cmd' successfully.
If I understand correctly, I'd have to build it from source to add support for MySQL, is that correct?
That all depends. If you want to use MySQL via
EXEC SQL
you will - in any case - need to use a preparser (GixSQL or esqlOC).If you want to use MySQL with
ORGANIZATION INDEXED
then you'd need to build it from source, using the "trunk" version (GnuCOBOL 4.x+) with a workable ODBC (which may be unixodbc, that can also be installed via pacman).Too much information! I need to take things a little more slowly, I've never installed GnuCobol before. First of all, how do I get rid of that error message, so I can just do a default install?
There are two general different options:
This commonly means you'd install things like gmp, bdb, curses, ... both as "normal" and as "dev" packages (MSYS2 has only "full" packages as it is a developer-only environment, not a common distribution).
The good thing about installing from source is that:
If you just want to use GnuCOBOL and use MSYS2 as distribution for that:
pacman -S mingw-w64-x86_64-gnucobol
(adjust the arch as necessary). To use that from within any of the MSYS2-MinGW environments execute. cobenv.sh
from there once, to use it from outside of those environments (cmd.exe or skripts) start with calling "cobenv.bat".