mod_jk2 compilation issues on tru64 with gcc

Discussion in 'C Programming' started by William Rusch, Mar 4, 2004.

  1. Im having issues getting mod_jk2 for Apache and tomcat to compile
    using, cygnus's gcc on tru64 5.1a

    from the looks of it I dont understand why this is an issue.

    here is the error:

    gcc -g -O2 -DOSF1 -I../../include -I/install/httpd-2.0.48/include
    -I/install/httpd-2.0.48/os/s%@OSDIR@%unix%g -g -O2
    -I/install/httpd-2.0.48/srclib/apr-util/include
    -I/install/httpd-2.0.48/srclib/apr/include -DCHUNK_SIZE=4096
    -DUSE_APACHE_MD5 -DHAS_APR -DHAS_AP_PCRE -c
    .../../common/jk_logger_file.c -DPIC -o
    .../../../build/jk2/apache2/.libs/jk_logger_file.lo
    In file included from ../../include/jk_global.h:104,
    from ../../include/jk_logger.h:27,
    from ../../include/jk_env.h:25,
    from ../../common/jk_logger_file.c:25:
    /usr/local/lib/gcc-lib/alpha-dec-osf5.1/2.9-gnupro-99r1/include/unistd.h:609:
    warning: `cuserid' redefined
    /usr/local/lib/gcc-lib/alpha-dec-osf5.1/2.9-gnupro-99r1/include/stdio.h:458:
    warning: this is the location of the previous definition
    .../../common/jk_logger_file.c: In function `jk2_logger_file_jkVLog':
    .../../common/jk_logger_file.c:197: wrong type argument to unary
    exclamation mark
    gmake[1]: *** [../../../build/jk2/apache2/jk_logger_file.lo] Error 1
    gmake[1]: Leaving directory
    `/tomcat/tomcat.5.0.19/src/jakarta-tomcat-connectors/jk/native2/server/apache2'
    gmake: *** [jk2-build] Error 1



    here is the code snippet:

    static int JK_METHOD jk2_logger_file_jkVLog(jk_env_t *env, jk_logger_t
    *l,
    const char *file,
    int line,
    int level,
    const char *fmt,
    va_list args)
    {
    int rc = 0;
    char *buf;
    char *fmt1;
    apr_pool_t *aprPool = env->tmpPool->_private;
    char rfctime[APR_RFC822_DATE_LEN];
    apr_time_t time = apr_time_now();

    if (!file || !args) ### this is the error line
    return -1;


    Any insight would be greatly appreciated.

    Bill
    William Rusch, Mar 4, 2004
    #1
    1. Advertising

  2. (William Rusch) wrote in
    news::


    > va_list args)
    > {
    > int rc = 0;
    > char *buf;
    > char *fmt1;
    > apr_pool_t *aprPool = env->tmpPool->_private;
    > char rfctime[APR_RFC822_DATE_LEN];
    > apr_time_t time = apr_time_now();
    >
    > if (!file || !args) ### this is the error line 197
    > return -1;
    >
    > ../../common/jk_logger_file.c:197: wrong type argument to unary
    >
    > Any insight would be greatly appreciated.


    It appears that !args is not a pointer or scalar. Look for some other way
    to determine if 'args' is a valid object.

    --
    - Mark ->
    --
    Mark A. Odell, Mar 4, 2004
    #2
    1. Advertising

  3. William Rusch

    Old Wolf Guest

    > Im having issues getting mod_jk2 for Apache and tomcat to compile
    > using, cygnus's gcc on tru64 5.1a
    >
    > from the looks of it I dont understand why this is an issue.
    >
    > here is the error:
    > ../../common/jk_logger_file.c: In function `jk2_logger_file_jkVLog':
    > ../../common/jk_logger_file.c:197: wrong type argument to unary
    > exclamation mark
    >
    > here is the code snippet:
    >
    > static int JK_METHOD jk2_logger_file_jkVLog(jk_env_t *env, jk_logger_t
    > *l,
    > const char *file,
    > int line,
    > int level,
    > const char *fmt,
    > va_list args)
    > {

    [snip]
    > if (!file || !args) ### this is the error line
    > return -1;


    You cannot go "!args" with a va_list. You should submit a bug
    report to Apache or whoever is the appropriate organization.
    If you feel dutiful you could re-write it to work, and also check
    that they do not do other illegal things with va-lists.

    I suggest making it "va_list *args" at first. Look out for when
    va_end() is called too (make sure it is called exactly once for
    each list).
    Old Wolf, Mar 5, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Martinoff
    Replies:
    2
    Views:
    4,177
    Alex Martinoff
    Sep 7, 2003
  2. John

    Compiling mod_jk2

    John, Sep 22, 2003, in forum: Java
    Replies:
    0
    Views:
    422
  3. Nelayan
    Replies:
    0
    Views:
    419
    Nelayan
    Sep 22, 2003
  4. John

    mod_jk2 and Apache

    John, Sep 28, 2003, in forum: Java
    Replies:
    1
    Views:
    412
  5. CIndy Lee

    mod_jk2 compilation

    CIndy Lee, Mar 9, 2007, in forum: Java
    Replies:
    0
    Views:
    347
    CIndy Lee
    Mar 9, 2007
Loading...

Share This Page