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?
Colin BrazierAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter HutchisonSenior Network Systems SpecialistCommented:
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)
Colin BrazierAuthor Commented:
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.

Colin BrazierAuthor Commented:
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.
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Peter HutchisonSenior Network Systems SpecialistCommented:
Turn off your VirusScanner or exclude the c:\Cygwin* folders from scanning and try it again.
Colin BrazierAuthor Commented:
Nope, same again.

I also ran the Cygwin setup.exe from a different folder but still it says the db is missing.
Duncan RoeSoftware DeveloperCommented:
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.
Colin BrazierAuthor Commented:
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


Bill PrewIT / Software Engineering ConsultantCommented:
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).


Colin BrazierAuthor Commented:
Colin BrazierAuthor Commented:
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...
Colin BrazierAuthor Commented:
The same error with I (Berkeley DB db.h is missing).   Is the collection of packages correct?  (attached again).
Duncan RoeSoftware DeveloperCommented:
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.
Colin BrazierAuthor Commented:
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.
Duncan RoeSoftware DeveloperCommented:
The Cygwin package that provides /usr/include/db.h is libdb-devel

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Colin BrazierAuthor Commented:
That was it thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.