Windows Install Problem

Asked by Steve Moreland

With both 4.6.3 and 4.6.4, after an error-free installation with administrator rights on Windows 7 Home Premium - in a path with no spaces - the IDE displays a message that it can't find the compiler. When the preferences dialog is opened and the compiler options are displayed, the pathnames are correct, clicking the "check compiler" dialog returns success, as:

cobc (GNU Cobol) 1.1.0
Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Keisuke Nishida
Copyright (C) 2006-2012 Roger While
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Built May 30 2015 23:52:03
Packaged Jan 20 2014 07:40:53 UTC
C version "4.8.1"

However, when the "check compilation" button is hit:

Complier check failed:

Exit code: 1
Output:c:/local/opencobolide/gnucobol/bin/../lib/gcc/mingw32/4.8.1/../../../crt2.o:(.text+0x1c6): undefined reference to `_setargv'
collect2.exe: error: ld returned 1 exit status

Tip: You might need to adapt the environment variables set by the IDE to make it work.

The environment variables as displayed in the Preferences dialog appear to be set correctly.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenCobolIDE Edit question
Assignee:
No assignee Edit question
Solved by:
Steve Moreland
Solved:
Last query:
Last reply:
Revision history for this message
ColinDuquesnoy (colin-duquesnoy) said :
#1

Does it work if you install previous versions? Is it possible that you have another installation of MinGW somewhere on your system?

Have you tried to restore factory defaults? (Help -> Restore factory defaults)

Revision history for this message
ColinDuquesnoy (colin-duquesnoy) said :
#2

Does it work if you install previous versions? Is it possible that you
have another installation of MinGW somewhere on your system?

Have you tried to restore factory defaults? (Help -> Restore factory
defaults)

On Tue, Aug 4, 2015 at 8:21 PM, Steve Moreland
<email address hidden> wrote:
> New question #269998 on OpenCobolIDE:
> https://answers.launchpad.net/cobcide/+question/269998
>
> With both 4.6.3 and 4.6.4, after an error-free installation with
> administrator rights on Windows 7 Home Premium - in a path with no
> spaces - the IDE displays a message that it can't find the compiler.
> When the preferences dialog is opened and the compiler options are
> displayed, the pathnames are correct, clicking the "check compiler"
> dialog returns success, as:
>
> cobc (GNU Cobol) 1.1.0
> Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Keisuke Nishida
> Copyright (C) 2006-2012 Roger While
> This is free software; see the source for copying conditions. There
> is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.
> Built May 30 2015 23:52:03
> Packaged Jan 20 2014 07:40:53 UTC
> C version "4.8.1"
>
> However, when the "check compilation" button is hit:
>
> Complier check failed:
>
> Exit code: 1
> Output:c:/local/opencobolide/gnucobol/bin/../lib/gcc/mingw32/4.8.1/../../../crt2.o:(.text+0x1c6):
> undefined reference to `_setargv'
> collect2.exe: error: ld returned 1 exit status
>
>
> Tip: You might need to adapt the environment variables set by the IDE
> to make it work.
>
> The environment variables as displayed in the Preferences dialog
> appear to be set correctly.
>
> --
> You received this question notification because you are an answer
> contact for OpenCobolIDE.

Revision history for this message
Steve Moreland (moreland-steve) said :
#3

Yes, I do have another install of MinGW on the system. I edited the Windows PATH environment variable and removed the references to MinGW from the PATH. I still get the same behavior - upon launch, the IDE says it cannot find the cobol compiler. However, in the preferences box the compiler path is present and correct and "check compiler" dialog returns the same result (correct) as originally reported. The "check compilation" option however, errors the same as above.

I have bashed the "reset" and "factory defaults" several times to no avail.

Revision history for this message
ColinDuquesnoy (colin-duquesnoy) said :
#4

> I still get the same behavior - upon launch, the IDE says it cannot find the cobol compiler.

