Re-linking the runtime to use Acu4GL for Informix on Linux fails

Re-linking the runtime to use Acu4GL for Informix on Linux fails

PROBLEM

When trying to re-link the runtime to use Acu4GL 10.2.1 for Informix on Linux, the following error occurs after executing ‘make –f Makefile.inf’ and the re-link fails:

/home/informix/lib/esql/checkapi.o: In function `ifx_checkAPI':
checkapi.c:(.text+0x0): multiple definition of `ifx_checkAPI'
/home/informix/lib/esql/checkapi.o:checkapi.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
Makefile.inf:251: recipe for target 'libruncbl64.so' failed
make: *** [libruncbl64.so] Error 1

 

SOLUTION

The following issues are fixed in AcuCOBOL-GT extend version 10.3.1 which is due for release later this year. Prior to that release, the following workarounds can be used.

In the ‘lib’ directory of the Acu installation locate the Makefile.inf that was created when ‘sh inf_inst’ was executed. Open Makefile.inf in a text editor and make the following changes:

On the line starting ‘FSI_LIBS = ‘ if there are 2 references to the file checkapi.o then remove the second reference and its path, for example:

Change it from this 

FSI_LIBS = -L/home/informix/lib -L/home/informix/lib/esql -L/home/informix/lib -L/home/informix/esql/lib -lifsql -lifasf -lifgen -lifos -lifgls -lpthread -lm -ldl -lcrypt /home/informix/lib/esql/checkapi.o -lifglx  /home/informix/lib/esql/checkapi.o -lnsl $(EXTFH_LIB) $(ACU_LIBDIR)/libexpat.a

to this

FSI_LIBS = -L/home/informix/lib -L/home/informix/lib/esql -L/home/informix/lib -L/home/informix/esql/lib -lifsql -lifasf -lifgen -lifos -lifgls -lpthread -lm -ldl -lcrypt /home/informix/lib/esql/checkapi.o -lifglx  -lnsl $(EXTFH_LIB) $(ACU_LIBDIR)/libexpat.a

Save and close Makefie.inf

Now running ‘make –f Makefile.inf’ should work.

13-02-20-MT-314.gif

In AcuCOBOL-GT extend version 10.3.0 the following error may also occur after trying to re-link the runtime after executing ‘make –f Makefile.inf’:

/home/informix/lib/esql/checkapi.o: In function `ifx_checkAPI':
checkapi.c:(.text+0x0): multiple definition of `ifx_checkAPI'
/home/informix/lib/esql/checkapi.o:checkapi.c:(.text+0x0): first defined here
inf7364.o: In function `acu_ifx_write':
inf7364.c:(.text+0x34fb): undefined reference to `A4clear_string'
inf7364.o: In function `acu_ifx_make':
inf7364.c:(.text+0x3d5c): undefined reference to `A4clear_string'
inf7364.c:(.text+0x4001): undefined reference to `A4clear_string'
inf7364.c:(.text+0x402c): undefined reference to `A4clear_string'
inf7364.c:(.text+0x44d3): undefined reference to `A4clear_string'
inf7364.o:inf7364.c:(.text+0x47ce): more undefined references to `A4clear_string' follow
collect2: error: ld returned 1 exit status
Makefile.inf:253: recipe for target 'libruncbl64.so' failed
make: *** [libruncbl64.so] Error 1

To fix this error first create a file called inffix1030.c with the following content:

extern void AStringClear(unsigned s);
void A4clear_string(unsigned s)
{
    AStringClear(s);
}

Save this file in the lib directory of AcuCOBOL-GT extend 10.3.0

Open Makefile.inf in a text editor and make the following changes:

On the line starting ‘FSI_SUBS = ’ add the name of the .c file created in the previous step, for example:

FSI_SUBS = inf7364.o infemb7364.o cur.o inffix1030.c

Save and close Makefie.inf

Now running ‘make –f Makefile.inf’ should work.

13-02-20-MT-317.gif

Labels (3)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
4 of 4
Last update:
‎2020-02-14 14:44
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.