Avatar of Colin Brazier
Colin Brazier
Flag 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 Lynda.com 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?
config.log
LinuxWindows 10COBOL

Avatar of undefined
Last Comment
Colin Brazier

8/22/2022 - Mon
Peter Hutchison

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
or
./configure --without-db (no ISAM support)
Colin Brazier

ASKER
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: https://www.singleboersen.com/mirror/cygwin/
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.

Cheers
setup.log
Colin Brazier

ASKER
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.
config.log
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Peter Hutchison

Turn off your VirusScanner or exclude the c:\Cygwin* folders from scanning and try it again.
Colin Brazier

ASKER
Nope, same again.

I also ran the Cygwin setup.exe from a different folder but still it says the db is missing.
Duncan Roe

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 cygwin@cygwin.com would be very interested. In the meantime, you will find them very helpful, should you choose to join and ask questions.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Colin Brazier

ASKER
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 https://sourceforge.net/p/open-cobol/discussion/help/thread/064a2586/

Cheers,

  Col
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).

sshot-407.png


»bp
Colin Brazier

ASKER
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Colin Brazier

ASKER
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 Brazier

ASKER
The same error with I (Berkeley DB db.h is missing).   Is the collection of packages correct?  (attached again).
packages.JPG
Duncan Roe

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.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Colin Brazier

ASKER
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.
ASKER CERTIFIED SOLUTION
Duncan Roe

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Colin Brazier

ASKER
That was it thanks!