> On 10/06/2024 20:12 +07 Simon Sobisch <simonsobisch@xxxxxx> wrote: > > > Am 10.06.2024 um 13:30 schrieb Colin Sare-Soar: > > Hello All, > > I'm a new user of GnuCobol - well, I hope to be if I can get it working. > > Hi and welcome to GnuCOBOL :-) > > > The main problem is the library versions of libgmp. > > I first downloaded and extracted GnuCOBOL-3.2 and ran ../configure from > > the build directory. This failed due to missing libgmp. > > The "common" way in nearly all environments is to install the matching > package. > From DEPENDENCIES: > > ----------------------------------------------------------------------- > These packages provide **compile-time** and **run-time** support. That > is, they include C header files that are used during GnuCOBOL's C > compilation phase, and dynamic libraries linked either to `libcob`, or > to the compiled binary (the compiled version of your COBOL program). > Packaging systems, particularly on Linux, sometimes include only the > run-time components in the main package, and split the compile-time > pieces off to a "development" package. > > You need both. Header files are required for compilation, and libraries > for run-time support. > > If your operating system includes a package management system, we > suggest you use it, rather than building the dependencies from source, > unless you have specific needs. > ----------------------------------------------------------------------- Yes, I have apt but it doesn't find GnuCOBOL or GMP. > > For a common way to do this, see > https://sourceforge.net/p/gnucobol/discussion/help/thread/7c6b048b95/ > > This also lists the way to install a bunch of optional dependencies. I will try here > > > But of course building dependencies from scratch is also fine and can > have additional benefits like newer versions and (in case of GMP) > tweaking to your local machine for best performance. > > > I d/l GMP and tried to compile that. I ran configure, successfully and > > then built it successfully but when I tried to run the tests (make > > check) that failed 6 out of 8 tests all for the same reason, the wrong > > header version. > > This seems to be more appropriate to send to the GMP mailing list > "gmp-discuss" (https://gmplib.org/#MAILINGLISTS) and likely has an > answer in its archive. Already sent to the GMP bug list > > > Here is an extract from test-suite.log: > > ======================================== > > GNU MP 6.3.0: tests/test-suite.log > > ======================================== > > # TOTAL: 8 > > # PASS: 2 > > # SKIP: 0 > > # XFAIL: 0 > > # FAIL: 6 > > # XPASS: 0 > > # ERROR: 0 > > .. contents:: :depth: 2 > > FAIL: t-bswap > > ============= > > tests are not linked to the newly compiled library > > local version is: 6.3.0 > > linked version is: 6.2.1 > > FAIL t-bswap (exit status: 134) > > ... for example > https://gmplib.org/list-archives/gmp-discuss/2018-April/006227.html > found via > https://duckduckgo.com/?q=local+version+site%3Ahttps%3A%2F%2Fgmplib.org%2Flist-archives%2Fgmp-discuss%2F&ia=web > > Note: this normally should NOT happen when running the tests, so you > possibly want to check with the mailing list why it does. But as you've > installed this the question still arises independently with GnuCOBOL. > > > Nevertheless, the library did compile without any error messages. > > Then I tried to configure GnuCOBOL-3.2 again and got this message: > > configure:16179: result: no (header: 6.3 / library: 6.2.1) > > configure:16181: error: in `/home/colins2/GnuCOBOL-src/gnucobol-3.2/build': > > configure:16183: error: unable to use GMP > > See `config.log' for more details (This extract is from config.log) > > The answer from the mailing list is one of the possible answers: > > > What it most likely means is that you installed GMP in /usr/local, > but that GMP is also installed somewhere else by the system. > > The solution is typically to make sure that LD_LIBRARY_PATH includes > /usr/local/lib. This will ensure that you get the version of GMP > that you are expecting. My system does include /usr/local/lib as I have built various things with imported, compiled libraries, GL. Vulkan, FLTK etc. > > But that was about the "runtime" part - you have this mismatch the other > way around. To fix this with a default install path of /usr/local/lib > (not sure where you've installed GMP to) is possibly to additionally > pass LDFLAGS="-Wl,-rpath,/usr/local/lib -L/usr/local/lib" to the > configure command line (the header is already 6.3 so you've likely set > -I /usr/local/include already). GMP is installed to usr/local/lib > > > I have used COBOL on the past and actually did a course on it in '85 or > > so. I had MF COBOL on CP/M and RM COBOL on DOS and had many headaches > > getting my working code accepted on the college's MS COBOL platform! I > > did write some applications for myself but sadly no longer have the > > source code to reference. > > I hope someone can help with the above problem as I can't get anywhere > > just now. Both GnuCOBOL and GMP were downloaded today so should be the > > latest versions available. I'm on Linux Mint 21.3 on an HP Z420 > > workstation using GCC 11.4.0, so nothing very strange or exotic. > > To help (for both the GnuCOBOL configure and the GMP test issue) it is > useful to provide config.log of the matching system. > So if you still have issues after using the rpath option please attach > that as well. > And if not: please drop a short feedback after your successful install :-) > > > Thanks > > Colin > > Welcome again, > Simon Thanks Simon. I will try the above suggestions.