Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Getting Perl module DBD::Informix off the ground

    Posted 15 days ago

    I will likely post this on the mailing list dbi-users@perl.org but at this time I don't know if that list still being supported. So I post here first, for that rarified special group of DBD::Informix users.

    I got my management to allow me to download DBD::Informix on one of our hosts.  (A Perl programmer in a non-Perl shop.)  I got DBI installed w nor problem. On this server we have:

    • This is perl 5, version 40, subversion 1 (v5.40.1) built for sun4-solaris-64
    • IBM Informix CSDK Version 4.50, IBM Informix-ESQL Version 4.50.FC12W1

    Informix 12.10, but that does not get a chance to come into play here.

    I get past the Makefile.PL and make stages.  However, the "make test" seems to fail every blessed test Jonathan devised.  Rather than attach the whole blessed barrage of error messages I would include only the first error, enough of a ramble on its own.

    $ make test
    "/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Informix.bs blib/arch/auto/DBD/Informix/Informix.bs 644
    PERL_DL_NONLAZY=1 "/usr/local/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/t00basic.t t/t01stproc.t t/t02ixtype.t t/t05dbase.t t/t07dblist.t t/t08fork.t t/t09date.t t/t10sqlca.t t/t12bindval.t t/t13bindref.t t/t14bindcol.t t/t15bindtyp.t t/t20error.t t/t21mconn.t t/t22mconn.t t/t23mconn.t t/t24mcurs.t t/t25dratt.t t/t28dtlit.t t/t29update.t t/t30update.t t/t31nulls.t t/t32nulls.t t/t33holdcurs.t t/t35cursor.t t/t40rows.t t/t41txacoff.t t/t42txacon.t t/t43trans.t t/t44txansi.t t/t46chpblk.t t/t50update.t t/t51getinfo.t t/t53types.t t/t54native.t t/t55mdata.t t/t56tabinfo.t t/t57tables.t t/t58typeinfoall.t t/t60unlog.t t/t61varchar.t t/t65updcur.t t/t66insert.t t/t72blob.t t/t73blobupd.t t/t74blob.t t/t75blob.t t/t76blob.t t/t77varchar.t t/t78varchar.t t/t90ius.t t/t91udts.t t/t92rows.t t/t93lvarchar.t t/t94bool.t t/t95int8.t t/t96bigint.t t/t98pod.t t/t99clean.t
    t/t00basic.t ........ install_driver(Informix) failed: Can't load '/users/jsalomon/Download/DBD-Informix-2018.1031/blib/arch/auto/DBD/Informix/Informix.so' for module DBD::Informix: ld.so.1: perl: fatal: relocation error: file /users/jsalomon/Download/DBD-Informix-2018.1031/blib/arch/auto/DBD/Informix/Informix.so: symbol MIN: referenced symbol not found at /usr/local/lib/perl5/5.40.1/sun4-solaris-64/DynaLoader.pm line 206.
    Compilation failed in require at (eval 5) line 3.
    Perhaps a required shared library or dll isn't installed where expected
     at /users/jsalomon/Download/DBD-Informix-2018.1031/blib/lib/DBD/Informix/TestHarness.pm line 190.
                                t/t00basic.t ........ Dubious, test returned 2 (wstat 512, 0x200)
    Failed 41/41 subtests

    Let's start with that one. Note that I underlined the gist of the problem: It can't load Infomrix.so, although I was able to find it without a problem.  But the problem is not failure to find it; note the "fatal: relocation error" owing to a missing symbol: "MIN".

    If I were missing some obscure module I'm sure the "make" would have failed.

    It is my experience that, usually, the first error message is the driver of the remaining errors.  Can someone help me track down and fix this stupid error?

    Thank y'all for help here.

    -- Jacob S



    ------------------------------
    +-----------------------------------------------------------+
    | I am pleased to report that I had no problems today. |
    | I had only issues, opportunities, challenges and valuable |
    | learning experiences. |
    +------------------------------------------ Jacob S --------+
    ------------------------------


  • 2.  RE: Getting Perl module DBD::Informix off the ground

    Posted 15 days ago
    obvious questions ....

    What is the exact OS?
    And the environment passing all the OS pre-requisites ?

    Cheers
    Paul

    On 7/28/2025 5:17 PM, Jacob Salomon via IBM TechXchange Community wrote:
    01000198531cbd53-9b4ae08f-0058-419b-b12e-2f1ec344114b-000000@email.amazonses.com">
    I will likely post this on the mailing list dbi-users@perl.org but at this time I don't know if that list still being supported. So I post here...





  • 3.  RE: Getting Perl module DBD::Informix off the ground

    Posted 15 days ago

    WOW! Paul, that was quick!  Thanks for responding so fast.  In any case: 

    $ uname -a
    SunOS dc1-ifxprod2 5.11 11.3 sun4v sparc sun4v

    That said: I would think if some OS prerequisite were missing, either the makefile.PL or the make would have barfed. To my hopeful eyes this looks like a simple oversight calling for a second pair of eyes. A missing function or undeclared variable.

    I just did a grep on all .c and .ec source files: One mention of "MIN"

    $ grep MIN *.c *.ec

    . . .
    dbdimp.ec:        sql_len = MIN(msgsiz-1, sql_len);
    dbdimp.ec:        isamlen = MIN(msgsiz-sql_len-1, isamlen);
    . . .

    Two "MIN" references found in this same source file.  And it looks more like a #DEFINEd macro than a function reference.  Of the 20 or so .h files in this directory, none of then seem to have a MIN macro defined. Where should it be defined and how is it being missed?

    WHEW!  And I thought this going to be a short response. :-(

    -- Jacob S




  • 4.  RE: Getting Perl module DBD::Informix off the ground

    Posted 15 days ago

    Hi Jacob,

    grep MIN *.h ?

    And how about adding this to the top of this dbdimp.ec, if only to prove this is your only problem and to get you "off the ground":

    #define MIN(a,b) ((a) < (b) ? (a) : (b))

    BR,
     Andreas



    ------------------------------
    Andreas Legner
    Informix Dev
    HCL Software
    ------------------------------



  • 5.  RE: Getting Perl module DBD::Informix off the ground

    Posted 15 days ago
    AFAIK the default MIN should be in sys/param.h  ....

    On 7/29/2025 7:33 AM, Andreas Legner via IBM TechXchange Community wrote:
    01000198562cbbcb-bf506b36-89fd-4612-9507-22ad1d8845e0-000000@email.amazonses.com">
    Hi Jacob, grep MIN *.h ? And how about adding this to the top of this dbdimp.ec, if only to prove this is your only problem and to get you ... -posted to the "Informix" group





  • 6.  RE: Getting Perl module DBD::Informix off the ground

    Posted 14 days ago
      |   view attached

    Paul and Andreas,

    I would have preferred to use an include file that came with the compiler but sys/param.h does not have the MIN macro. Hence I tried Andreas's ide and insert the vanilla MIN macro in there.

    Yup! That indeed got be off the ground. All is not perfect, however,  This time the output is only 100 lines, very few of which are error messages, so I am uploading make-test.out.  That said, I am not sitting idle and letting the family do my work; I will be looking at the .t files to see where the problems hit.  For example:

    t/t05dbase.t ........ DBD::Informix::db do failed: SQL: -330: Cannot create or rename the database.

    There is a stores database owned by informix as well as a stores7 database owned by std99. (Who dat?)  However, I am running this make test as user jsalomon. Could that be the reason for that error message?

    I will be following up on this.  At this point I am  man obsessed! (Picture Captain Kirk and the vampire cloud. :-))

    Thanks for the kick-start, Andreas.

    -- Jacob S



    ------------------------------
    +-----------------------------------------------------------+
    | I am pleased to report that I had no problems today. |
    | I had only issues, opportunities, challenges and valuable |
    | learning experiences. |
    +------------------------------------------ Jacob S --------+
    ------------------------------

    Attachment(s)

    out
    make-test.out   10 KB 1 version


  • 7.  RE: Getting Perl module DBD::Informix off the ground

    Posted 14 days ago

    Well, Folks.

    I saw that as jsalomon I will run into permission issues. So I sudo'd to informix.  There I tried to restart the process form scratch. But it could not pass the first step, perl Makefile.PL. Then I had the brain-f**t: I sudo'd to informix, went to my jsalomon download directory and did the make test from there.

    All tests successful.

    Well, that was pleasing to my eye! And it was branded a success despite this error message:

    t/t91udts.t ......... DBD::Informix::st fetchall_arrayref failed: SQL: -13: Permission denied at t/t91udts.t line 167.

    The offending statement at that line is:

    my ($results) = $sth->fetchall_arrayref

    Why that should have failed is an interesting question. However, permissions aside, there was no syntax error on that one so I suppose it's still a success.  (Like that perfect essay you did in English class to support a totally erroneous proposal.)

    I'll let y'all know if the make install works out OK. I gotta beg a sysadmin to do that as root.

    Again, thanks for the kick-start. I will detach my jumper cables now. (Can't find a decent Frankenstein emoji.)

    -- Jacob S



    ------------------------------
    +-----------------------------------------------------------+
    | I am pleased to report that I had no problems today. |
    | I had only issues, opportunities, challenges and valuable |
    | learning experiences. |
    +------------------------------------------ Jacob S --------+
    ------------------------------



  • 8.  RE: Getting Perl module DBD::Informix off the ground

    Posted 14 days ago
    Hi Jacob,

    I don't think I have ever seen -13 so I checked what it is

    finderr -13
    -13 Permission denied.

    An operating-system error code with the meaning shown was unexpectedly
    returned to the database server. This error code usually follows an
    attempt to execute a file that is not a program or shell script; it
    might reflect an error in a REPORT TO specification in a report. Look
    for other operating-system error messages that might give more
    information.

    I expect it’s an artefact of running code owned by you as informix and it doesn't have permission to overwrite a file.

    Regards,


    Clive Eisen




  • 9.  RE: Getting Perl module DBD::Informix off the ground

    Posted 13 days ago

    Thanks, Clive.

    That is indeed a relief (assuming you are correct).

    That aside, I am happy to report that the make install also went w/o a hitch. I have yet to exercise it but I do see that, since I am not "intalling" my modules, just keeping them in the same directory as my scripts, I need to edit my old scripts to use Find::Bin.  Minor inconvenience that I should have done in the first place when I wrote them.  (But then I had control over PERL5LIB.)

    I suppose I should report this to Jonathan's mailing list.

    -- Jacob S



    ------------------------------
    +-----------------------------------------------------------+
    | I am pleased to report that I had no problems today. |
    | I had only issues, opportunities, challenges and valuable |
    | learning experiences. |
    +------------------------------------------ Jacob S --------+
    ------------------------------