Menu

cobc: undefined symbol: cob_set_date_from_epoch

2024-05-11
2024-05-13
  • W. Burke Cabaniss

    I did many successful cobc complles 3 months ago. I have not reinstalled gnucobol. Today I get the subject error message from cobc while compiling a program that was successfully compiled previously. Search does not find reference to the symbol in Discussion. I know COBOL languages well, nothing of C and assembly. Please advise.

     
    • Mickey White

      Mickey White - 2024-05-12

      Hey Burke, not sure what you are asking, I have not seen cob_set_date_from_epoc in GnuCOBOL. I have posted some date routines, one is SecondsBetweenDateTIme and it might do what you want. Remember GMT when using the EPOC converter site.
      secsbdt2 - batch (executalbe) program that will return the number of seconds between two dates and times. ccyymmdd hhmmss ccyymmdd hhmmss
      The programs are in the contribution area:
      https://sourceforge.net/p/gnucobol/contrib/HEAD/tree/trunk/tools/DateRoutines

       
    • Simon Sobisch

      Simon Sobisch - 2024-05-12

      You have at least 2 (possibly partial) installations of GnuCOBOL. The runtime library used does not match the compiler.

      Check with

      cobc --version
      which cobc
      ldd $(which cobc)
      

      Then either get rid of the additional version/path entry or prefix LD_LIBRARY_PATH with the right one.

       
  • W. Burke Cabaniss

    Right! My PCLINUXOS package was/is 3.2.1 but a couple of months ago I tried to download and install the newer version from your library. There was only one purpose - my hope to get the ACCEPT ... CURSOR ... clause which you said was working. My compile failed with something I didn't understand and I just gave up to wait for a package update from PCLINUXOS. cobc never compiled. I didn't do any compiles in the two months - my programs worked fine except for the one COBOL feature. I like what I have. I did not realize I had messed up my compile libraries.

    To fix I have purged and re-installed the PCLINUXOS package and libraries (3.2.1) but I still get the same symbol error. I deleted /usr/lib64/gnucobol and tried again. I attach ldd $(which cobc). cobc --version gives the error but it must be 3.2.1. Can you tell me which library file names may be giving me the problem and how to fix it? I understand that ...epoch may only be the first of many such problems.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.