Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
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.ato 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.aSave and close Makefie.inf
Now running ‘make –f Makefile.inf’ should work.
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 1To 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.cSave and close Makefie.inf
Now running ‘make –f Makefile.inf’ should work.