You should check with the choco maintainer - the environment variable set is wrong.
Actually you can do where cobc which should very likely get you to the file that needs a change from /LIBPATH: to -L.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks like COB_LIBS isn't -lcob...
In any case change -L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libcob.lib" to -L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib", and if it still doesn't work while COB_LIBS is set, then add -lcob to that list.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here are the newest GnuCOBOL 3.2 (28Jul2023) download binaries built with MinGW Gnu Compiler Collection 9.2.0. These binaries have been updated as of 13Aug2023 to include the most recent updates to the GnuCOBOL manuals, which are included in PDF format. GnuCOBOL 3.2 includes PDCursesMod 4.3.7/wincon. It also includes GCSORT.EXE and support for the COBOL ReportWriter. You can download a 7-Zip binary and rename the file extension from "7z" to "exe", and run it as a self-installing archive. Then see the STARTHERE.txt file, or open a cmd.exe window in the install folder, and run "set_env.cmd" to set the environment variables.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
likely missing - check with cobc --info: have COB_LIBS with the value -lcob
COB_LIB_PATH, should point to the library path, prefixed by -L just as it was in your example above (installed -L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib")
COB_LIBRARY_PATH, which is a directory listing of default lookup paths, should point to where CBL_OC_DUMP.dll is, I guess that would be $($distDir)\extras
@chaat: the choco install is thought to "just work" and should be made that way by fixing the local choco installation, then check back with the choco packaga maintainer.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was trying to install GNUcobol for windows using
choco install gnucobol
but I have been stuck on the final step. It hits me with this error:I decided to use -v for more info but I am still a bit lost.
Any help is appreciated. :)
Last edit: Simon Sobisch 2024-01-16
Somewhere in the setup there's an error. As this is a GCC build using ld.exe, there should be no
/LIBPATH
but instead-L
.What is the output of
cobc --info
? Do you manually call a a batch script to do the setup and/or is this done in the choco package?I am using windows so choco calls a PowerShell script automatically as far as I know.
Last edit: Josh Chatterjee 2024-01-16
You should check with the choco maintainer - the environment variable set is wrong.
Actually you can do
where cobc
which should very likely get you to the file that needs a change from/LIBPATH:
to-L
.Did a bit of snooping around and I found the script that chocolatey runs on install.
Last edit: Josh Chatterjee 2024-01-16
change the (user) environment variables:
COB_LIBS
should be replaced to have `-lcob,COB_LIBRARY_PATH
replace/LIBPATH:
by-L
I guess you need to do a restart afterwards, then recheck - if this works then please pass this information to the choco package maintainer.
At least the error is different
Last edit: Josh Chatterjee 2024-01-16
It looks like
COB_LIBS
isn't-lcob
...In any case change
-L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libcob.lib"
to-L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib"
, and if it still doesn't work whileCOB_LIBS
is set, then add-lcob
to that list.Getting a different error now
Last edit: Josh Chatterjee 2024-01-17
Josh,
perhaps an easier option would be to download a binary archive from Arnold Trumbley's website that you can just expand and use...
https://www.arnoldtrembley.com/GC32-BDB-SP1-rename-7z-to-exe.7z
go to this page for installation instructions..
https://www.arnoldtrembley.com/GnuCOBOL.htm
Here are the newest GnuCOBOL 3.2 (28Jul2023) download binaries built with MinGW Gnu Compiler Collection 9.2.0. These binaries have been updated as of 13Aug2023 to include the most recent updates to the GnuCOBOL manuals, which are included in PDF format. GnuCOBOL 3.2 includes PDCursesMod 4.3.7/wincon. It also includes GCSORT.EXE and support for the COBOL ReportWriter. You can download a 7-Zip binary and rename the file extension from "7z" to "exe", and run it as a self-installing archive. Then see the STARTHERE.txt file, or open a cmd.exe window in the install folder, and run "set_env.cmd" to set the environment variables.
Josh,
you can find me on Skype if you have access to that, my user name is chuck.haatvedt
or send me a message and I could setup a meeting to help you get started.
Sure. Mr Chuck H. I have classes now but I will check it out and see if i can fix this issue.
Last edit: Josh Chatterjee 2024-01-17
Rechecked the (edited?) post above:
cobc --info
: haveCOB_LIBS
with the value-lcob
COB_LIB_PATH
, should point to the library path, prefixed by-L
just as it was in your example above (installed-L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib"
)COB_LIBRARY_PATH
, which is a directory listing of default lookup paths, should point to whereCBL_OC_DUMP.dll
is, I guess that would be$($distDir)\extras
@chaat: the choco install is thought to "just work" and should be made that way by fixing the local choco installation, then check back with the choco packaga maintainer.
Back in my day, people actually notified the maintainers...
Anyway: I fixed the Chocolatey package. Thank you for being involved to everyone who helped!