Menu

GnuCOBOL in FreeDOS/MS-DOS ...

GnuCOBOL
2022-03-14
1 day ago
<< < 1 .. 7 8 9 10 11 .. 18 > >> (Page 9 of 18)
  • Simon Sobisch

    Simon Sobisch - 2023-01-02

    I guess "s" is source and "b" is binary. In any case you need one properly unzipped that provides devel3/include/libxml2; if it isn't there (at least for now) you may skip that altogether with --without2-xml.

     

    Last edit: Simon Sobisch 2023-01-03
  • Everaldo Bernardo Cunha

    Ok, Simon! I get to pass that first phase .... see the result in the log file! Now, how generate log file for "make" command? I'll await your future answer ...

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-03

      Note: I've miss-typed that, it would have been --without-xml2 (just fixed that above).
      For JSON: you may want to include that by:

      pushd libcob
      wget https://raw.githubusercontent.com/DaveGamble/cJSON/v1.7.15/cJSON.c
      wget https://raw.githubusercontent.com/DaveGamble/cJSON/v1.7.15/cJSON.h
      popd
      

      before running configure (and there may use --with-json=local to make this explicit).

      For make - just run it, to get a full "log" do

      make -k 2>&1 | tee make.log

       
  • Everaldo Bernardo Cunha

    Now, it doesn't work ... see the log file ...

    P.S.: I did the proceed you showed me ... the library is in the correct local ...

     

    Last edit: Everaldo Bernardo Cunha 2023-01-03
    • Simon Sobisch

      Simon Sobisch - 2023-01-03

      Hm, are you sure that cJSON.h is next to cJSON.c? In any case: for deactivating XML please switch --without-xml to--without-xml2.

       
  • Everaldo Bernardo Cunha

    Occur the same problem ... see the logs filies ...

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-03

      XML is now "correctly" disabled (no check done for it at all), the cJSON issue looks very strange ... so go back to --without-json...

      I'm awaiting make.log next :-)

       
  • Everaldo Bernardo Cunha

    Here the result ...

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-03

      OK, there is an issue with cobc/ccconv.h, that should be solved now when updating to a recent GC version; but this is only a warning, so you may want to leave updating to a more recent version until later.
      There is one "environment" issue, which is a "broken" libtool library /home/everaldo/HDDs/C/devel3/lib/libgmp.la which likely would work fine on FreeDOS, but doesn't work for cross-compiling. I'd suggest to rename that for now, then re-run configure and make (possibly with a newer tarball, the most recent from today is available here for 30 days).
      ... actually: using a newer tarball would be helpful for me to check on general cross-compile issues, so if you can use that, please give it a go.

       
  • Everaldo Bernardo Cunha

    Simon, I didn't understand! The link for you posted it hasn't the files how in the other cases ... I extract "tar.gz" and appear "usr" folder, how do I proceed then?

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-12

      Sorry, that link to the GnuCOBOL sources was wrong, here's the right one.

      (The link previously posted are binaries for x86_64 for use with Debian 11+ / Ubuntu 20.04+)

       
  • Everaldo Bernardo Cunha

    Here is the result ...

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-12

      We're coming near, everything builds... (one interesting warning shows that some date intrinsics won't work, so this should be investigated later; I think that some tests will fail because of that - in any case inspecting that warning allowed some minor improvement to intrinsic.c already, so thanks again :-)

      .... but again libiconv is taken as libtool library, instead of other means.
      Configure did found out that static linking already works:

      configure:20073: checking how to link with libiconv
      configure:20075: result: /home/everaldo/HDDs/C/devel3/lib/libiconv.a
      

      and the result is stored in LIBICONV, INTLLIBS, LIBINTL variables - but those are not used, instead LIBCOB_LIBS and PROGRAM_LIBScontain the ones from LTLIBINTL ( plain -liconv and -lintl which later uses the libtool library which only works within the FreeDOS environment, not for cross-compiling).

      A work around would be to temporarily rename /home/everaldo/HDDs/C/devel3/lib/libintl.la and /home/everaldo/HDDs/C/devel3/lib/libiconv.la, so they aren't found any more. Please give this a try - rename them; actually: just go to /home/everaldo/HDDs/C/devel3/lib, then rename libgmp.la back, then mkdir libtool && mv *.la libtool, then re-run configure and make as before.

      ... or use --with-xml2 xml2_config_found=no as I guess that this way libxml2 will be used, too.

       
  • Everaldo Bernardo Cunha

    Finally, we generate the EXE files!!!! In attachment the logs files ...

     

    Last edit: Everaldo Bernardo Cunha 2023-01-12
    • Simon Sobisch

      Simon Sobisch - 2023-01-13

      Congrats. Would you mind trying to enable XML2 the way outlined above?

      The next thing would be testing. We should be able to do this in the DOS environment by running bash there, do a cd gc32bui/tests then do make check (I expect it to start and fail until we adjust tests/atlocal and tests/atconfig - please upload those two and the output of cd gc32bui/tests && pwd [from the DOS environment] which should allow us to adjust those).

      ... and please share ls cobc/.libs bin/.libs libcob/.libs from the Debian side (I'm not sure on their contents).

       

      Last edit: Simon Sobisch 2023-01-13
  • Everaldo Bernardo Cunha

    I used the configuration indicate by you, but it now doesn't generate the EXE files ... in attachment the log file and the shell script ...

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-14

      OK, I've thought you had the xml dev package extracted, too, but that seems to be missing:

      checking libxml/xmlversion.h usability
      /usr/local/djgpp/bin/i586-pc-msdosdjgpp-gcc -c -Wno-attributes -I/home/everaldo/HDDs/C/devel3/include conftest.c >&5
      conftest.c:96:10: fatal error: libxml/xmlversion.h: No such file or directory
      

      You may retest any time after extracting the xml dev package; after that you'll have an /home/everaldo/HDDs/C/devel3/include/libxml/xmlversion.h file.

       
  • Everaldo Bernardo Cunha

    ... here the result from "cd gc32bui/tests" and "make check" in the file log. Below the result out for command line ls cobc/.libs bin/.libs libcob/.libs:

    everaldo@vostro-3681:~/HDDs/C/gc32bui$ ls cobc/.libs bin/.libs libcob/.libs
    bin/.libs:
    
    cobc/.libs:
    
    libcob/.libs:
    libcob.a  libcob.la  libcob.lai
    everaldo@vostro-3681:~/HDDs/C/gc32bui$ 
    
     
    • Simon Sobisch

      Simon Sobisch - 2023-01-14

      The testsuite.log says:

      cobc (GnuCOBOL) 3.2-dev.0
      Built     Dec 13 2022 17:43:24
      Packaged  Oct 08 2022 23:02:13 UTC
      

      So that's not the version you've just build. What does which cobc say in bash on FreeDOS? I guess there is possibly one other.

      But then... home/everaldo/HDDs/C/gc32bui/tests/testsuite.dir/at-groups/1/stderr doesn't look like you've started make check from within the FreeDOS environment, did you?

      What is the "root" directory C called in bash on FreeDOS?

       
  • Everaldo Bernardo Cunha

    Ok, Simon! I didn't execute the command line make check within of the FreeDOS, but I now did it ... see the log file ....

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-14

      The following should work better:

      cd your_gc32bui
      mkdir tstdos
      cd tstdos
      cp ../tests/at* .   # now modify those as below
      ../../gc32dev/testsuite || (rm -f testsuite.dir/at-job-fifo; exit 1)
      

      The necessary adjustments to atconfig: replace the Debian paths with the one reachable within bash from FreeDOS; atlocal - as follows (replace /C/devel3 by whatever matches bash within your FreeDOS path):

      -# TODO: add missing parts for installcheck
      -
      -if test "$GNUCOBOL_ENV_SETUP" != "1" -a "$GNUCOBOL_TEST_LOCAL" != "1"; then
      -   COBC="cobc"
      -   COBCRUN="cobcrun"
      -   COBCRUN_DIRECT="" # used for running created executables through tools
      -   # prepend PATH with the actual binaries to let the testsuite find them for
      -   # general check and version output, otherwise not needed
      -   PATH="${abs_top_builddir}/cobc:${abs_top_builddir}/bin:${PATH}"
      -   LOCAL_ENV="${abs_top_builddir}/pre-inst-env"
      -else
      -   if test "x${COBC}" = "x"; then
      -       COBC="cobc.exe"
      -   fi
      -   if test "x${COBCRUN}" = "x"; then
      -       COBCRUN="cobcrun.exe"
      -   fi
      -   if test "x${COBCRUN_DIRECT}" = "x"; then
      -       COBCRUN_DIRECT=""
      -   fi
      -   LOCAL_ENV=""
      -fi
      -
      -if test "$GNUCOBOL_TEST_LOCAL" != "1"; then
      -   ABS_COBC="${abs_top_builddir}/cobc/cobc.exe"
      -   ABS_COBCRUN="${abs_top_builddir}/bin/cobcrun.exe"
      -else
      -   ABS_COBC="$(which cobc)"
      -   ABS_COBCRUN="$(which cobcrun)"
      -fi
      +COBC="cobc.exe"
      +COBCRUN="cobcrun.exe"
      +COBCRUN_DIRECT="" # used for running created executables through tools
      +PATH="${abs_top_builddir}/cobc:${abs_top_builddir}/bin:${PATH}"
      +ABS_COBC="${abs_top_builddir}/cobc/cobc.exe"
      +ABS_COBCRUN="${abs_top_builddir}/bin/cobcrun.exe"
      -prefix="/home/everaldo/HDDs/C/devel3"
      +prefix="/C/devel3"
      -# get performance counters for compiler and/or runtime
      -if test "x$PERFSUFFIX" != "x"; then
      -  export PATH="${abs_top_builddir}/cobc/.libs:${abs_top_builddir}/bin.libs:${PATH}"
      -  LOG_DIR="${abs_builddir}/perf"
      -  LOG_DIR_COMP="${LOG_DIR}/cobc"
      -  LOG_DIR_RUN="${LOG_DIR}/cobcrun"
      -  PERF="perf stat -e instructions --append"
      -  #mkdir -p "${LOG_DIR_COMP}"
      -  # COBC="${PERF} --output ${LOG_DIR_COMP}/${PERFSUFFIX}.log ${COBC} -O0"   # note: full check including C compiler!
      -  # COMPILE_ONLY="${PERF} --output ${LOG_DIR_COMP}/${PERFSUFFIX}.log ${COMPILE_ONLY}"  # more reasonable - checks cobc only, but misses codegen
      -  # most reasonable: check actual COBOL runtime performance
      -  COBC="${COBC} -g"
      -  mkdir -p "${LOG_DIR_RUN}"
      -  COBCRUN="${PERF} --output ${LOG_DIR_RUN}/${PERFSUFFIX}.log ${COBCRUN}"
      -  COBCRUN_DIRECT="${PERF} --output ${LOG_DIR_RUN}/${PERFSUFFIX}.log ${COBCRUN_DIRECT}"
      -elif test "x$CGSUFFIX" != "x"; then
      -  export PATH="${abs_top_builddir}/cobc/.libs:${abs_top_builddir}/bin.libs:${PATH}"
      -  LOG_DIR="${abs_builddir}/callgrind/${CGSUFFIX}"
      -  LOG_DIR_COMP="${LOG_DIR}/cobc"
      -  LOG_DIR_RUN="${LOG_DIR}"
      -  CG="valgrind --tool=callgrind --dump-instr=yes --collect-jumps=yes --collect-atstart=no --toggle-collect=_start --fn-skip=_dl_runtime_resolve_xsave --fn-skip=_dl_fixup  --toggle-collect=cob_init"
      -  if test "x$at_group" = "x"; then
      -    at_group="cg"  # must be set as it is part of CG_PREFIX
      -  fi
      -  export at_group
      -  CG_PREFIX="%q{at_group}_%p"
      -  LOG_NAME=${CG_PREFIX}.log
      -  CG_NAME=callgrind.out.${CG_PREFIX}
      -
      -  # callgrind takes a while - so we only trace COBOL runtime by default
      -  #mkdir -p "${LOG_DIR_COMP}"
      -  #COBC="${CG} --log-file=${LOG_DIR_COMP}/${LOG_NAME} --callgrind-out-file=${LOG_DIR_COMP}/${CG_NAME} ${COBC}"
      -  COBC="${COBC} -g"
      -  mkdir -p "${LOG_DIR_RUN}"
      -  CG_RUNTIME="${CG} --log-file=${LOG_DIR_RUN}/${LOG_NAME} --callgrind-out-file=${LOG_DIR_RUN}/${CG_NAME} --dump-before=cob_terminate_routines"
      -  COBCRUN="${CG_RUNTIME} ${COBCRUN}"
      -  COBCRUN_DIRECT="${CG_RUNTIME} ${COBCRUN_DIRECT}"
      -fi
      +COB_CFLAGS="-I${abs_top_srcdir} -Wno-attributes -I/C/devel3/include -Wno-unused -fsigned-char -Wno-pointer-sign"
      +COB_LIBS="-L${abs_top_builddir}/libcob/.libs -L${exec_prefix}/lib -lcob"
      +COB_CONFIG_DIR="${abs_top_srcdir}/config"
      +COB_COPY_DIR="${abs_top_srcdir}/copy"
      +LD_LIBRARY_PATH="${abs_top_builddir}/libcob/.libs:$LD_LIBRARY_PATH"
      +PATH="${abs_top_builddir}/libcob/.libs:$PATH"
      +LIBPATH="${abs_top_builddir}/libcob/.libs:$LIBPATH"
      +COB_LIBRARY_PATH="${abs_top_builddir}/extras"
      +
      +export COB_CFLAGS COB_LIBS
      +export COB_CONFIG_DIR COB_COPY_DIR
      +export LD_LIBRARY_PATH PATH
      +export COB_LIBRARY_PATH
      
       

      Last edit: Simon Sobisch 2023-01-15
  • Everaldo Bernardo Cunha

    Well ... I configure the files conform you said me to do and the result was that ....

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-15

      That was still make check run from tests; please run ../../gc32dev/testsuite || (rm -f testsuite.dir/at-job-fifo; exit 1) from tstdos (from within FreeDOS).

       
  • Everaldo Bernardo Cunha

    The instruction doesn't see the file, because the same isn't with the complete name ... See the result of the command "ls" in the log file ...

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-16

      Yes, that was wrong, I've missed the subfolder... please run ../../gc32dev/tests/testsuite || (rm -f testsuite.dir/at-job-fifo; exit 1) from tstdos (from within FreeDOS).

      If the file and folder is still not reachable they may be "tilded" in this case adjust accordingly.

       
<< < 1 .. 7 8 9 10 11 .. 18 > >> (Page 9 of 18)

Log in to post a comment.