The message maybe a bit confusing, I should probably change it. It really means that the compiler is not working as it is not able to successfully compile a hello world program.

> I edited the Windows PATH environment variable and removed the references to MinGW from the PATH

This should be working. OpenCobolIDE just prepends the PATH value defined in the compiler preferences to the real PATH environment variable.

I have no idea why you have this error but I would start by removing (just rename) that MinGW installation and see if that makes a difference.

Did you try previous versions to see if one work? That would help to narrow the problem, if the problem come from the IDE.

Revision history for this message
Steve Moreland (moreland-steve) said :
#5

Renaming my pre-existing MinGW directory to something else cured the problem. The IDE finds the compiler on startup and compiles the hello world program.

Thanks for your help.

Revision history for this message
ColinDuquesnoy (colin-duquesnoy) said :
#6

The reason why you had this error is explained in the following ticket (see the comment of GitMensch): https://github.com/OpenCobolIDE/OpenCobolIDE/issues/193#issuecomment-128496530

Revision history for this message
Swen Meinert (smeinert) said :
#7

Hi Colin,
My system is Windows7
OpenCobolIDE 4.7.6.
MinGW is not installed (don't know what that is at all)

Behavior is exactly the same as described by Steve above.

Same for version 4.6.4., 4.6.1. Version 4.3.1. seems to be OK while startup bud I cannot open a file with it.

TestGC.cmd runs fine:
cobc -x -W -fnotrunc -t C:\Users\ek52qf\AppData\Local\Temp\testfunc.lst -o C:\Users\ek52qf\AppData\Local\Temp\testfunc.exe testfunc.cob

GnuCOBOL 2.0 Compile Returncode = 0

Now run the "TESTFUNC.EXE" program

TESTFUNC Start - GnuCOBOL 2.0.0 06NOV2016 RC-2
TESTFUNC Compiled = 2018/04/09 10:43:44
TESTFUNC Executed = 2018/04/09 10:43:50
TESTFUNC Successfully Completed

Press any key to continue . . .

When I run cobc -info:
cobc (GnuCOBOL) 2.0.0
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Built Nov 13 2016 01:30:50
Packaged Nov 06 2016 22:36:19 UTC
C version "5.3.0"

build information
build environment : i686-pc-mingw32
CC : gcc
CPPFLAGS : -I/mingw/include
CFLAGS : -O2 -pipe -finline-functions -fsigned-char
                           -Wall -Wwrite-strings -Wmissing-prototypes
                           -Wno-format-y2k -U_FORTIFY_SOURCE
LD : c:/gc20-build/mingw/mingw32/bin/ld.exe
LDFLAGS :

GnuCOBOL information
COB_CC : gcc
COB_CFLAGS : -I/mingw/include -I/mingw/include -pipe
  env: COB_CFLAGS : -I"C:\Program Files
                           (x86)\OpenCobolIDE\GnuCOBOL\include"
COB_LDFLAGS :
  env: COB_LDFLAGS : -L"C:\Program Files
                           (x86)\OpenCobolIDE\GnuCOBOL\lib"
COB_LIBS : -L/mingw/lib -lcob -lm -lgmp -L/mingw/lib
                           -lintl -lpdcurses -ldb
COB_CONFIG_DIR : /mingw/share/gnu-cobol/config
  env: COB_CONFIG_DIR : C:\Program Files
                           (x86)\OpenCobolIDE\GnuCOBOL\config
COB_COPY_DIR : /mingw/share/gnu-cobol/copy
  env: COB_COPY_DIR : C:\Program Files
                           (x86)\OpenCobolIDE\GnuCOBOL\copy
COB_MSG_FORMAT : GCC
COB_MODULE_EXT : dll
COB_EXEEXT : .exe
64bit-mode : no
BINARY-C-LONG : 4 bytes
extended screen I/O : pdcurses
variable format : 0
sequential handler : built-in
ISAM handler : BDB

Where do these strange paths come from?
I am not able to get it work.

Do you have another hint?

regards

Swen