Menu

More compile errors!

Help
2004-09-22
2013-04-23
  • Ragnar Lonn

    Ragnar Lonn - 2004-09-22

    Hi. I'm trying to compile it on my OpenBSD machine and am getting this. Is it trying to use the wrong syntax for ap_log_rerror()?

    Cheers,

      /Ragnar

    svosch# apxs -c -D APACHE2 -L/usr/local/lib/mysql -I/usr/local/include/mysql -I/usr/local/apache2/include -lmysqlclient -lm -lz mod_auth_mysql.c
    cc -O2 -DDEV_RANDOM=/dev/arandom -DMOD_SSL=208116 -DEAPI -DUSE_EXPAT -I../lib/expat-lite -DUSE_SETUSERCONTEXT -fPIC -DSHARED_MODULE -I/usr/lib/apache/include -I/usr/local/include/mysql -I/usr/local/apache2/include -DAPACHE2  -c mod_auth_mysql.c
    mod_auth_mysql.c: In function `open_db_handle':
    mod_auth_mysql.c:388: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:413: warning: passing arg 1 of `apr_pool_cleanup_register' from incompatible pointer type
    mod_auth_mysql.c:420: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c: At top level:
    mod_auth_mysql.c:474: initializer element is not constant
    mod_auth_mysql.c:474: (near initialization for `mysql_auth_cmds[0].name')
    mod_auth_mysql.c:476: `ap_set_int_slot' undeclared here (not in a function)
    mod_auth_mysql.c:478: initializer element is not constant
    mod_auth_mysql.c:478: (near initialization for `mysql_auth_cmds[0].func')
    mod_auth_mysql.c:482: initializer element is not constant
    mod_auth_mysql.c:482: (near initialization for `mysql_auth_cmds[0].cmd_data')
    mod_auth_mysql.c:486: initializer element is not constant
    mod_auth_mysql.c:486: (near initialization for `mysql_auth_cmds[0].req_override')
    mod_auth_mysql.c:490: initializer element is not constant
    mod_auth_mysql.c:490: (near initialization for `mysql_auth_cmds[0].args_how')
    mod_auth_mysql.c:494: initializer element is not constant
    mod_auth_mysql.c:494: (near initialization for `mysql_auth_cmds[0].errmsg')
    mod_auth_mysql.c:498: initializer element is not constant
    mod_auth_mysql.c:498: (near initialization for `mysql_auth_cmds[1].name')
    mod_auth_mysql.c:502: initializer element is not constant
    mod_auth_mysql.c:502: (near initialization for `mysql_auth_cmds[1].func')
    mod_auth_mysql.c:506: initializer element is not constant
    mod_auth_mysql.c:506: (near initialization for `mysql_auth_cmds[1].cmd_data')
    mod_auth_mysql.c:510: initializer element is not constant
    mod_auth_mysql.c:510: (near initialization for `mysql_auth_cmds[1].req_override')
    mod_auth_mysql.c:514: initializer element is not constant
    mod_auth_mysql.c:514: (near initialization for `mysql_auth_cmds[1].args_how')
    mod_auth_mysql.c:518: initializer element is not constant
    mod_auth_mysql.c:518: (near initialization for `mysql_auth_cmds[1].errmsg')
    mod_auth_mysql.c:522: initializer element is not constant
    mod_auth_mysql.c:522: (near initialization for `mysql_auth_cmds[2].name')
    mod_auth_mysql.c:526: initializer element is not constant
    mod_auth_mysql.c:526: (near initialization for `mysql_auth_cmds[2].func')
    mod_auth_mysql.c:530: initializer element is not constant
    mod_auth_mysql.c:530: (near initialization for `mysql_auth_cmds[2].cmd_data')
    mod_auth_mysql.c:534: initializer element is not constant
    mod_auth_mysql.c:534: (near initialization for `mysql_auth_cmds[2].req_override')
    mod_auth_mysql.c:538: initializer element is not constant
    mod_auth_mysql.c:538: (near initialization for `mysql_auth_cmds[2].args_how')
    mod_auth_mysql.c:542: initializer element is not constant
    mod_auth_mysql.c:542: (near initialization for `mysql_auth_cmds[2].errmsg')
    mod_auth_mysql.c:546: initializer element is not constant
    mod_auth_mysql.c:546: (near initialization for `mysql_auth_cmds[3].name')
    mod_auth_mysql.c:550: initializer element is not constant
    mod_auth_mysql.c:550: (near initialization for `mysql_auth_cmds[3].func')
    mod_auth_mysql.c:554: initializer element is not constant
    mod_auth_mysql.c:554: (near initialization for `mysql_auth_cmds[3].cmd_data')
    mod_auth_mysql.c:558: initializer element is not constant
    mod_auth_mysql.c:558: (near initialization for `mysql_auth_cmds[3].req_override')
    mod_auth_mysql.c:560: warning: braces around scalar initializer
    mod_auth_mysql.c:560: warning: (near initialization for `mysql_auth_cmds[3].args_how')
    mod_auth_mysql.c: In function `get_mysql_pw':
    mod_auth_mysql.c:678: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:692: warning: passing arg 1 of `apr_palloc' from incompatible pointer type
    mod_auth_mysql.c:717: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:726: warning: passing arg 1 of `apr_pstrdup' from incompatible pointer type
    mod_auth_mysql.c:729: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:735: warning: passing arg 1 of `apr_pstrdup' from incompatible pointer type
    mod_auth_mysql.c:738: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c: In function `get_mysql_groups':
    mod_auth_mysql.c:769: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:774: warning: passing arg 1 of `apr_palloc' from incompatible pointer type
    mod_auth_mysql.c:786: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:793: warning: passing arg 1 of `apr_palloc' from incompatible pointer type
    mod_auth_mysql.c:798: warning: passing arg 1 of `apr_pstrdup' from incompatible pointer type
    mod_auth_mysql.c: In function `mysql_authenticate_basic_user':
    mod_auth_mysql.c:846: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:863: structure has no member named `user'
    mod_auth_mysql.c:880: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:896: warning: passing arg 1 of `apr_palloc' from incompatible pointer type
    mod_auth_mysql.c:920: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:929: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c: In function `mysql_check_auth':
    mod_auth_mysql.c:945: structure has no member named `user'
    mod_auth_mysql.c:952: syntax error before `*'
    mod_auth_mysql.c:957: `reqs_arr' undeclared (first use in this function)
    mod_auth_mysql.c:957: (Each undeclared identifier is reported only once
    mod_auth_mysql.c:957: for each function it appears in.)
    mod_auth_mysql.c:981: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c:998: warning: passing arg 5 of `ap_log_rerror' from incompatible pointer type
    mod_auth_mysql.c: In function `register_hooks':
    mod_auth_mysql.c:1010: `APR_HOOK_MIDDLE' undeclared (first use in this function)
    mod_auth_mysql.c: At top level:
    mod_auth_mysql.c:1016: syntax error before `mysql_auth_module'
    apxs:Break: Command failed with rc=1

     
    • Ragnar Lonn

      Ragnar Lonn - 2004-09-22

      Oh, and by the way I couldn't find a crypt.h on my system. I did, however, find the crypt() routine included in unistd.h so I included that file instead of crypt.h. I don't think that has anything to do with the above compilation errors, just FYI.

        /Ragnar

       
    • Jerry Stuckle

      Jerry Stuckle - 2004-09-22

      Ragner,

      A couple of things here.

      First of all, what version of Apache are you using?  It looks form the errors it might be 1.x, in which case -D APACHE2 is incorrect.  Otherwise, you may have a mix of Apache 1.x and Apache 2.x header files on your system.

      Additionally, which version of mod_auth_mysql are you trying to compile?  I can't match the line references in your error messages to the code.

      Finally, crypt.h is distributed with the GNU C compiler (and perhaps with others).  If you're using the GNU compiler, you may need to upgrade to a later version.  The one in unistd.h may work - I haven't tried it, though.

      Jerry

       
    • Ragnar Lonn

      Ragnar Lonn - 2004-09-23

      Hi again,

      I'm using Apache 2.0.50 and trying to compile mod_auth_mysql-2.6.0. I fetched the mod_auth_mysql-2.6.0.tar.gz file here on Sourceforge.

      The line numbers may be wrong because I changed the source when I included unistd.h instead of crypt.h but the numbers shouldn't be off by a lot, I only commented out the #include <crypt.h> and inserted a new include line plus a couple of blank lines for separation.

      I fetch all the include files from /usr/local/apache2/include and it would be strange indeed if any Apache 1.x files had found their way there but I'll check it out...

      Oops. Now it compiled :-)

      I found some old Apache include files in /usr/lib/apache/include that apparently were included.
      When I renamed that dir, things worked. Well, after I had edited the file to include unistd.h instead of crypt.h at least.

      Thanks!

        /Ragnar

       
    • Ragnar Lonn

      Ragnar Lonn - 2004-09-23

      I couldn't understand how the old include files were used when I specifically used -I /usr/local/apache2/include but I think it was because I used the old, Apache 1.x apxs program. It was in my path (/usr/sbin/apxs) and when I copied the command line from the README file I executed that program instead of /usr/local/apache2/bin/apxs, which is the Apache 2 apxs on my system.

      It worked fine building the library with the old apxs but then apxs refused to install it afterwards, thinking it wasn't a valid library module, and that's when I noticed the problem.

      Maybe a troubleshooting section that described this in the README file would be a good idea?

      Cheers,

        /Ragnar

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.