Menu

Can you run gnuCOBOL on a mapped network drive?

Paul
2024-03-20
2024-03-20
  • Paul

    Paul - 2024-03-20

    I got the 3.2 gnuCOBOL prebuilt binaries from: https://www.arnoldtrembley.com/GnuCOBOL.htm

    I had no issues when I downloaded to my local machine’s c:\ drive. I integrated with Notepad++ and it all worked perfectly! No issues running gnuCOBOL on a local drive (i.e. c:).

    However, for work, I use Horizon VMWare as my virtual PC. The VMWare image includes a mapped network drive to allow me to store utilities, programs, documents, etc. Anything written to the C:\ will be lost when I sign out. I downloaded GnuCOBOL 3.2 (28Jul2023) MSYS2 64-bit GC32M-BDB-x64.7z -- MSYS2 64-bit GnuCOBOL 3.2 Final release with full debugging support to my mapped drive “O:”. No spaces in path. When I run cobc from my mapped network drive I’m getting errors. I suspect it has something to do with the path or path length. Does anyone know if this can be resolved and if so, how?

    O: is a mapped network drive - //xxx-smb/xxx_home/PBaker

    CD: O:\COBOL\samples\simple.cob
    Current directory: O:\COBOL\samples
    o:\utilities\gnuCobol\set_env.cmd
    Process started (PID=3652) >>>
    cobc (GnuCOBOL) 3.2.0
    Copyright (C) 2023 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <https://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     Jul 28 2023 16:08:08
    Packaged  Jul 28 2023 16:58:47 UTC
    C version (MinGW) "13.1.0"
    
    GnuCOBOL 3.2.0 (Jul 28 2023 16:07:51), (MinGW) "13.1.0" 
    GMP 6.2.1, libxml2 2.11.4, cJSON 1.7.15, PDCursesMod 4.3.7, BDB 18.1.40 
    
    O:\COBOL\samples>cobc -x simple.cob -o a.exe
    cobc -x simple.cob -o a.exe
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find //xxx-smb/xxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/crt2.o: Invalid argument
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find //xxx-smb/xxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtbegin.o: Invalid argument
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find -lgcc: No such file or directory
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find -lgcc_eh: No such file or directory
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find -lgcc: No such file or directory
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find -lgcc_eh: No such file or directory
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find //xxx-smb/xxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/default-manifest.o: Invalid argument
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find //xxx-smb/xxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtend.o: Invalid argument
    collect2.exe: error: ld returned 1 exit status
    
    O:\COBOL\samples>
    

    Thanks in advance….

     

    Last edit: Paul 2024-03-20
  • Simon Sobisch

    Simon Sobisch - 2024-03-20

    I think that's not understood by the cmd envrionment where this runs.

    I've used to use network drives and it worked fine if starting using set_env,cmd directly from the network (which will assign a temporary drive, commonly Z: and map accordingly). Can you please recheck that?

    • open //xxx-smb/xxx_home/PBaker/Utilities/gnuCOBOL/set_env.cmd --> from explorer.exe or "Run
    • execute cd O:\COBOL\samples
    • execute cobc -x simple.cob -o a.exe (no additional set_env call from the command line)

    If this doesn't work, then please compile with cobc -x simple.cob -o a.exe -vv and share the output.

     
  • Paul

    Paul - 2024-03-20

    Thank you for the quick response. I very much appreciate it. I followed the steps above (basically it was what I had been doing). It did not work. Below is the output using the -vv option. Thank you!

    CD: O:\COBOL\samples\simple.cob
    Current directory: O:\COBOL\samples
    o:\utilities\gnuCobol\set_env.cmd
    Process started (PID=11144) >>>
    cobc (GnuCOBOL) 3.2.0
    Copyright (C) 2023 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <https://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     Jul 28 2023 16:08:08
    Packaged  Jul 28 2023 16:58:47 UTC
    C version (MinGW) "13.1.0"
    
    GnuCOBOL 3.2.0 (Jul 28 2023 16:07:51), (MinGW) "13.1.0" 
    GMP 6.2.1, libxml2 2.11.4, cJSON 1.7.15, PDCursesMod 4.3.7, BDB 18.1.40 
    
    O:\COBOL\samples>cobc -x simple.cob -o a.exe -vv
    cobc -x simple.cob -o a.exe -vv
    loading standard configuration file 'default.conf'
    command line:   cobc -x -o a.exe -vv simple.cob 
    preprocessing:  simple.cob -> C:\Users\PBaker\AppData\Local\Temp\cob7372_0.cob
    return status:  0
    parsing:    C:\Users\PBaker\AppData\Local\Temp\cob7372_0.cob (simple.cob)
    return status:  0
    translating:    C:\Users\PBaker\AppData\Local\Temp\cob7372_0.cob -> C:\Users\PBaker\AppData\Local\Temp\cob7372_0.c (simple.cob)
    executing:  gcc -c -I"o:\Utilities\gnuCOBOL\include" -v -o
            "C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o"
            "C:\Users\PBaker\AppData\Local\Temp\cob7372_0.c"
    Using built-in specs.
    COLLECT_GCC=gcc
    Target: x86_64-w64-mingw32
    Configured with: ../gcc-13.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=nocona --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-libssp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev7, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 13.1.0 (Rev7, Built by MSYS2 project) 
    COLLECT_GCC_OPTIONS='-c' '-I' 'o:\Utilities\gnuCOBOL\include' '-v' '-o' 'C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o' '-mtune=generic' '-march=nocona' '-dumpdir' 'C:\Users\PBaker\AppData\Local\Temp\'
     //xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/cc1.exe -quiet -v -I o:\Utilities\gnuCOBOL\include -iprefix //xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/ -D_REENTRANT C:\Users\PBaker\AppData\Local\Temp\cob7372_0.c -quiet -dumpdir C:\Users\PBaker\AppData\Local\Temp\ -dumpbase cob7372_0.c -dumpbase-ext .c -mtune=generic -march=nocona -version -o C:\Users\PBaker\AppData\Local\Temp\ccu96YQx.s
    GNU C17 (Rev7, Built by MSYS2 project) version 13.1.0 (x86_64-w64-mingw32)
        compiled by GNU C version 13.1.0, GMP version 6.2.1, MPFR version 4.2.0-p9, MPC version 1.3.1, isl version isl-0.26-GMP
    
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    ignoring nonexistent directory "//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/include"
    ignoring duplicate directory "//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/include"
    ignoring nonexistent directory "D:/a/msys64/mingw64/include"
    ignoring nonexistent directory "/mingw64/include"
    ignoring duplicate directory "//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed"
    ignoring nonexistent directory "//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/include"
    ignoring nonexistent directory "D:/a/msys64/mingw64/include"
    ignoring duplicate directory "o:\Utilities\gnuCOBOL\include"
      as it is a non-system directory that duplicates a system directory
    #include "..." search starts here:
    #include <...> search starts here:
     //xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include
     //xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../include
     //xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed
    End of search list.
    Compiler executable checksum: 79cd6bb259be143c9b3acca47f926a3f
    COLLECT_GCC_OPTIONS='-c' '-I' 'o:\Utilities\gnuCOBOL\include' '-v' '-o' 'C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o' '-mtune=generic' '-march=nocona' '-dumpdir' 'C:\Users\PBaker\AppData\Local\Temp\'
     as -v -I o:\Utilities\gnuCOBOL\include -o C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o C:\Users\PBaker\AppData\Local\Temp\ccu96YQx.s
    GNU assembler version 2.40 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.40
    COMPILER_PATH=//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/;//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/
    LIBRARY_PATH=//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/;//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/;//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/;//xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../
    COLLECT_GCC_OPTIONS='-c' '-I' 'o:\Utilities\gnuCOBOL\include' '-v' '-o' 'C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o' '-mtune=generic' '-march=nocona' '-dumpdir' 'C:\Users\PBaker\AppData\Local\Temp\cob7372_0.'
    return status:  0
    executing:  gcc -Wl,--export-all-symbols -Wl,--enable-auto-import
            -Wl,--enable-auto-image-base -o "a.exe"
            "C:\Users\PBaker\AppData\Local\Temp\cob7372_0.o"
            -L"o:\Utilities\gnuCOBOL\lib" -L/mingw64/lib -lcob
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find //xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/crt2.o: Invalid argument
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find //xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtbegin.o: Invalid argument
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find -lgcc: No such file or directory
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find -lgcc_eh: No such file or directory
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find -lgcc: No such file or directory
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find -lgcc_eh: No such file or directory
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find //xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib/default-manifest.o: Invalid argument
    o:\Utilities\gnuCOBOL\bin/ld.exe: cannot find //xxxxx-smb/xxxxx_home/PBaker/Utilities/gnuCOBOL/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtend.o: Invalid argument
    collect2.exe: error: ld returned 1 exit status
    return status:  1
    cobc (GnuCOBOL) 3.2.0
    Built     Jul 28 2023 16:08:08  Packaged  Jul 28 2023 16:58:47 UTC
    C version (MinGW) "13.1.0"
    
    O:\COBOL\samples>
    
     

Anonymous
Anonymous

Add attachments
Cancel