CC: check the presence of functions and system #include - VMS

This is a discussion on CC: check the presence of functions and system #include - VMS ; hello, in order to compile a project under various versions of CRTL, I would like to be able to check by script the presence/absence of some function in the CRTL to automatically create a 'good' config.h I would also like ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: CC: check the presence of functions and system #include

  1. CC: check the presence of functions and system #include

    hello,

    in order to compile a project under various versions of CRTL, I would
    like to be able to check by script the presence/absence of some
    function in the CRTL to automatically create a 'good' config.h

    I would also like to be able to automatically check the presence/
    absence of system #include. for this I think that something like:

    $ pipe lib/text/lis sys$library:decc$rtldefs | search sys$pipe name of the include>

    will do the trick.

    any idea regarding the check of the functions ?

    TIA,
    Pierre.


  2. Re: CC: check the presence of functions and system #include

    Pierre wrote:
    > hello,
    >
    > in order to compile a project under various versions of CRTL, I would
    > like to be able to check by script the presence/absence of some
    > function in the CRTL to automatically create a 'good' config.h
    >
    > I would also like to be able to automatically check the presence/
    > absence of system #include. for this I think that something like:
    >
    > $ pipe lib/text/lis sys$library:decc$rtldefs | search sys$pipe > name of the include>
    >
    > will do the trick.
    >
    > any idea regarding the check of the functions ?


    Somewhere I have a DCL script that will read the config.h.in file and
    then search for all the symbols. I even have an IA64 variant of it.

    To find the functions, you need to search the shared libraries.

    And depending on what you are looking for, you have to search the X11,
    LDAP, Kerberos, and OpenSSL images also. And there may be some that I
    forgot.

    I had to put a lot of special cases in it.

    I have not used it since GNV can now process most configure scripts.

    See the GNV directory at ftp.encompasserve.org for some examples of how
    to use it. Binaries for updating ALPHA VMS 8.2 to the new functionality
    are present.

    -John
    wb8tyw@qsl.network
    Personal Opinion Only

  3. Re: CC: check the presence of functions and system #include

    On Aug 1, 3:09 am, "John E. Malmberg" wrote:
    > Pierre wrote:
    > > hello,

    >
    > > in order to compile a project under various versions of CRTL, I would
    > > like to be able to check by script the presence/absence of some
    > > function in the CRTL to automatically create a 'good' config.h

    >
    > > I would also like to be able to automatically check the presence/
    > > absence of system #include. for this I think that something like:

    >
    > > $ pipe lib/text/lis sys$library:decc$rtldefs | search sys$pipe > > name of the include>

    >
    > > will do the trick.

    >
    > > any idea regarding the check of the functions ?

    >
    > Somewhere I have a DCL script that will read the config.h.in file and
    > then search for all the symbols. I even have an IA64 variant of it.
    >
    > To find the functions, you need to search the shared libraries.
    >
    > And depending on what you are looking for, you have to search the X11,
    > LDAP, Kerberos, and OpenSSL images also. And there may be some that I
    > forgot.
    >
    > I had to put a lot of special cases in it.
    >
    > I have not used it since GNV can now process most configure scripts.
    >
    > See the GNV directory at ftp.encompasserve.org for some examples of how
    > to use it. Binaries for updating ALPHA VMS 8.2 to the new functionality
    > are present.
    >
    > -John
    > wb8...@qsl.network
    > Personal Opinion Only


    I tryied to use GNV + ./configure on the libxml2 configure but got
    those errors:

    bash$ ./configure
    %DCL-W-PARMDEL, invalid parameter delimiter - check use of special
    characters
    \.SH\
    %DCL-W-IVVERB, unrecognized command verb - check validity and spelling
    \HOSTINFO\
    checking build system type...
    %DCL-W-IVVERB, unrecognized command verb - check validity and spelling
    \MKTEMP\
    %DCL-E-NOTFR, no transfer address
    %DCL-W-IVVERB, unrecognized command verb - check validity and spelling
    \HOSTINFO\
    config.sub: too many arguments
    Try `config.sub --help' for more information.
    configure: error: /bin/sh ./config.sub
    %CC-W-EMPTYFILE, Source file does not contain any declarations.
    %ILINK-W-COMPWARN, compilation warnings
    module: DUMMY
    file: SYS$SYSDEVICE:[LIBSRC.LIBXML2-2_6_29]dummy.o;3
    %ILINK-W-USRTFR, image SYS$SYSDEVICE:[SYSTEM.cg20166-26795]dummy.;1
    has no user transfer address failed

    did I missed something ?

    TIA
    Pierre.


  4. Re: CC: check the presence of functions and system #include

    Pierre wrote:

    > in order to compile a project under various versions of CRTL, I would
    > like to be able to check by script the presence/absence of some
    > function in the CRTL to automatically create a 'good' config.h
    >
    > I would also like to be able to automatically check the presence/
    > absence of system #include. for this I think that something like:
    >
    > $ pipe lib/text/lis sys$library:decc$rtldefs | search sys$pipe > name of the include>
    >
    > will do the trick.
    >
    > any idea regarding the check of the functions ?


    [Later responses indicate this is libxml2 2.6.29.]

    Which C function(s) and which include and which OpenVMS release(s)?

    The way HP traditionally snagged the RTL information was via
    conditional compilation and the C RTL version string. I've not seen
    much of anything needed in the system services or such for libxml2, but
    there is also a VMS version pre-processor define. From these, you
    generally end up assembling a set of nested conditionals. Which is
    ugly. Alternatively, you assemble the code for the oldest routine, and
    jacket the conditionals in a separate module -- often vms.c -- and
    conditionalize that. When working here, one of the most useful C
    features is the CC /FIRST_INCLUDE mechanism. From that, you can insert
    an include into the compilation to override missing C functions off into
    those in your vms.c module, and other similar functions. (Do not use
    the same symbol or function name as a standard C function! Please!
    Have your own redefinition of mumblefratz over to mumblefratz_vms.)

    I'd tend to start with the existing port of libxml2 against 2.6.24
    and then apply the changes against 2.6.29 using a comparison tool such
    as
    http://h71000.www7.hp.com/freeware/f...irectories.com
    There is a build procedure included in the procedure, and it does for
    OpenVMS what autoconf and the configure script does for Linux. (It's
    also a whole lot simpler, but then it's also highly platform-tailored.)

    The autoconf tool and configure scripts are evil and non-portable
    constructs, and largely intended to (mostly, some hand-editing seems
    inevitably required) work only on Linux and close-to-Linux environments.

    Current GNV gets you most of the way there and John and others have
    done Yeoman work, but there are still basic design flaws in the whole
    approach used by autoconf; it's a front-end preprocessor onto a shell,
    rather than a build engine.

    When posting a question, details such as package (here libxml2
    2.6.29, apparently) and OpenVMS version(s) and compiler version(s) can
    be of central interest. Further, proposed solutions are useful
    details, but so is the background on the problem. This isn't intended
    to be rude, this is to get you an answer best tailored to your
    particular question and your situation.

    I'm semi-inclined to re-port libxml2, but my schedule for that
    project probably isn't the same as yours. (If you're in a sufficient
    hurry, I can be bribed.)


    --
    www.HoffmanLabs.com
    Services for OpenVMS

  5. Re: CC: check the presence of functions and system #include

    Pierre wrote:
    >
    > I tryied to use GNV + ./configure on the libxml2 configure but got
    > those errors:
    >
    > bash$ ./configure
    > %DCL-W-PARMDEL, invalid parameter delimiter - check use of special
    > characters
    > \.SH\
    >
    > did I missed something ?


    Yes. Please get the kits from ftp.encompasserve.org in the gnv
    directory and extract the source kits and readme files from them.

    GNV Bash has a broken DCL fallback setting that is on by default, and
    that prevents it from processing many real UNIX scripts.

    The DCL fallback is only supposed to kick in if it can not find a image
    to execute, but is instead kicking in at other times.

    There are other dragons present, so I would strongly recommend that you
    start with something like pkg-config and look it over.

    -John
    wb8tyw@qsl.network
    Personal Opinion Only

  6. Re: CC: check the presence of functions and system #include

    On Aug 1, 3:05 pm, Stephen Hoffman
    wrote:
    > Pierre wrote:


    > [Later responses indicate this is libxml2 2.6.29.]
    >
    > Which C function(s) and which include and which OpenVMS release(s)?


    OpenVMS 8.3 on Itanium (__VMS_VER=80300022, __ia64=1, __ia64__=1,
    __CRTL_VER=80300000)
    HP C V7.2 (__DECC_VER=70290001)

    libxml2 2.6.29
    libxslt 1.1.21
    xmlstarlet 1.0.1

    any function/include that have a HAVE_ in the
    config_h.in

    I have no problem to rebuilt these 3 products. I found all needed
    information in $ HELP CRTL
    but as I have many versions of OpenVMS (from 7.2-1 to 8.3) running
    various harware (Itanium, AXP) I was trying to have a config.sys that
    allows me to compile on any of these environments. and on success,
    give it for the freeware CD.

    I found valuable informations in $ HELP CRTL Version-Dependency_Tables
    but this help only gives the OpenVMS version into which the function
    appears, not the __CRTL_VER value to check against.

    [...]

    > When posting a question, details such as package (here libxml2
    > 2.6.29, apparently) and OpenVMS version(s) and compiler version(s) can
    > be of central interest. Further, proposed solutions are useful
    > details, but so is the background on the problem. This isn't intended
    > to be rude, this is to get you an answer best tailored to your
    > particular question and your situation.


    the question was was general as the answer may apply to any un*x tool,
    not only the one I'm currently working on

    > I'm semi-inclined to re-port libxml2, but my schedule for that
    > project probably isn't the same as yours. (If you're in a sufficient
    > hurry, I can be bribed.)


    I re-built these tools starting from the official .tar.gz as I forgot
    to cheked the freeware CD
    do the freeware CD versions have many differences ?

    TIA
    Pierre.


  7. Re: CC: check the presence of functions and system #include

    On Aug 1, 3:49 pm, "John E. Malmberg" wrote:
    > Pierre wrote:
    >
    > > I tryied to use GNV + ./configure on the libxml2 configure but got
    > > those errors:

    >
    > > bash$ ./configure
    > > %DCL-W-PARMDEL, invalid parameter delimiter - check use of special
    > > characters
    > > \.SH\

    >
    > > did I missed something ?

    >
    > Yes. Please get the kits from ftp.encompasserve.org in the gnv
    > directory and extract the source kits and readme files from them.
    >
    > GNV Bash has a broken DCL fallback setting that is on by default, and
    > that prevents it from processing many real UNIX scripts.
    >
    > The DCL fallback is only supposed to kick in if it can not find a image
    > to execute, but is instead kicking in at other times.
    >
    > There are other dragons present, so I would strongly recommend that you
    > start with something like pkg-config and look it over.


    how do I extract things from pcsi compressed files ?

    Pierre


  8. Re: CC: check the presence of functions and system #include

    In article <1185978254.810348.56090@g4g2000hsf.googlegroups.co m>, Pierre writes:
    >how do I extract things from pcsi compressed files ?


    with PRODUCT just as with the pcsi uncompressed files ;-)


    Now serious:

    To extract the release notes (only if the kits contains some)

    $ PRODUCT EXTRACT RELEASE_NOTES product [/FILE=dirspec] [/qualifier]

    To extract a single file

    $ PRODUCT EXTRACT FILE product /SELECT=filespec [/DEST=dirspec] [/qualifier]

    To unpack a .PCSI$COMPRESSED file (into a directory tree)

    $ PRODUCT COPY product /DEST=dirspec /FORMAT=REFERENCE [/qualifier]

    To convert a .PCSI$COMPRESED file to a .PCSI (for installation on older VMS
    versions like on VAX - only if the layered product is also supported there)

    $ PRODUCT COPY product /DEST=dirspec /FORMAT=SEQUENTIAL [/qualifier]

    To convert a .PCSI file to a .PCSI$COMPRESSED file (to save kitdiskspace)

    $ PRODUCT COPY product /DEST=dirspec /FORMAT=COMPRESSED [/qualifier]


    HIH

    --
    Peter "EPLAN" LANGSTOEGER
    Network and OpenVMS system specialist
    E-mail peter@langstoeger.at
    A-1030 VIENNA AUSTRIA I'm not a pessimist, I'm a realist

  9. Re: CC: check the presence of functions and system #include

    In article <1185924514.859336.285500@b79g2000hse.googlegroups. com>, Pierre writes:
    >
    > $ pipe lib/text/lis sys$library:decc$rtldefs | search sys$pipe > name of the include>
    >


    On sufficently old versions lib/list and pipe did not get along, so
    you could get a false negative, try it and be sure.

    As for the actual routines in the library, compile something which
    calls them and look for errors from LINK.


+ Reply to Thread