Link to home
Start Free TrialLog in
Avatar of Colin Brazier
Colin BrazierFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Trouble installing Cygwin as a COBOL compiler

Hi experts, I want to be able to run COBOL on my Windows 10 PC, so i have downloaded and unzipped GnuCobol, and downloaded Cygwin setup.exe.

I ran that with packages recommended in a tutorial, all fine so far.

When I used Cygwin to configure, the process finished with Error: Berkely DB db.h missing

When I looked at the log (attached), the word "error" features 42 times!  

Can anyone out there help me to get this going please?
Avatar of Peter Hutchison
Peter Hutchison
Flag of United Kingdom of Great Britain and Northern Ireland image

You need BerkeleyDB installed which includes db.h in /usr/local/BerkeleyDB6.1 /usr/include/

You can configure Cobol using one of the following two commands:
./configure LDFLAGS=-L/usr/local/BerkeleyDB6.1 CPPFLAGS=-I/usr/local/BerkeleyDB6.1/include
./configure --without-db (no ISAM support)
Avatar of Colin Brazier


Thanks.  I will try that, but in the meantime I have looked at the Cygwin install log.  This extract
2018/01/24 13:18:08 Starting cygwin install, version 2.884
2018/01/24 13:18:08 User has backup/restore rights
2018/01/24 13:18:08 io_stream_cygfile: fopen(/etc/setup/setup.rc) failed 2 No such file or directory
2018/01/24 13:18:08 Current Directory: C:\cygwin
2018/01/24 13:18:08 Could not open service McShield for query, start and stop. McAfee may not be installed, or we don't have access.
2018/01/24 13:18:14 source: network install
2018/01/24 13:18:16 root: C:\cygwin64 system
2018/01/24 13:18:34 Selected local directory: C:\OC
2018/01/24 13:18:39 net: Direct
2018/01/24 13:18:48 site:
2018/01/24 13:18:49 io_stream_cygfile: fopen(/etc/setup/installed.db) failed 2 No such file or directory
2018/01/24 13:18:50 io_stream_cygfile: fopen(/etc/setup/timestamp) failed 2 No such file or directory

Open in new window

suggests that it cannot locate /etc/setup/setup.rc, /etc/setup/installed.db and /etc/setup/timestamp, but I can see them all in my root (C:\cygwin64).  

Did I run the install from the wrong directory or something?

For completeness I attach the whole log file.

I tried
./configure LDFLAGS=-L/usr/local/BerkeleyDB6.1 CPPFLAGS=-I/usr/local/BerkeleyDB6.1/include
but got an error - C compiler cannot create executables.

Log attached.
Turn off your VirusScanner or exclude the c:\Cygwin* folders from scanning and try it again.
Nope, same again.

I also ran the Cygwin setup.exe from a different folder but still it says the db is missing.
From the config log it looks like you made a simple typing error and entered "l" (little ell) when you meant to put "I" (capital eye).
It's obvious with the config log font but I can't see the difference looking at what I just wrote.

In your post https:#a42446171 , you do have capital eye. But at the head of the config log, you do not.

If you get this going, the good folks on the Cygwin mailing list would be very interested. In the meantime, you will find them very helpful, should you choose to join and ask questions.
Did you mean here?  

./configure LDFLAGS=-L/usr/local/BerkeleyDB6.1 CPPFLAGS=-I/usr/local/BerkeleyDB6.1/include

It's a little ell as written by Peter, above.

I could try it with L, I guess, but I don't see where there should be a capital eye?

Thanks for the help btw.  I'm also on to the gnucobol guys at


Avatar of Bill Prew
Bill Prew

Maybe this will help, looking at Peter's first post, and then your log file, notice that Peter's has a Capital i, while you have a lowercase L.  (I just copy and pasted both into Notepad and view with Consolas font).

User generated image

Sorry Bill, missed your post.  OK, now I understand what Duncan was trying to tell me!   I was assuming that because LDFLAGS began -L, the CPPFLAGS would too.

Never assume...
The same error with I (Berkeley DB db.h is missing).   Is the collection of packages correct?  (attached again).
Now you have the correct error message ;)
Capital eye is short for "search for Include files in this directory". Little ell is short for "search this library". Big ell is short for "search for Libraries in this directory".
Will post more when my Cygwin system has finished updating.
Please don't spend too much time on this.  It would be good for me to solve this issue, but I have a compiler that works.
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That was it thanks!