• 締切済み

mod_limitipconnのインストールでapxsのコンパイルエラー

お世話になります。 環境-------------------- Redhat Linux Fedora 5 Apache/2.2.2 ------------------------ mod_limitipconnをインストールしたいのですが、 makeするとapxsのコンパイルエラーが起こりインストールできずにいます。 エラー内容は以下の通りです。 ------------------------ [root@www mod_limitipconn-0.04]# make apxs -c mod_limitipconn.c /usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_limitipconn.lo mod_limitipconn.c && touch mod_limitipconn.slo mod_limitipconn.c:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'limitipconn_module' mod_limitipconn.c:43: error: expected specifier-qualifier-list before 'array_header' mod_limitipconn.c:49: error: expected ')' before '*' token mod_limitipconn.c: In function 'limitipconn_handler': --中略-- mod_limitipconn.c:176: warning: implicit declaration of function 'ap_log_reason' mod_limitipconn.c:178: warning: implicit declaration of function 'ap_table_setn' mod_limitipconn.c: In function 'no_limit_config_cmd': mod_limitipconn.c:208: warning: implicit declaration of function 'ap_push_array' mod_limitipconn.c:208: error: 'limitipconn_dir_config' has no member named 'no_limit' mod_limitipconn.c:208: warning: implicit declaration of function 'ap_pstrdup' mod_limitipconn.c:208: warning: assignment makes pointer from integer without a cast mod_limitipconn.c: In function 'excl_limit_config_cmd': mod_limitipconn.c:218: error: 'limitipconn_dir_config' has no member named 'excl_limit' mod_limitipconn.c:218: warning: assignment makes pointer from integer without a cast mod_limitipconn.c: At top level: mod_limitipconn.c:224: warning: missing braces around initializer mod_limitipconn.c:224: warning: (near initialization for 'limitipconn_cmds[0].func') mod_limitipconn.c:224: warning: initialization from incompatible pointer type mod_limitipconn.c:226: warning: initialization from incompatible pointer type mod_limitipconn.c:228: warning: initialization from incompatible pointer type mod_limitipconn.c:234: error: expected declaration specifiers or '...' before 'pool' mod_limitipconn.c: In function 'limitipconn_init': mod_limitipconn.c:236: warning: passing argument 4 of 'ap_log_error' makes integer from pointer without a cast mod_limitipconn.c:236: warning: passing argument 5 of 'ap_log_error' from incompatible pointer type mod_limitipconn.c:236: error: too few arguments to function 'ap_log_error' mod_limitipconn.c: At top level: mod_limitipconn.c:239: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'limitipconn_module' apxs:Error: Command failed with rc=65536 . make: *** [mod_limitipconn.so] Error 1 ------------- apache は DSOをサポートしています。 (httpd -l | grep mod_so.c で確認) どうぞ宜しくお願いいたします。

みんなの回答

  • tomo316
  • ベストアンサー率35% (51/142)
回答No.1
awazak
質問者

お礼

まさにこのページを参考にしてインストールしようとしていました。 apacheの再コンパイルにリスクがあるのでできるだけDSOをサポートしている場合の方法でインストールしたいと考えています。 (レンタルサーバーで運用しており最初からapacheがインストールされていたため、コンパイル時のコマンドのオプションが不明なので・・・)

awazak
質問者

補足

自己解決いたしました。 下記のURLはApacheのバージョン1 ​http://griffonworks.net/freebsd/mod_limitipconn.html​ 下記のURLはApacheのバージョン2 http://dominia.org/djao/limitipconn2.html

