Apache2インストールでpcre_default_tables未定義エラー

このQ&Aのポイント
  • RedHat LinuxにApache2をソースからインストールしようとした際に、pcre_default_tables未定義エラーが発生しました。
  • pcre-6.3.tar.gzを使用して無理やりコンパイルを通すと、util.cでtest_char_tableが未定義エラーとなりました。
  • 同じエラーが2.0.54と2.0.46のApacheバージョンでも発生しています。
回答を見る
  • ベストアンサー

Apache2インストールでpcre_default_tables未定義エラー

こんにちは、honiyonです。  RedHat LinuxにApache2をソースからインストールしようとしています。  tar xzvf で展開し、   ./configure --enable-modules=so --enable-ssl   make  としたところ、 pcre.c: In function `pcre_compile': pcre.c:2534: `pcre_default_tables' undeclared (first use in this function) pcre.c:2534: (Each undeclared identifier is reported only once  とエラーが出ました。  原因が分からなかったので、pcre-6.3.tar.gz を使って無理やり(?)コンパイルを通すと、今度は util.c: In function `ap_find_token': util.c:1456: `test_char_table' undeclared (first use in this function) util.c:1456: (Each undeclared identifier is reported only once util.c:1456: for each function it appears in.) util.c:1456: `T_HTTP_TOKEN_STOP' undeclared (first use in this function) util.c: In function `ap_escape_shell_cmd': util.c:1520: `test_char_table' undeclared (first use in this function) ...~後略~  とエラーが出ました。  Apacheのバージョンは、2.0.54と2.0.46を試していますが、同じエラーとなっています。  う~ん、何か不足しているのでしょうか?  VineLinuxで同様のmakeをした時はすんなり成功しました。  何かお気づきの点がありましたら、是非ご教示ください。  因みに、このLinuxのunameの結果は uname -s Linux uname -m i686 uname -r 2.4.20-8smp uname -v #1 SMP Thu Mar 13 17:45:54 EST 2004  gcc -v は RedHat Linux 3.2.2-5  です。  宜しくお願いします(..

質問者が選んだベストアンサー

  • ベストアンサー
  • entree
  • ベストアンサー率55% (405/735)
回答No.1

PCRE を入れてエラーの内容が変わったと言うことはインストールされている PCRE が邪魔をしているようですね。Apache2 では srclib ディレクトリに PCRE が付属していますが、これが使われる形でないとうまくコンパイルできなかったように思います。 私は OS にインストールされている PCRE でコンパイルしたことがあり、一応コンパイルは通りましたが、結果は CORE ダンプになり起動すらできませんでした。 カーネルのバージョンを見ると Redhat 9 のように見えますが、私は Redhat 9 に Apache2 をインストールしたことが何度もあるので、できないことはないはずです。OS にインストールされている開発環境を見直してみるのも悪くはないでしょう。

honiyon
質問者

お礼

こんにちは、honiyonです。  ご回答有難う御座います(..  原因が分かりました。  原因は消したと思っていたrpmパケッケージのopensslがシステムに残っており、後からソースひパッケージからインストールしたopensslを認識していなかったのが原因でした。  ソースパッケージの方を削除し、改めてopensslとopenssl-develをrpmでインストールしたところ、あっさりmake出来ました。  pcreでエラーが出ているのにopensslが原因とは驚きました(^^;  ご回答有難う御座いました(..    

関連するQ&A

  • Apacheのmake時にエラーが出ます。

    Apacheのmake時にエラーが出ます。 OS:CentOS 5.4上でSSL対応Apcaheをソースからインストールしてるのですが、Apacheのmakeを実行すると、下記のエラーが出ます。 ◎ぐぐったのですけど、解決策を見つけることはできませんでした。 ssl_util_ssl.c: In function ‘SSL_X509_isSGC’: ssl_util_ssl.c:297: error: ‘EXTENDED_KEY_USAGE’ undeclared (first use in this function) ssl_util_ssl.c:297: error: (Each undeclared identifier is reported only once ssl_util_ssl.c:297: error: for each function it appears in.) ssl_util_ssl.c:297: error: ‘sk’ undeclared (first use in this function) ssl_util_ssl.c:306: error: expected expression before ‘)’ token make[3]: *** [ssl_util_ssl.lo] エラー 1 make[3]: ディレクトリ `/usr/local/src/httpd-2.2.15/modules/ssl' から出ます make[2]: *** [all-recursive] エラー 1 make[2]: ディレクトリ `/usr/local/src/httpd-2.2.15/modules/ssl' から出ます make[1]: *** [all-recursive] エラー 1 make[1]: ディレクトリ `/usr/local/src/httpd-2.2.15/modules' から出ます make: *** [all-recursive] エラー 1 ○ここで停止 対応策をご存知の方、教えてください。 ◎コンフィグは、./configure --enable-ssl --with-ssl=/usr/local/ssl で実施してます。 なお、Open_sslは、configure ->make->make installまで完了しています。 Versionは、apache:2.2-15 openssl:0.9.6c です。 宜しくお願いします。

  • エラーの対策

    インターネット上で他の方のC言語ソースコードをダウンロードした、MAKEでコンパイルしたときに、以下のエラーはでました、どうしたらいいでしょうか? gcc -pipe -ansi -c -o base.o base.c base.c: In function `Setup': base.c:535: `S_IFDIR' undeclared (first use in this function) base.c:535: (Each undeclared identifier is reported only once base.c:535: for each function it appears in.) make: *** [base.o] Error 1

  • MinGWとmsysでGTK+の開発環境を整えたい

    WindowsXP上で、コンパイラにMinGWを用いてGTK+2.0を用いたGUIアプリケーションの開発を行いたいと思っています。 しかし、GTK+2.0のサンプルソースのコンパイルが通りません。 コマンドとそのエラーは以下の通りです。 どうもヘッダーが見つからないと言っているようですが、ヘッダーをコンパイラのincludeフォルダに入れても駄目でした。 いれたGTK+はGlade等、全てがパックになっているものでした。インストール時にmsysを認識してくれていたので、勝手に設定をしてくれるのかと思ったのですが…。 $ gcc hello_gtk.c 'pkg-config gtk+-2.0 --cflags' hello_gtk.c:1:21: gtk/gtk.h: No such file or directory hello_gtk.c: In function `main': hello_gtk.c:5: error: `GtkWidget' undeclared (first use in this function) hello_gtk.c:5: error: (Each undeclared identifier is reported only once hello_gtk.c:5: error: for each function it appears in.) hello_gtk.c:5: error: `window' undeclared (first use in this function) hello_gtk.c:6: error: `label' undeclared (first use in this function) hello_gtk.c:10: error: `GTK_WINDOW_TOPLEVEL' undeclared (first use in this function) gcc.exe: pkg-config gtk+-2.0 --cflags: No such file or directory どうすれば、コンパイルできるようになるのでしょう?

  • コンパイルエラーの原因がわからず困っています。

    こんにちわ。いつもお世話になっております。 自分で構造体を定義して、それを使ってみたのですがコンパイルエラーが出てしまいます。何がいけないのでしょうか。 以下がそのプログラムです。 struct list { struct list *prev; struct in_addr ip_src, ip_dst; u_short th_sport; u_short th_dport; struct list *next; }; void main (u_char * args, const struct pcap_pkthdr *header, const u_char * packet) { static int count = 1; const sturct list *flow; return; } 以上です。 エラー内容は test.c: In function ‘main’: test.c:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘list’ test.c:17: error: ‘list’ undeclared (first use in this function) test.c:17: error: (Each undeclared identifier is reported only once test.c:17: error: for each function it appears in.) test.c:17: error: ‘flow’ undeclared (first use in this function) 以上です。 どんな些細な意見でも構いませんので、何か気が付かれたら教えて頂けないでしょうか。どうぞよろしくお願いします。

  • gettidについて

    プログラムでgettid関数を使用しようとしているのですが、コンパイルでエラーが出てしまいます。 カーネルは2.4.18です。 以下のようなエラーメッセージです。 In function `gettid': `__NR_gettid' undeclared (first use in this function) (Each undeclared identifier is reported only once for each function it appears in.) 一応調べて書式通り記述しているつもりなのですが。 #include <sys/types.h> #include <linux/unistd.h> #include <errno.h> _syscall0(pid_t,gettid) pid_t gettid(void); どなたか原因にあたりがつく方おられましたら、ご助言いただけないでしょうか。 よろしくお願い致します。

  • gccですが、コンパイルができません!

    以下のプログラムですが #include <stdio.h> int main() { Int col; char i; scanf( "%d", &col ); for( i = 0 ; i < 26 ; i++ ){ if( i > 0 && ( i % col ) == 0 ) printf( "\n" ); printf( "%c", 'a' + i ); } return 0; } 以上のプログラムをgccでコンパイルしました。 コンパイルするために入力した文字→  gcc p.c -o p.exe 以下のエラーがでてコンパイルできません。 p.c: In function `main': p.c:4: error: `Int' undeclared (first use in this function) p.c:4: error: (Each undeclared identifier is reported only once p.c:4: error: for each function it appears in.) p.c:4: error: syntax error before "col" p.c:7: error: `col' undeclared (first use in this function) p.c:17:2: warning: no newline at end of file  以上なぜコンパイルができないのですか? よろしくお願いいたします。

  • このプログラム見てもらえますか?

    問題は十進数二桁の正整数をgetchar()を用いて文字型の変数xとyから元の10進二桁の正整数を復元して整数型変数zに格納せよ zをprintf()で出力し正しく格納されていることを格納せよ。です #include<stdio.h> int main(void) { char x[256],y[256]; int z; printf("整数を一文字入力して下さい。\n"); x=getchar(); printf("整数を一文字入力して下さい。\n"); y=getchar(); z=x*10+y; printf("%d\n",z); return(0); } これをコンパイルすると kadai5-5.c: In function `main': kadai5-5.c:9: incompatible types in assignment kadai5-5.c:11: incompatible types in assignment kadai5-5.c:12: `zyuu' undeclared (first use in this function) kadai5-5.c:12: (Each undeclared identifier is reported only once kadai5-5.c:12: for each function it appears in.) kadai5-5.c:13: `iti' undeclared (first use in this function) kadai5-5.c:14: invalid operands to binary + こう表示されます。 C言語の参考書片手に試行錯誤してるんですがなかなかできません。 よろしくおねがいします。

  • ./configureのエラー

    DEC XP1000 に フリーソフトの「ImageMagick」を インストールしたいのですが、 jpegライブラリがうまく ビルドできません。 jpegライブラリ単体での makeとinstallは うまく行ったのですが、 全体での./configureで jpegだけうまく行きません。 configのログを見ると、下記のconfdefs.hが 出てくる度に引っかかっているようです。 このファイルをWWWで検索するとヒットするのですが、 具体的に説明しているHPは見つかっていません。 どなたか、アドバイスや関連HPを教えていただければ、 助かります。 よろしくお願いします。 configure: failed program was: #line 1736 "configure" #include "confdefs.h" int main () { #ifndef __CYGWIN__ # define __CYGWIN__ __CYGWIN32__ #endif return __CYGWIN__; ; return 0; } configure:1758: result: no configure:1762: checking for mingw32 environment configure:1778: gcc -c -O conftest.c >&5 configure: In function `main': configure:1773: `__MINGW32__' undeclared (first use in this function) configure:1773: (Each undeclared identifier is reported only once configure:1773: for each function it appears in.) configure: failed program was:

  • プログラムのご指摘

    ファイルを読み込み、英字のみか、先頭が英字で二文字目以降が英字または数字である文字列を出力するプログラムを作りたいです。 #include<string> #include<fstream> #include<cctype> #include<iostream> int main (){ char c; std::string key; std::ifstream fin( "1234.txt"); if( fin.fail() ){ std::cerr << "ファイルを開けませんでした" << std::endl; exit(1); } while (fin >> get(c)){ if(!isalpha(c)) continue; key = tolower(c); while (fin >> get(c)){ if (!isalnum(c)){ key.unget(); break; } key = tolower(c); } break; std::cout << key; } } このようなプログラムを作りましたが、↓のエラーが出ていました。 どなたご指摘願います。 エラーメッセージ: sou2-1.cpp: In function `int main()': sou2-1.cpp:20: error: `get' undeclared (first use this function) sou2-1.cpp:20: error: (Each undeclared identifier is reported only once for each function it appears in.) sou2-1.cpp:25: error: `unget' undeclared (first use this function)

  • エラーが出てコンパイルができません…

    #include<stdio.h> void main(void) { int i; i=0; while(i<3){ printf("おーい\n\"); printf(" やっほー\n\n\"); i=i+1; } printf("プログラムを終了します\"); } と本に書いてあった通りに入力したら、下のようなエラーが出てきました。 7: 文法エラー before \"i\" 9: stray \'\\\' in program 10: stray \'\\\' in program 10: 文法エラー before \"n\" 11: stray \'\\\' in program 11: 文法エラー before \"n\" 12: `i\' undeclared (first use in this function) 12: (Each undeclared identifier is reported only once 12: for each function it appears in.) トップレベル: 15: error: 文法エラー before string constant 15: conflicting types for built-in function `printf\' 15: data definition has no type or storage class 16:2: ファイル末尾に改行がありません 解決策と原因を教えて下さい。 宜しくお願い致します。