Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Unable to compile on 2.2.26

DFresh4130
2014-04-24
2014-07-04
  • DFresh4130
    DFresh4130
    2014-04-24

    I'm not having any luck getting an .so file generated with version 0.13 and apache 2.2.26. I've compiled 2.2.26 from source and it's been running with no issues. Below is what I'm getting:

    [/home/mod_parp-0.13]$ /home/httpd-2.2.26/bin/apxs -c apache2/mod_parp.c
    /home/httpd-2.2.26/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/home/httpd-2.2.26/include  -I/home/httpd-2.2.26/include   -I/home/httpd-2.2.26/include   -c -o apache2/mod_parp.lo apache2/mod_parp.c && touch apache2/mod_parp.slo
    /home/httpd-2.2.26/build/libtool --silent --mode=link gcc -o apache2/mod_parp.la  -rpath /home/httpd-2.2.26/modules -module -avoid-version    apache2/mod_parp.lo
    
    [mod_parp-0.13]$ ls -ltr apache2/
    total 200
    -rw------- 1 user users   3900 Mar 31 07:31 mod_parp.h
    -rw------- 1 user users  61035 Mar 31 07:31 mod_parp.c
    -rw------- 1 user users     40 Mar 31 07:31 Makefile.in
    -rw------- 1 user users    147 Mar 31 07:31 config.m4
    -rw------- 1 user users      0 Apr 24 17:03 mod_parp.slo
    -rw------- 1 user users 113808 Apr 24 17:03 mod_parp.o
    -rw------- 1 user users    323 Apr 24 17:03 mod_parp.lo
    -rw------- 1 user users    810 Apr 24 17:03 mod_parp.la
    

    If I use the -o option in conjunction with apxs I get the dreaded:

    apxs:Error: Command failed with rc=65536
    

    Any ideas on what I need to do to get this to compile? I'm trying to use this module so I can export HTTP_COOKIE values and have mod_substitute conditionally apply body content replacements for specific cookies. Let me know if this isn't possible.

     
  • DFresh4130
    DFresh4130
    2014-04-24

    Forgot to mention this is RedHat 6.3 64bit. Below is the full output of the error using -o with apxs.

    /home/httpd-2.2.26/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/home/httpd-2.2.26/include  -I/home/httpd-2.2.26/include   -I/home/httpd-2.2.26/include   -c -o apache2/mod_parp.lo apache2/mod_parp.c && touch apache2/mod_parp.slo
    /home/httpd-2.2.26/build/libtool --silent --mode=link gcc -o apache2/mod_parp.la  -rpath /home/httpd-2.2.26/modules -module -avoid-version    apache2/mod_parp.lo -o mod_parp.so
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crt1.o: In function `_start':
    (.text+0x20): undefined reference to `main'
    apache2/.libs/mod_parp.o: In function `parp_register_hooks':
    /home/mod_parp-0.13/apache2/mod_parp.c:1794: undefined reference to `ap_hook_header_parser'
    /home/mod_parp-0.13/apache2/mod_parp.c:1795: undefined reference to `ap_hook_post_config'
    /home/mod_parp-0.13/apache2/mod_parp.c:1796: undefined reference to `ap_register_input_filter'
    /home/mod_parp-0.13/apache2/mod_parp.c:1797: undefined reference to `apr_dynamic_fn_register'
    apache2/.libs/mod_parp.o: In function `parp_post_config':
    /home/mod_parp-0.13/apache2/mod_parp.c:1655: undefined reference to `apr_optional_hook_add'
    apache2/.libs/mod_parp.o: In function `parp_delete_parameter':
    /home/mod_parp-0.13/apache2/mod_parp.c:1634: undefined reference to `apr_table_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:1635: undefined reference to `apr_table_elts'
    /home/mod_parp-0.13/apache2/mod_parp.c:1636: undefined reference to `apr_table_elts'
    /home/mod_parp-0.13/apache2/mod_parp.c:1638: undefined reference to `apr_table_set'
    /home/mod_parp-0.13/apache2/mod_parp.c:1645: undefined reference to `apr_table_get'
    apache2/.libs/mod_parp.o: In function `parp_srv_config_create':
    /home/mod_parp-0.13/apache2/mod_parp.c:1727: undefined reference to `apr_palloc'
    apache2/.libs/mod_parp.o: In function `parp_body_data_cmd':
    /home/mod_parp-0.13/apache2/mod_parp.c:1768: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:1768: undefined reference to `apr_table_setn'
    /home/mod_parp-0.13/apache2/mod_parp.c:1766: undefined reference to `apr_table_make'
    apache2/.libs/mod_parp.o: In function `parp_write_nested_multipart':
    /home/mod_parp-0.13/apache2/mod_parp.c:1091: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:1154: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:1113: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:1121: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:1124: undefined reference to `apr_brigade_write'
    apache2/.libs/mod_parp.o:/home/mod_parp-0.13/apache2/mod_parp.c:1134: more undefined references to `apr_brigade_write' follow
    apache2/.libs/mod_parp.o: In function `parp_forward_filter':
    /home/mod_parp-0.13/apache2/mod_parp.c:1194: undefined reference to `ap_get_brigade'
    /home/mod_parp-0.13/apache2/mod_parp.c:1217: undefined reference to `apr_pstrcat'
    /home/mod_parp-0.13/apache2/mod_parp.c:1227: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:1396: undefined reference to `ap_remove_input_filter'
    /home/mod_parp-0.13/apache2/mod_parp.c:1221: undefined reference to `apr_pstrcat'
    /home/mod_parp-0.13/apache2/mod_parp.c:1256: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:1279: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:1313: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:1321: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:1324: undefined reference to `apr_brigade_write'
    apache2/.libs/mod_parp.o:/home/mod_parp-0.13/apache2/mod_parp.c:1357: more undefined references to `apr_brigade_write' follow
    apache2/.libs/mod_parp.o: In function `parp_run_modify_hook':
    /home/mod_parp-0.13/apache2/mod_parp.c:173: undefined reference to `apr_optional_hook_get'
    apache2/.libs/mod_parp.o: In function `parp_run_modify_body_hook':
    /home/mod_parp-0.13/apache2/mod_parp.c:168: undefined reference to `apr_optional_hook_get'
    apache2/.libs/mod_parp.o: In function `parp_run_hp_hook':
    /home/mod_parp-0.13/apache2/mod_parp.c:160: undefined reference to `apr_optional_hook_get'
    apache2/.libs/mod_parp.o: In function `parp_parser_urlencode':
    /home/mod_parp-0.13/apache2/mod_parp.c:516: undefined reference to `ap_getword'
    /home/mod_parp-0.13/apache2/mod_parp.c:519: undefined reference to `ap_getword_nc'
    /home/mod_parp-0.13/apache2/mod_parp.c:532: undefined reference to `apr_table_addn'
    /home/mod_parp-0.13/apache2/mod_parp.c:536: undefined reference to `apr_array_push'
    /home/mod_parp-0.13/apache2/mod_parp.c:544: undefined reference to `apr_array_push'
    /home/mod_parp-0.13/apache2/mod_parp.c:551: undefined reference to `apr_array_push'
    apache2/.libs/mod_parp.o: In function `parp_get_parser':
    /home/mod_parp-0.13/apache2/mod_parp.c:864: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:864: undefined reference to `apr_strtok'
    /home/mod_parp-0.13/apache2/mod_parp.c:867: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:880: undefined reference to `apr_psprintf'
    /home/mod_parp-0.13/apache2/mod_parp.c:870: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:873: undefined reference to `apr_table_get'
    apache2/.libs/mod_parp.o: In function `parp_new':
    /home/mod_parp-0.13/apache2/mod_parp.c:985: undefined reference to `apr_palloc'
    /home/mod_parp-0.13/apache2/mod_parp.c:989: undefined reference to `apr_brigade_create'
    /home/mod_parp-0.13/apache2/mod_parp.c:990: undefined reference to `apr_table_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:994: undefined reference to `apr_table_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:995: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:995: undefined reference to `apr_table_setn'
    /home/mod_parp-0.13/apache2/mod_parp.c:997: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:997: undefined reference to `apr_table_setn'
    /home/mod_parp-0.13/apache2/mod_parp.c:999: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:999: undefined reference to `apr_table_setn'
    apache2/.libs/mod_parp.o: In function `parp_read_header':
    /home/mod_parp-0.13/apache2/mod_parp.c:275: undefined reference to `apr_table_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:280: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:280: undefined reference to `apr_strtok'
    /home/mod_parp-0.13/apache2/mod_parp.c:290: undefined reference to `apr_strtok'
    /home/mod_parp-0.13/apache2/mod_parp.c:306: undefined reference to `apr_table_addn'
    /home/mod_parp-0.13/apache2/mod_parp.c:309: undefined reference to `apr_strtok'
    /home/mod_parp-0.13/apache2/mod_parp.c:299: undefined reference to `apr_pstrndup'
    apache2/.libs/mod_parp.o: In function `parp_read_payload':
    /home/mod_parp-0.13/apache2/mod_parp.c:912: undefined reference to `ap_setup_client_block'
    /home/mod_parp-0.13/apache2/mod_parp.c:917: undefined reference to `apr_brigade_create'
    /home/mod_parp-0.13/apache2/mod_parp.c:920: undefined reference to `ap_get_brigade'
    /home/mod_parp-0.13/apache2/mod_parp.c:928: undefined reference to `apr_bucket_type_eos'
    /home/mod_parp-0.13/apache2/mod_parp.c:932: undefined reference to `apr_bucket_type_flush'
    /home/mod_parp-0.13/apache2/mod_parp.c:941: undefined reference to `apr_brigade_write'
    /home/mod_parp-0.13/apache2/mod_parp.c:945: undefined reference to `apr_brigade_cleanup'
    /home/mod_parp-0.13/apache2/mod_parp.c:954: undefined reference to `apr_strerror'
    /home/mod_parp-0.13/apache2/mod_parp.c:956: undefined reference to `apr_psprintf'
    /home/mod_parp-0.13/apache2/mod_parp.c:964: undefined reference to `apr_brigade_length'
    /home/mod_parp-0.13/apache2/mod_parp.c:967: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:969: undefined reference to `apr_off_t_toa'
    /home/mod_parp-0.13/apache2/mod_parp.c:970: undefined reference to `apr_table_set'
    /home/mod_parp-0.13/apache2/mod_parp.c:938: undefined reference to `apr_pstrdup'
    apache2/.libs/mod_parp.o: In function `parp_flatten':
    /home/mod_parp-0.13/apache2/mod_parp.c:215: undefined reference to `apr_brigade_length'
    /home/mod_parp-0.13/apache2/mod_parp.c:217: undefined reference to `apr_palloc'
    /home/mod_parp-0.13/apache2/mod_parp.c:218: undefined reference to `apr_brigade_flatten'
    apache2/.libs/mod_parp.o: In function `parp_read_params':
    /home/mod_parp-0.13/apache2/mod_parp.c:1032: undefined reference to `apr_optional_hook_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:1033: undefined reference to `apr_optional_hook_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:1036: undefined reference to `apr_array_make'
    apache2/.libs/mod_parp.o: In function `parp_has_body':
    /home/mod_parp-0.13/apache2/mod_parp.c:188: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:189: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:198: undefined reference to `apr_strtoff'
    apache2/.libs/mod_parp.o: In function `parp_read_params':
    /home/mod_parp-0.13/apache2/mod_parp.c:1060: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:1041: undefined reference to `apr_array_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:1053: undefined reference to `apr_array_make'
    apache2/.libs/mod_parp.o: In function `parp_get_payload':
    /home/mod_parp-0.13/apache2/mod_parp.c:248: undefined reference to `apr_pstrdup'
    apache2/.libs/mod_parp.o: In function `parp_header_parser':
    /home/mod_parp-0.13/apache2/mod_parp.c:1671: undefined reference to `ap_is_initial_req'
    /home/mod_parp-0.13/apache2/mod_parp.c:1672: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:1682: undefined reference to `ap_log_rerror'
    /home/mod_parp-0.13/apache2/mod_parp.c:1687: undefined reference to `ap_add_input_filter'
    /home/mod_parp-0.13/apache2/mod_parp.c:1691: undefined reference to `apr_brigade_length'
    apache2/.libs/mod_parp.o: In function `parp_update_query_parameter':
    /home/mod_parp-0.13/apache2/mod_parp.c:1590: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:1600: undefined reference to `apr_pstrcat'
    /home/mod_parp-0.13/apache2/mod_parp.c:1606: undefined reference to `apr_pstrcat'
    /home/mod_parp-0.13/apache2/mod_parp.c:1613: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:1615: undefined reference to `apr_pstrcat'
    /home/mod_parp-0.13/apache2/mod_parp.c:1618: undefined reference to `ap_parse_uri'
    apache2/.libs/mod_parp.o: In function `parp_header_parser':
    /home/mod_parp-0.13/apache2/mod_parp.c:1702: undefined reference to `apr_psprintf'
    /home/mod_parp-0.13/apache2/mod_parp.c:1700: undefined reference to `apr_table_set'
    apache2/.libs/mod_parp.o: In function `parp_update_content_length':
    /home/mod_parp-0.13/apache2/mod_parp.c:1549: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:1550: undefined reference to `apr_psprintf'
    /home/mod_parp-0.13/apache2/mod_parp.c:1550: undefined reference to `apr_table_set'
    apache2/.libs/mod_parp.o: In function `parp_update_query_parameter':
    /home/mod_parp-0.13/apache2/mod_parp.c:1560: undefined reference to `apr_is_empty_array'
    /home/mod_parp-0.13/apache2/mod_parp.c:1573: undefined reference to `apr_pstrcat'
    /home/mod_parp-0.13/apache2/mod_parp.c:1582: undefined reference to `apr_pstrcat'
    /home/mod_parp-0.13/apache2/mod_parp.c:1584: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:1578: undefined reference to `apr_pstrcat'
    apache2/.libs/mod_parp.o: In function `parp_header_parser':
    /home/mod_parp-0.13/apache2/mod_parp.c:1674: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:1708: undefined reference to `ap_log_rerror'
    apache2/.libs/mod_parp.o: In function `parp_update_query_parameter':
    /home/mod_parp-0.13/apache2/mod_parp.c:1603: undefined reference to `apr_pstrcat'
    apache2/.libs/mod_parp.o: In function `parp_strtok':
    /home/mod_parp-0.13/apache2/mod_parp.c:430: undefined reference to `apr_pstrndup'
    apache2/.libs/mod_parp.o: In function `parp_parser_multipart':
    /home/mod_parp-0.13/apache2/mod_parp.c:599: undefined reference to `apr_table_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:610: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:601: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:612: undefined reference to `apr_pstrdup'
    /home/mod_parp-0.13/apache2/mod_parp.c:620: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:625: undefined reference to `apr_pstrcat'
    apache2/.libs/mod_parp.o: In function `parp_read_boundaries':
    /home/mod_parp-0.13/apache2/mod_parp.c:338: undefined reference to `apr_table_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:369: undefined reference to `apr_palloc'
    /home/mod_parp-0.13/apache2/mod_parp.c:379: undefined reference to `apr_table_addn'
    apache2/.libs/mod_parp.o: In function `parp_parser_multipart':
    /home/mod_parp-0.13/apache2/mod_parp.c:651: undefined reference to `apr_table_elts'
    /home/mod_parp-0.13/apache2/mod_parp.c:654: undefined reference to `apr_table_elts'
    /home/mod_parp-0.13/apache2/mod_parp.c:659: undefined reference to `apr_table_elts'
    /home/mod_parp-0.13/apache2/mod_parp.c:695: undefined reference to `apr_table_elts'
    /home/mod_parp-0.13/apache2/mod_parp.c:707: undefined reference to `apr_array_push'
    apache2/.libs/mod_parp.o: In function `parp_get_headers':
    /home/mod_parp-0.13/apache2/mod_parp.c:457: undefined reference to `apr_table_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:461: undefined reference to `apr_strtok'
    /home/mod_parp-0.13/apache2/mod_parp.c:466: undefined reference to `apr_table_addn'
    apache2/.libs/mod_parp.o: In function `parp_parser_multipart':
    /home/mod_parp-0.13/apache2/mod_parp.c:721: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:722: undefined reference to `apr_strnatcasecmp'
    /home/mod_parp-0.13/apache2/mod_parp.c:748: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:760: undefined reference to `apr_strnatcasecmp'
    /home/mod_parp-0.13/apache2/mod_parp.c:762: undefined reference to `apr_table_get'
    /home/mod_parp-0.13/apache2/mod_parp.c:779: undefined reference to `apr_pstrndup'
    /home/mod_parp-0.13/apache2/mod_parp.c:789: undefined reference to `apr_table_addn'
    /home/mod_parp-0.13/apache2/mod_parp.c:792: undefined reference to `apr_array_push'
    /home/mod_parp-0.13/apache2/mod_parp.c:730: undefined reference to `apr_array_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:630: undefined reference to `apr_array_push'
    /home/mod_parp-0.13/apache2/mod_parp.c:636: undefined reference to `apr_array_make'
    /home/mod_parp-0.13/apache2/mod_parp.c:639: undefined reference to `apr_pstrndup'
    /home/mod_parp-0.13/apache2/mod_parp.c:749: undefined reference to `apr_pstrdup'
    apache2/.libs/mod_parp.o: In function `parp_register_hooks':
    /home/mod_parp-0.13/apache2/mod_parp.c:1798: undefined reference to `apr_dynamic_fn_register'
    apache2/.libs/mod_parp.o: In function `parp_get_error':
    /home/mod_parp-0.13/apache2/mod_parp.c:1424: undefined reference to `apr_pstrdup'
    apache2/.libs/mod_parp.o: In function `parp_error_code_cmd':
    /home/mod_parp-0.13/apache2/mod_parp.c:1755: undefined reference to `apr_psprintf'
    collect2: ld returned 1 exit status
    apxs:Error: Command failed with rc=65536
    
     
  • DFresh4130
    DFresh4130
    2014-04-25

    Found the file is actually generated in the .libs directory inside apache2 directory. Totally came across this by accident. Might wanna change that or update the documentation.

     
  • Johannes
    Johannes
    2014-07-04

    Do you have this for windows?
    Deleting intermediate files and output files for project 'mod_parp - Win32 Debug'.
    --------------------Configuration: mod_parp - Win32 Debug--------------------
    Compiling...
    mod_parp.c
    c:\mod_parp-0.10\mod_parp.c(658) : warning C4550: expression evaluates to a function which is missing an argument list
    c:\mod_parp-0.10\mod_parp.c(885) : warning C4244: 'function' : conversion from 'int64 ' to 'unsigned int ', possible loss of data
    c:\mod_parp-0.10\mod_parp.c(887) : warning C4244: '-=' : conversion from '
    int64 ' to 'unsigned int ', possible loss of data
    c:\mod_parp-0.10\mod_parp.c(897) : warning C4244: 'function' : conversion from 'int64 ' to 'unsigned int ', possible loss of data
    c:\mod_parp-0.10\mod_parp.c(899) : warning C4244: '-=' : conversion from '
    int64 ' to 'unsigned int ', possible loss of data
    c:\mod_parp-0.10\mod_parp.c(916) : warning C4244: 'function' : conversion from '__int64 ' to 'unsigned int ', possible loss of data
    c:\mod_parp-0.10\mod_parp.c(1156) : error C2152: 'function' : pointers to functions with different attributes
    c:\mod_parp-0.10\mod_parp.c(1156) : warning C4024: 'ap_register_input_filter' : different types for formal and actual parameter 2
    c:\mod_parp-0.10\mod_parp.c(1157) : error C2152: 'initializing' : pointers to functions with different attributes
    c:\mod_parp-0.10\mod_parp.c(1158) : error C2152: 'initializing' : pointers to functions with different attributes
    Error executing cl.exe.
    Creating browse info file...

    mod_parp.so - 3 error(s), 7 warning(s)

    this is the compile error we have.
    any idea?