Hello chaps,
Installed gnucobol 3.2 on a laptop running Ubuntu 20.04. Downloaded the tar file and expanded it into a folder gnucoobol-3.2 and ran the following:
cd gnucobol-3.2
sudo apt install libdb5.3-dev
sudo ldconfig
./configure --prefix=/usr
make 1>mymake.log 2>&1
make check
make test 1>mytest.log 2>&1
sudo ldconfig
sudo make install 1>myinstall.log 2>&1
Then ran cobc --V and got error - cobc: symbol lookup error: cobc: undefined symbol: cob_set_date_from_epoch.
Log files have been attached. Can you help me please?
Thanks,
Iain
note: instead of "myconfig.log" you could have uploaded "config,log" which is created by configure itself (or tests/testsuite.log which includes that and would drop the need to upload mycheck.log)
It seems that you got the "right" cobc (you can ensure that with
which cobc), but the wrong libcob, picking up an older version (likely in/usr/local/lib) from a previous install as you have its path inLD_LIBRARY_PATH.See
ldd $(which cobc).If you want to get around this issue (older libcob in a LD_LIBRARY_PATH which is picked up) you could re-run the configure, specifying
-Wl,rpath=/usr/lib, but as the GC 3.2 libcob is backward compatible down to GnuCOBOL 2.2 this is likely not necessary and you may just delete/rename that "bad libcob" (best by runningmake uninstallfrom the old installation to also cleanup the other paths under /use/local [or wherever that was installed and is picked up from]).Hello Simon,
Thanks for replying so quickly. I have run "make uninstall" and "make distclean" then removed the previous version of gnucobol to ensure my system is clean.
A fresh install of v3.2 without any directives have worked OK thanks. Now using version 3.2, so I'm happy now.
Many thanks,
Iain