関連するQ&A

  • CGIへのコンパイルエラー

    初めまして。プログラミング暦はほとんどありません。javaを少しかじった程度です。今回Ajaxへ挑戦しようと思い、 http://itpro.nikkeibp.co.jp/article/COLUMN/20060115/227278/?ST=nettech の予測補完インタフェースを作成しよとしています。 環境はfedoracore5でXPからのputyからの遠隔です。 complete.cをcomplete.cgiへコンパイルするときに、 [root@localhost html]# gcc -Wall -O2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include complete.c -o complete.cgi -lglib-2.0 -lsary -lpthread complete.c:1: error: stray ‘\357’ in program complete.c:1: error: stray ‘\273’ in program complete.c:1: error: stray ‘\277’ in program complete.c:1: error: stray ‘#’ in program complete.c:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token In file included from complete.c:2: /usr/include/string.h:39: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:43: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:52: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:59: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:62: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:66: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:88: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:96: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:102: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:109: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strxfrm’ /usr/include/string.h:184: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strcspn’ /usr/include/string.h:188: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strspn’ /usr/include/string.h:242: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strlen’ /usr/include/string.h:270: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:288: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:292: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:296: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:299: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/string.h:329: error: expected declaration specifiers or ‘...’ before ‘size_t’ In file included from /usr/include/string.h:417, from complete.c:2: /usr/include/bits/string2.h:969: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c1’ /usr/include/bits/string2.h:971: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c1’ /usr/include/bits/string2.h:979: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c2’ /usr/include/bits/string2.h:982: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c2’ /usr/include/bits/string2.h:991: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c3’ /usr/include/bits/string2.h:994: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c3’ とエラーがでます。どうしたらいいでしょうか?(文字数の関係で半分しか掲載できませんでした。)よろしくお願いいたします。

    • ベストアンサー
    • CGI
  • avr studioのビルドエラーについて

    avr studio 6にてプログラミングしようとしている超初心者です 書き込み機器をmkII、atmega328pに書き込もうとしております しかし、エラーが出てしまい、どうしてもビルドが成功できません。 質問なのですが、こちらのサイト(http://www.diotown.com/creative/2011/05/arduino-de-pwm-controller.h...)にて行っているものを そのままプログラミングしてみようと リンクについていたソース(http://www006.upp.so-net.ne.jp/neueziel/pp/powerpack_r.txt) を #include <avr/io.h>からコピーしてビルドしてみました。 ですが、ビルドがエラー15個、警告5個出てしまいました。 そのうちの数か所を記載しますのでどうすればよいかアドバイスよろしくお願いします。 説明 行 列 プロジェクト (1)エラー 1 unknown type name 'byte' 190 1 VVVF (2)エラー 5 'OUTPUT' undeclared (first use in this function) 291 17 VVVF (3)エラー 9 'HIGH' undeclared (first use in this function) 330 20 VVVF (4)エラー 12 'word' undeclared (first use in this function) 582 26 VVVF (5)エラー 13 expected ';' before 'light' 582 31 VVVF (6)エラー 14 'B00010001' undeclared (first use in this function) 583 14 VVVF (7)警告 4 implicit declaration of function 'pinMode' [-Wimplicit-function-declaration]291 2 VVVF (8)警告 7 implicit declaration of function 'swrite' [-Wimplicit-function-declaration]327 4 VVVF (9)警告 8 implicit declaration of function 'digitalWrite' [-Wimplicit-function-declaration]330 3 VVVF (10)警告 10 implicit declaration of function 'delay' [-Wimplicit-function-declaration] 332 3 VVVF (11)警告 11 implicit declaration of function 'analogRead' [-Wimplicit-function-declaration]344 4 VVVF 以上ですよろしくお願いします

  • Qpopperをインストールできません

    CentOS6.0にqpopper4.0.13をインストールしようとしたのですが、 makeにて下記のようなエラーが出力されます。 どなたかご存知でしたら、ご教授頂けないでしょうか? ---------------- popper.c: In function ‘qpopper’: popper.c:153: error: conflicting types for ‘getline’ /usr/include/stdio.h:673: note: previous declaration of ‘getline’ was here popper.c: In function ‘tgetline’: popper.c:617: 警告: passing argument 1 of ‘getline’ from incompatible pointer type /usr/include/stdio.h:673: note: expected ‘char ** __restrict__’ but argument is of type ‘char *’ popper.c:617: 警告: passing argument 2 of ‘getline’ makes pointer from integer without a cast /usr/include/stdio.h:673: note: expected ‘size_t * __restrict__’ but argument is of type ‘int’ popper.c:617: 警告: passing argument 3 of ‘getline’ from incompatible pointer type /usr/include/stdio.h:673: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘struct POP *’ popper.c:617: 警告: assignment makes pointer from integer without a cast make[1]: *** [popper.o] エラー 1 make[1]: ディレクトリ `/usr/local/src/qpopper4.0.13/popper' から出ます make: *** [popper_server] エラー 2 ------------------- ここにいたるまでの手順です↓ /usr/sbin/useradd -s /dev/null -d /dev/null pop cd /usr/local/src/ tar -xzf qpopper4.0.13.tar.gz cd qpopper4.0.13 ./configure --enable-apop=/etc/pop.auth =--with-popuid=pop make

  • C言語、度々申し訳ございません。コンパイルエラー。

    いつも大変お世話になり誠にありがとうございます。 下記コードがコンパイルエラーになります。 どうしてでしょうか? 度々申し訳ございません。 ご回答の程宜しくお願い申し上げます。 コード #include <stdio.h> int main(void) { int i; printf("1~10までの偶数を出力します。\n"); for(i=1; i<=10; i++){ if((i % 2) == 0) print("%d\n", i); } return 0; } コンパイルエラー C:\MinGW>gcc test21.c -o test21 test21.c: In function 'main': test21.c:10:14: warning: implicit declaration of function 'print' [-Wimplicit-function-declaration] print("%d\n", i); ^~~~~ C:\Users\jump7\AppData\Local\Temp\ccmLpsET.o:test21.c:(.text+0x3f): undefined reference to `print' collect2.exe: error: ld returned 1 exit status 以上です。 度々申し訳ございません。 ご回答の程宜しくお願い申し上げます。

  • C言語のコンパイルエラー

    次のようなコードで (宣言等は省略します) extern int main( int argc, char *argv[]) { short ret ; ret = aaa(); } static short aaa() { /* aaa()関数の処理 */ XXXXXXXXX return 1; } というようなコードをコンパイルすると ワーニングで warning: 'aaa' was declared implicitly `extern' and later `static' warning: previous declaration of `aaa' warning: type mismatch with previous implicit declaration というようなメッセージが出ます。 これは、他のソースをまねて作ってるのですが、 参考にしたコードもこのような宣言の仕方になっているのにエラーはでまでん。 何か他にもaaaという関数の定義をしなくてはいけないのでしょうか? どうもstatic宣言とexternのところがよくわかりません。 宜しくお願いします。

  • WinMainのコンパイルについて

    こんにちわ。 某動画のまねをしてテトリスの作成に取り掛かっているのですが、最初から躓いてしまい困っています。 ◆現象 コンパイル時にWinMainが再宣言されているというような内容のエラーが出てしまい、コンパイルに失敗する D:\tetris>gcc -mwindows tetris.cpp tetris.cpp:18: error: `int WinMain' redeclared as different kind of symbol C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1109: error: previous declaration of `int WinMain(HINSTANCE__*, HINSTANC E__*, CHAR*, int)' tetris.cpp:18: error: declaration of `int WinMain' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1109: error: conflicts with previous declaration `int WinMain(HINSTANCE_ _*, HINSTANCE__*, CHAR*, int)' tetris.cpp:18: error: `HINSTANSCE' was not declared in this scope tetris.cpp:18: error: expected primary-expression before "hPrevInst" tetris.cpp:18: error: expected primary-expression before "cmdLine" tetris.cpp:18: error: expected primary-expression before "int" tetris.cpp:18: error: initializer expression list treated as compound expression tetris.cpp:18: error: expected `,' or `;' before '{' token ◆環境 OS:Windows コンパイラ:MinGW ◆問題個所のソース int WinMain(HINSTANSCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int cmdShow){ WinMainの宣言個所はここだけなのでエラーの意味がよくわからず、色々と調べてみましたが原因はよくわかりませんでした。 Win32APIについてはあまり詳しくないので(C++の原因かもしれませんが)解説できる方がいらっしゃったらご回答願います。

  • ANSI C コンパイルエラー

    下記のファイルをコンパイルする際にCent OS & Windows7 ではReadme 通りにコンパイルできたんですがMac OSX Lion では以下のエラーが出てしまいます。 http://www.itu.int/rec/T-REC-G.711-200911-I!Amd2/en どのようにしたらよいのでしょうかご教示お願いいたします。 コンパイルエラー ーーーーーーーーーーーーーーーーーーーーーーーー make -C src/mainlib "CC=gcc" "CXX=g++" gcc -O2 -Wall -fno-builtin -DWMOPS=1 -DAPPENDIX_I_POSTFILTER -I../basicOp_stl2005_v2.2 -Iutil -Ig711wbe -Ilower_band -Ihigher_band -Iapp1_postfilter -c util/dsputil.c -o util/dsputil.o In file included from ../basicOp_stl2005_v2.2/stl.h:27, from util/dsputil.h:18, from util/dsputil.c:11: ../basicOp_stl2005_v2.2/basop32.h:52: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Overflow’ ../basicOp_stl2005_v2.2/basop32.h:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Carry’ ../basicOp_stl2005_v2.2/basop32.h:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘add’ ../basicOp_stl2005_v2.2/basop32.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘sub’ ../basicOp_stl2005_v2.2/basop32.h:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘abs_s’ ../basicOp_stl2005_v2.2/basop32.h:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘shl’ ../basicOp_stl2005_v2.2/basop32.h:71: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘shr’ . . . . . .

  • C言語 どこがコンパイルエラーか解りません。

    いつも大変お世話になっております。 標記の件。 どこがエラーなのか解りません。 2時間くらい、にらめっこが続いています。 どこがエラーなのか教えて下さい。 ご回答のほどよろしくお願い申し上げます。 コード #include <stdio.h> int a = 0; void func(void) { int c = 2; printf("func関数では変数aとcが使えます。¥n”); printf("変数aの値は%dです。\n",a); /*printf("変数bの値は%dです。\n",b);*/ printf("変数cの値は%dです。\n",c); } int main(void) { int b = 1; printf("main関数では変数aとbが使えます。\n"); printf("変数aの値は%dです。\n", a); printf("変数bの値は%dです。\n", b); /*printf("変数cの値は%dです。\n", c); */ func(); return 0; } コンパイルエラー printf("func関数では変数aとcが使えます。¥n”); ^ text10.c:9:8: error: missing terminating " character printf("func関数では変数aとcが使えます。¥n”); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text10.c:10:34: error: expected ')' before ';' token printf("変数aの値は%dです。\n",a); ^ text10.c:10:1: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion] printf("変数aの値は%dです。\n",a); ^~~~~~ In file included from text10.c:1:0: c:\mingw\include\stdio.h:454:38: note: expected 'const char *' but argument is of type 'int' _CRTIMP __cdecl __MINGW_NOTHROW int printf (const char *, ...); ^~~~~~ text10.c:13:1: error: expected ';' before '}' token } どうかよろしくお願いいたします。

  • incompatible pointer type

    incompatible pointer type への対応方法を教えてください。 環境はMicrochipのXC16 Compiler V1.24です。 エラーの出る行は putsUART1("UART1 Test"); エラーは main.c:76:9: warning: passing argument 1 of 'putsUART1' from incompatible pointer type c:\program files (x86)\microchip\xc16\v1.24\bin\bin\../..\support\peripheral_24F/uart.h:396:45: note: expected 'unsigned int *' but argument is of type 'char *' となっています。 uart.hを見ると void __attribute__ ((section (".libperi"))) putsUART1(unsigned int *buffer); とあるので、求められているものと違う形のものを渡してしまっていることは分かります。 ところが、具体的にどう変更すればいいのかわかりません。 プログラムをどのように書き直したらエラーを無くすことが出来ますか? よろしくお願いします。

  • makeのエラー【g++がみつからない】

    turbolinux10serverにmysqlをインストールしようとしています。 ですが、makeに失敗してしまいます。 エラーは以下のようなものを吐いています。 term.c: In function `term_set': term.c:941: warning: passing arg 3 of `term_alloc' makes pointer from integer without a cast term.c: In function `term_echotc': term.c:1445: warning: assignment makes pointer from integer without a cast ../depcomp: line 512: exec: g++: not found make[2]: *** [my_new.o] Error 127 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 これを見ると、g++がないという旨のメッセージだと思います。 それならばg++をインストールすれば良いか、と思ったのですが、、、 どこにあるのか、また、どうインストールすればよいかが分かりません。 どなたか、ご教授願います。よろしくお願いします。

    • ベストアンサー
    • MySQL