1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

mod_throttle compile problems...

Discussion in 'Plesk for Linux - 8.x and Older' started by evilbob, Jun 14, 2005.

  1. evilbob

    evilbob Guest

    0
     
    Hiya, just wondering if anyone has any ideas on this...trying to get mod_throttle working with plesk (all the config side is set up, but not getting that far).

    I've untarred the mod_throttle files, and typed make...this is the output...any ideas? Guessing something obvious, it actually makes the .so file, but then doesn't work, I'm assuming due to the errors below (if those errors are standard let me know, but can't believe they are).

    Thanks in advance.

    make

    /usr/local/psa/admin/bin/apxs -c mod_throttle.c
    cc -DHARD_SERVER_LIMIT=512 -DDEFAULT_PATH="/usr/local/psa/admin/bin:/bin:/usr/bin" -DLINUX=22 -DTARGET="httpsd" -DHAVE_SET_DUMPABLE -I/usr/include/gdbm -DMOD_SSL=208122 -DEAPI -O -pipe -W -Wall -I/home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/lib/dist/usr/include -DPLESK_Linux -I/home/builder/pb_work_dir/psa_aiconfig_7.5.3/psa/plesk-utils/include -DBSG_CR -DBSG_MSG -I/usr/include -DHAS_RPM -O3 -fexpensive-optimizations -I/usr/kerberos/include -fstrength-reduce -pipe -I/usr/include/libxml2 -Wno-unused-parameter -fpic -DSHARED_MODULE -I/usr/local/psa/admin/include -c mod_throttle.c
    mod_throttle.c: In function `critical_acquire':
    mod_throttle.c:818: warning: implicit declaration of function `ap_start_shutdown'
    mod_throttle.c: In function `merge_dir_config':
    mod_throttle.c:1308: warning: comparison between signed and unsigned
    mod_throttle.c: In function `init_module':
    mod_throttle.c:1337: warning: unused variable `i'
    mod_throttle.c: In function `cmd_preserve':
    mod_throttle.c:1526: warning: long unsigned int format, unsigned int arg (arg 3)
    mod_throttle.c:1549: warning: long unsigned int format, int arg (arg 3)
    mod_throttle.c:1568: warning: long unsigned int format, int arg (arg 3)
    mod_throttle.c: In function `cmd_restore':
    mod_throttle.c:1666: warning: comparison between signed and unsigned
    mod_throttle.c:1699: warning: comparison between signed and unsigned
    mod_throttle.c: In function `throttle_max_delay':
    mod_throttle.c:2069: warning: comparison between signed and unsigned
    mod_throttle.c: In function `throttle_refresh':
    mod_throttle.c:2089: warning: comparison between signed and unsigned
    mod_throttle.c: In function `throttle_indicator':
    mod_throttle.c:2127: warning: comparison between signed and unsigned
    mod_throttle.c: In function `policy_over_limit':
    mod_throttle.c:2214: warning: comparison between signed and unsigned
    mod_throttle.c: In function `policy_document':
    mod_throttle.c:2367: warning: comparison between signed and unsigned
    mod_throttle.c: In function `policy_idle':
    mod_throttle.c:2475: warning: comparison between signed and unsigned
    mod_throttle.c:2490: warning: long unsigned int format, unsigned int arg (arg 7)
    mod_throttle.c: In function `policy_speed':
    mod_throttle.c:2541: warning: comparison between signed and unsigned
    mod_throttle.c:2565: warning: long unsigned int format, unsigned int arg (arg 7)
    mod_throttle.c: In function `adjust_speed':
    mod_throttle.c:2597: warning: comparison between signed and unsigned
    mod_throttle.c: In function `policy_original':
    mod_throttle.c:2651: warning: comparison between signed and unsigned
    mod_throttle.c: In function `status_html_header':
    mod_throttle.c:3294: warning: unknown conversion type character `"' in format
    mod_throttle.c:3294: warning: unknown conversion type character `"' in format
    mod_throttle.c: In function `status_html_line':
    mod_throttle.c:3353: warning: comparison between signed and unsigned
    mod_throttle.c:3354: warning: comparison between signed and unsigned
    mod_throttle.c:3381: warning: comparison between signed and unsigned
    mod_throttle.c: In function `server_status':
    mod_throttle.c:3498: warning: unused variable `arg'
    mod_throttle.c: In function `general_html_header':
    mod_throttle.c:3658: warning: unknown conversion type character `"' in format
    mod_throttle.c:3658: warning: unknown conversion type character `"' in format
    mod_throttle.c:3619: warning: unused variable `title'
    mod_throttle.c: In function `general_html_line':
    mod_throttle.c:3727: warning: comparison between signed and unsigned
    mod_throttle.c:3728: warning: comparison between signed and unsigned
    mod_throttle.c: At top level:
    mod_throttle.c:3881: warning: missing initializer
    mod_throttle.c:3881: warning: (near initialization for `content_handlers[5].handler')
    mod_throttle.c:3917: warning: missing initializer
    mod_throttle.c:3917: warning: (near initialization for `command_table[10].func')
    mod_throttle.c:3948: warning: missing initializer
    mod_throttle.c:3948: warning: (near initialization for `throttle_module.add_module')
    mod_throttle.c: In function `throttle_user':
    mod_throttle.c:1908: warning: `err' might be used uninitialized in this function
    mod_throttle.c: In function `visitor_status':
    mod_throttle.c:3827: warning: `vp' might be used uninitialized in this function
    mod_throttle.c:3778: warning: `config' might be used uninitialized in this function
    mod_throttle.c:3779: warning: `visitor' might be used uninitialized in this function
    mod_throttle.c: In function `general_html_header':
    mod_throttle.c:3618: warning: `config' might be used uninitialized in this function
    mod_throttle.c:3619: warning: `view' might be used uninitialized in this function
    mod_throttle.c: In function `general_html_line':
    mod_throttle.c:3705: warning: `config' might be used uninitialized in this function
    mod_throttle.c:3706: warning: `visitor' might be used uninitialized in this function
    mod_throttle.c:3706: warning: `view' might be used uninitialized in this function
    cc -shared -o mod_throttle.so mod_throttle.o
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    See if you have /usr/sbin/apxs. If you don't I've seen other posts regarding the psa version of apxs not being quite right....

    So if you don't the posts say to install httpd-devel to get the standard apxs.
     
  3. evilbob

    evilbob Guest

    0
     
    Hiya, thanks for the reply...think thats heading in the right direction...have changed it to /usr/sbin/apxs, now first lines it comes up with are below...

    So I'm, guessing the http_conf_globals.h is the issue, but thats in /usr/local/psa/admin/include/ so is this always going to conflict?

    I've also tried adding /usr/local/psa/admin/include in the Makefile which gives the error at the bottom...

    /usr/bin/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -march=i386 -mcpu=i686 -DSSL_EXPERIMENTAL_ENGINE -I/usr/kerberos/include -DAP_HAVE_DESIGNATED_INITIA
    LIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pthread -I/usr/include/httpd -c -o mod_throttle.lo mod_throttle.c && touch m
    od_throttle.slo
    mod_throttle.c:152:31: http_conf_globals.h: No such file or directory
    mod_throttle.c:165: syntax error before "throttle_module"
    mod_throttle.c:165: warning: data definition has no type or storage class
    mod_throttle.c:316: warning: `struct pool' declared inside parameter list
    ....
    ....
    ...
    ...


    with the include...and hence http_conf_globals.h so I'm guessing not done right or something else wrong.

    In file included from mod_throttle.c:152:
    /usr/local/psa/admin/include/http_conf_globals.h:27: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:28: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:30: syntax error before "uid_t"
    /usr/local/psa/admin/include/http_conf_globals.h:31: syntax error before "char"
    /usr/local/psa/admin/include/http_conf_globals.h:32: syntax error before "gid_t"
    /usr/local/psa/admin/include/http_conf_globals.h:39: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:40: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:41: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:42: syntax error before "struct"
    /usr/local/psa/admin/include/http_conf_globals.h:43: syntax error before '*' token
    /usr/local/psa/admin/include/http_conf_globals.h:43: warning: data definition has no type or storage class
    /usr/local/psa/admin/include/http_conf_globals.h:44: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:45: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:46: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:47: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:48: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:49: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:54: syntax error before "int"
    /usr/local/psa/admin/include/http_conf_globals.h:59: syntax error before "char"

    .....
    .....
     
  4. jamesyeeoc

    jamesyeeoc Guest

    0
     
    I believe you want to remove all references to the /usr/local/psa/admin/... directory from the Make.

    All the stuff under /usr/local/psa are for the separate copy of apache which is used only for the control panel, not for the hosted domains apache.
     
  5. evilbob

    evilbob Guest

    0
     
    Yup, I'm guessing thats the problem, its taking some from the psa which doesn't work, however if I don't I get the http_conf_globals.h missing error message, even though if I do an rpm -qa it shows that httpd-devel is installed (but that file is only in the psa install...does it come from a different one?). Other problem is I can't seem to find any devel release for rh es3 unless I'm blind which I'm guessing it would come from :/.
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
  7. evilbob

    evilbob Guest

    0
     
    Thanks a lot for the help, much appreciated, you've lost me a little with the art/highfd though (not an expert :))

    I've managed to get an rpm for the http-devel now for the right ver, but looks like http-conf-globals.h isn't in there anyway when I query whats in the package?

    So basically a bit bamboozled how I can get this file?
     
  8. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Ummm, where did you find a version of mod_throttle for Apache 2.0x??

    Plesk is using Apache 2.0x

    The only mod_throttle I can find out there is for Apache 1.3
     
  9. evilbob

    evilbob Guest

    0
     
    Ah obvious nail on the head time! Didn't even check the most obvious, as in search, people were saying to use mod_throttle but it will never work with current plesk as its using apache 1.3?

    Same with mod_bandwidth looking at the readme, its just for 1.3, mod_bw doesn't compile either, so confused, whats the best way for limiting bandwidth for apache 2?

    p.s mod_bw comes up with...

    Warning! dlname not found in /usr/lib/httpd/modules/bw_mod-0.5rc1.la.
    Assuming installing a .so rather than a libtool archive.
    and fails, can't believe its so difficult to get server bandwidth working with plesk?
     
  10. jamesyeeoc

    jamesyeeoc Guest

    0
     
  11. evilbob

    evilbob Guest

    0
     
    Hiya, yeah had already tried that thanks and get the error below, was hoping for something simple hehe, but I'm guessing thats a nono :)....tell me when you get tired replying!

    /usr/sbin/apxs -a -c -i bw_mod-0.5rc1.c

    /usr/bin/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -march=i386 -mcpu=i686 -DSSL_EXPERIMENTAL_ENGINE -I/usr/kerberos/include -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pthread -I/usr/include/httpd -c -o bw_mod-0.5rc1.lo bw_mod-0.5rc1.c && touch bw_mod-0.5rc1.slo
    /usr/bin/libtool --silent --mode=link gcc -o bw_mod-0.5rc1.la -rpath /usr/lib/httpd/modules -module -avoid-version bw_mod-0.5rc1.lo
    /usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/bin/libtool' bw_mod-0.5rc1.la /usr/lib/httpd/modules
    /usr/bin/libtool --mode=install cp bw_mod-0.5rc1.la /usr/lib/httpd/modules/
    cp .libs/bw_mod-0.5rc1.lai /usr/lib/httpd/modules/bw_mod-0.5rc1.la
    cp .libs/bw_mod-0.5rc1.a /usr/lib/httpd/modules/bw_mod-0.5rc1.a
    ranlib /usr/lib/httpd/modules/bw_mod-0.5rc1.a
    chmod 644 /usr/lib/httpd/modules/bw_mod-0.5rc1.a
    PATH="$PATH:/sbin" ldconfig -n /usr/lib/httpd/modules
    ----------------------------------------------------------------------
    Libraries have been installed in:
    /usr/lib/httpd/modules

    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
    - add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
    - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
    - have your system administrator add LIBDIR to `/etc/ld.so.conf'

    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
    Warning! dlname not found in /usr/lib/httpd/modules/bw_mod-0.5rc1.la.
    Assuming installing a .so rather than a libtool archive.
    chmod 755 /usr/lib/httpd/modules/bw_mod-0.5rc1.so
    chmod: failed to get attributes of `/usr/lib/httpd/modules/bw_mod-0.5rc1.so': No such file or directory
    apxs:Error: Command failed with rc=65536
    .
     
  12. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Make sure you're logged in as root.
    Ok, try downloading the 0.6 from:

    http://ftp.fredan.org/pub/gentoo.org/distfiles/bw_mod-0.6.tgz

    Then gunzip it, and do the :

    /usr/sbin/apxs -i -a -c bw_mod-0.6c

    (not sure if the order of -i -a -c matters, but I followed their instructions to the tee)

    All expected output was observed, all the way to the ending:

    chmod 755 /usr/lib/httpd/modules/bw_mod-0.6.so
    [activating module 'bw' in /etc/httpd/conf/httpd.conf]

    The 0.6c (02/28/2005) version says it was tested with FC3, Suse, FreeBSD 5.2, others.
     
  13. evilbob

    evilbob Guest

    0
     
    Hiya, thanks again for the help....am logged in as root, just get the same error as above (with it being called bw_mod-0.6 instead), main indicator I'm guessing is the lines....it creates the .la file, just not the .so, which I'm guessing is down to the dlname error.

    Warning! dlname not found in /usr/lib/httpd/modules/bw_mod-0.6.la.
    Assuming installing a .so rather than a libtool archive.
    chmod 755 /usr/lib/httpd/modules/bw_mod-0.6.so
    chmod: failed to get attributes of `/usr/lib/httpd/modules/bw_mod-0.6.so': No such file or directory

    Cheers again
     
  14. jamesyeeoc

    jamesyeeoc Guest

    0
     
    What is the exact rpm package name you found for httpd-devel??

    I've got httpd-devel-2.0.40-21.17.legacy

    Do a 'rpm -q httpd-devel'

    And what version of Apache (mine httpd-2.0.40-21.17.legacy, which matches)

    Do a 'rpm -q httpd'

    Hopefully the version of httpd and the devel match each other... more than likely you have a mismatched pair of rpms.
     
  15. evilbob

    evilbob Guest

    0
     
    httpd-devel-2.0.46-38.ent
    httpd-2.0.46-38.ent
     
  16. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Strange...

    Ok, search your system (using locate or find) and see if it actually created either of the files:
    bw_mod-0.6.so
    bw_mod-0.6.la

    hopefully the .so file.

    It is possible that this version needs tweaking to get it to work with RHEL3 (isn't that what you are running?)

    www.ivn.cl/apache/bw_mod-0.6.txt+bw_mod-0.6&hl=en]Author's Site[/URL] OS compat says:
    Platform : Linux/x86 (Tested with Fedora Core 3, Suse, etc)
    FreeBSD/x86 v5.2 (Others versions might work as well)
    .... too tired to think anymore...getting(?) confused....too many threads... too many posts....
     
  17. evilbob

    evilbob Guest

    0
     
    Hiya, there's no .so file, I do have these 2 though created from it....

    /usr/lib/httpd/modules/bw_mod-0.6.la
    /usr/lib/httpd/modules/bw_mod-0.6.a

    Thanks for the help as usual and sorry for taking you down with me on the tiredness scale :). I'm guessing something needs tweaking with some lib file or something, but just no idea what.
     
Loading...