Re: HPUX: Unsat. reference 'finite' with CSDK 2.70
Posted in 2005
Jonathan Leffler <jleffler@earthlink.net> wrote in news:qRN0e.3415$gI5.540@newsread1.news.pas.earthlink.net: > Andreas S wrote: >> we have a HPUX 11.11 system with database 7.23 >> When trying to build the Perl module DBD-Informix or >> when compiling/linking our own ESQL/C applications the >> loader fails with the errormessage: Unsatisfied external reference >> 'finite'. We are using Client SDK 2.70 in a 32bit environment. >> Any idea how to satisfy the loader? > > Well, the database version 7.23 does not inspire confidence. If > that's IDS, you aren't Y2K-compliant - and you need to worry about > that. If it's SE, you also aren't Y2K-compliant but it is less risky. > > Which version of HP-UX was CSDK 2.70 built on/for? > > The most likely cause of wanting 'finite' is in a math library - > finite as opposed to infinite or NaN (not a number). However, without > knowing where it comes from, it is hard to know what to do about it. > FWIW: POSIX has an isfinite() function - not the same name. > > You can decide to wing it - or not. > > void finite(void) { abort(); } > > Add the object file derived from that code to your link and see > whether you get nasty crashes. If you do, it was the wrong solution. > If you don't, you may be safe until someone finds a way to tickle your > code into calling finite() after all. > > The best solution is to get the correct version of CSDK for your > platform. > The CSDK was built for HP-UX 10.20 and has been installed on HP-UX 11.11. The missing function finite() is called from an Informix library and I found it neither in 10.20- nor in 11.11-systemlibraries. I tried your hint to create a dummy function for finite(), but now the shared library loader complaints about another missing funtion. A test program with ESQL functions originally produced the following error message: # make making all in ./src... if [ -f infxtest ]; then rm -f infxtest~; mv -f infxtest infxtest~; fi cc -o infxtest -g -Aa +DAportable -Wl,-aarchive_shared -L /opt/informix/lib/esql -L/opt/informix/lib infxtest.o libDB.a -lsql -los -lasf -lgen -lixgen -lixgls -lixglx -lixos -lixsql -lxti -lm -ldld -lsec /usr/ccs/bin/ld: Unsatisfied symbols: finite (first referenced in /opt/informix/lib/esql/libgen.a (rvaldata.o)) (code) *** Error exit code 1 With your proposed dummy function the test program compiles, links and runs without problems. My next step was to install the DBD-Informix PERL module. With shared libraries the module compiles fine, but 'make test' produces the error: PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/t00basic.t t/t01stproc.t ... t/t00basic........../usr/lib/dld.sl: Unresolved symbol: finite (code) from /opt/informix/lib/esql/libifgen.sl install_driver(Informix) failed: Can't load '/home/ascapp/DBD-Informix- 2003.04/blib/arch/auto/DBD/Informix/Informix.sl' for module DBD::Informix: No such file or directory at /opt/perl5/lib/5.8.6/PA- RISC2.0-thread-multi/DynaLoader.pm line 230. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at /home/ascapp/DBD-Informix- 2003.04/blib/lib/DBD/Informix/TestHarness.pm line 183 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-41 for all tests. With your dummy function for finite the errormessage is now: PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/t00basic.t t/t01stproc.t ... t/t00basic........../usr/lib/dld.sl: Unresolved symbol: fpclassify (code) from /opt/informix/lib/esql/libifgls.sl install_driver(Informix) failed: Can't load '/home/ascapp/DBD-Informix- 2003.04/blib/arch/auto/DBD/Informix/Informix.sl' for module DBD::Informix: Unresolved external at /opt/perl5/lib/5.8.6/PA-RISC2.0- thread-multi/DynaLoader.pm line 230. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at /home/ascapp/DBD-Informix- 2003.04/blib/lib/DBD/Informix/TestHarness.pm line 183 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-41 Unfortunately it is no option for us to use a 64bit CSDK (Perl is running as 32bit application, and we really don't want to know which modules will fail when using 64bit mode) Thanks a lot for your help. Andreas