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

このQ&Aのポイント
  • turbolinux10serverにmysqlをインストールしようとしていますが、makeに失敗してしまいます。
  • エラーメッセージから推測すると、g++が見つからないためにエラーが発生しているようです。
  • g++のインストール方法を教えていただきたいです。
回答を見る
  • ベストアンサー

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
  • 回答数4
  • ありがとう数2

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

  • ベストアンサー
noname#39970
noname#39970
回答No.4

解決できてなかったのね(^^;; うまくいかなかったときのconfigureをやったやつのままだとうまくいかない場合が。 アーカイブをもう一度別で展開(削除してから展開でも可)してconfigureからやりなおしてみて。 因みに 前のままでconfigureしたら上書きされるだろうと考えるかもしれないけどそれは誤り。 結果をキャッシュしてあって、それを採用してしまうので意味がない。 configureのオプションでキャッシュを切ったり、結果を一旦真っ新にするものがあるかもしれないけどよくわからないので手っ取り早く一旦消すかな・・・自分なら。 それと一応、MySQLに必要なライブラリが抜けてないか確認してみてね。 自分とこでやったconfigureを「参考に」載せとくね(1行。長いよ) CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static

その他の回答 (3)

noname#39970
noname#39970
回答No.3

>「最初から入っていた」 パッケージ管理もソースからインストールもよくわからないという事になるのかな。 そしたらここを紹介しておくね http://oku.edu.mie-u.ac.jp/~okumura/linux/?GCC ここだけじゃなくても良いけど、これを参考にしてg++を入れると目的達成。の筈。(gcc、cppも入れた方が…) aptが使えない場合は別途aptやportを調べてみて。 ソースが要るなら導入しようとしているMySQLのverが要求するgccのverをよく調べてNo1に載せた所から持ってくると良いよ。 大まかにはgccは2.x系、3.x系、4.x系になるけど、恐らく3.x系の新しいのが有れば大丈夫だと思うよ

mhiro_december
質問者

補足

ありがとうございます。 gcc3.4.6をインストールした上で、再度mysqlのmakeを試みました。 が、今度は以下のようなエラーが出ました。 if test -f y.output; then \ mv y.output sql_yacc.output; \ fi sed '/^#/ s|y\.tab\.c|sql_yacc.cc|' y.tab.c >sql_yacc.cct && mv sql_yacc.cct sql _yacc.cc sed: can't read y.tab.c: No such file or directory make[2]: *** [sql_yacc.cc] Error 2 make[2]: Leaving directory `/usr/local/mysql-5.0.37/sql' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/mysql-5.0.37' make: *** [all] Error 2 これはy.tab.cが無いからか、と解釈し、bison1.28をソースから インストールして、再度試みましたが、やはり同様のエラーがでます。 何度も申し訳ないですが、再度助言をお願いします。

noname#39970
noname#39970
回答No.2

>gccがあればg++もあるはずだろう、ということですか? 違う。 ・パッケージ管理による入手であるのか ・ソースをmakeして入れたのか ・実は最初から入ってたのか 上2つだとg++を指定していなかったから入っていないというのは確か。 新しい物を導入する場合、どのようにして導入したの? それぞれで取り方が変る。と言っているだけ。

mhiro_december
質問者

補足

ここで「入手」と言われている対象はgccのことですよね? その前提ですと、「最初から入っていた」ということになります。 どのように導入すればよいか、教えて下さい。お願い致します。

noname#39970
noname#39970
回答No.1

gccをどうやって導入したのか。 http://directory.fsf.org/GNU/gcc.html

mhiro_december
質問者

補足

gccがあればg++もあるはずだろう、ということですか? そこが分からないポイントなのです。かなり初心者な質問でしょうが、 どなたか、もう少しヒントを頂けると助かります。

関連するQ&A

  • 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 で確認) どうぞ宜しくお願いいたします。

  • apache2.0へのPHP4導入時にエラーがでます。

    現在apache2.0にPHP4.2.2を導入しようとしていますが、PHPのmake時にエラーが出てしまいます。 具体的には以下のようなメッセージを出力してmakeが止まります。 sapi_apache2.c: In function `php_register_hook': sapi_apache2.c:534: warning: passing arg 3 of `ap_register_output_filter' makes pointer from integer without a cast sapi_apache2.c:534: too few arguments to function `ap_register_output_filter' sapi_apache2.c:535: warning: passing arg 3 of `ap_register_input_filter' makes pointer from integer without a cast sapi_apache2.c:535: too few arguments to function `ap_register_input_filter' またconfigureは以下のように実行しています。 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pgsql=/usr/local/pgsql/ --enable-mbstring --enable-mbstr-enc-trans --enable-trans-sid --enable-versioning --enab le-mbregex apache2.0の方はDSOを使えるようになっています。 webで調べたところ、sapi/apache2filter/php_functions.cを修正すればよいとの情報があったのでこのファイルの93行目を #if !MODULE_MAGIC_AT_LEAST(20020506,0)        ↓ #if !AP_MODULE_MAGIC_AT_LEAST(20020506,0) に変更した後、同じ手順でmakeしましたがだめでした。 PHP4.2のapache2.0への対応がexperimentalなのは承知していますが、なんとかして現段階でインストールしたいと思っています。 どなたか情報をお願い致します。

  • ポインタ型の関数のコンパイル

    Cについて勉強中の一回生です 今回初めてポインタ型の関数を作ったのですが コンパイルができません エラー内容は warning: assignment makes pointer from integer without a cast warning: assignment makes pointer from integer without a cast でした。 型があってないっぽいのですがどうしてできないのですか? struct node { int key; struct node *parent,*left,*right; }; struct node *memvber_recursive(int key,struct node *root){ struct node *x; if(root->key == 0){ printf("ありません\n",root->key); return NULL; } else if(root->key == key) printf("あります\n",root->key); else if(root->key > key) x = member_recursive(key,root->left); else x = member_recursive(key,root->right); return x; } 課題の内容は再帰を使った二分木の探索です 引数は、探索する要素の値(キー)と2分探索木の根のポインタ 戻り値は要素が見つかればその点を示すポインタを、見つからなければNULLを返します あと関数の前にアスタリスクがつく意味がわかりません ポインタを返すと言う意味ですか? 先生が例文として与えてくれたのですが こんな形は教科書にのっておらず困っています よかったら教えて下さい 宜しくお願いします。

  • 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 です。 宜しくお願いします。

  • apache make時のエラーで困っています

    お世話になります。 apache をソースからインストールしなければならないのですが、以下のエラーが出ており、解決できません。お力をお借りできますでしょうか。 ■エラー内容------------------------------------------------- In file included from /usr/include/apr-1/apr_ldap.h:120, from /home/***/httpd-2.2.6/include/util_ldap.h:31, from exports.c:38: /usr/include/apr-1/apr_ldap_init.h:112: error: expected declaration specifiers or '...' before 'LDAP' In file included from /usr/include/apr-1/apr_ldap.h:121, from /home/***/httpd-2.2.6/include/util_ldap.h:31, from exports.c:38: /usr/include/apr-1/apr_ldap_option.h:204: error: expected declaration specifiers or '...' before 'LDAP' /usr/include/apr-1/apr_ldap_option.h:226: error: expected declaration specifiers or '...' before 'LDAP' In file included from exports.c:38: /home/***/httpd-2.2.6/include/util_ldap.h:82: error: 'LDAP_DEREF_NEVER' undeclared here (not in a function) /home/***/httpd-2.2.6/include/util_ldap.h:83: error: 'LDAP_DEREF_SEARCHING' undeclared here (not in a function) /home/***/httpd-2.2.6/include/util_ldap.h:84: error: 'LDAP_DEREF_FINDING' undeclared here (not in a function) /home/***/httpd-2.2.6/include/util_ldap.h:85: error: 'LDAP_DEREF_ALWAYS' undeclared here (not in a function) /home/***/httpd-2.2.6/include/util_ldap.h:90: error: expected specifier-qualifier-list before 'LDAP' make[2]: *** [exports.lo] エラー 1 make[2]: ディレクトリ `/home/***/httpd-2.2.6/server' から出ます make[1]: *** [all-recursive] エラー 1 make[1]: ディレクトリ `/home/***/httpd-2.2.6/server' から出ます make: *** [all-recursive] エラー 1 ------------------------------------------------------------------ OS:openSUSE 10.2 apacheのソース:httpd-2.2.6 ディレクトリ /home/***/下にソースを展開&makeしています。 openldapのインストールが必要かと思い、openldap2 2.3.27をインストールしてみましたが、変化がありませんでした。 また、configureオプションが問題かと思い、オプションを何もつけない状態で試しましたが、やはり同じエラーになります。 別環境のopenSUSE 10.0では、同じソースを使って問題なく、make、installができます。 原因として何が考えられますでしょうか。 よろしくお願いいたします。

  • 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

  • 警告をださずにポインタにnullを渡す方法は?

    こんにちは。 ポインタ型の引数にNULLを渡してやりたいのですが 以下のような警告がでてしまいます。 test.c: In function 'test_': test.c:14: 警告: passing argument 2 of 'test' makes pointer from integer without a cast 問題の箇所は以下のように書いてます。 【test.c】 ~省略~ /** プロトタイプ **/ 7 void aaa(int,int*,int*); ~省略~ 14 aaa(0,NULL,&tv); NULLを渡したい場合、警告をださないように スマートに記述するにはどうしたらいいでしょうか? よろしくお願いします。

  • makeで出るエラーが解決出来ません

    centOS5.3にsqliteを入れようと思い、 http://d.hatena.ne.jp/sotarok/20080607/php_5_with_sqlite こちらを参考にインストールしてみたんですが、 「make」 でエラーとなり、インストールが出来ません・・・。 エラー内容は・・・ /bin/sh /usr/local/src/php-5.2.10/ext/sqlite/libtool --mode=compile gcc -I/usr/local/src/php-5.2.10/ext/sqlite/libsqlite/src -I./libsqlite/src -I/usr/include/php/ext -I. -I/usr/local/src/php-5.2.10/ext/sqlite -DPHP_ATOM_INC -I/usr/local/src/php-5.2.10/ext/sqlite/include -I/usr/local/src/php-5.2.10/ext/sqlite/main -I/usr/local/src/php-5.2.10/ext/sqlite -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c -o sqlite.lo mkdir .libs gcc -I/usr/local/src/php-5.2.10/ext/sqlite/libsqlite/src -I./libsqlite/src -I/usr/include/php/ext -I. -I/usr/local/src/php-5.2.10/ext/sqlite -DPHP_ATOM_INC -I/usr/local/src/php-5.2.10/ext/sqlite/include -I/usr/local/src/php-5.2.10/ext/sqlite/main -I/usr/local/src/php-5.2.10/ext/sqlite -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c -fPIC -DPIC -o .libs/sqlite.o /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:211:65: error: macro "ZEND_ME_MAPPING" passed 4 arguments, but takes just 3 /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:213:60: error: macro "ZEND_ME_MAPPING" passed 4 arguments, but takes just 3 /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:211: error: 'ZEND_ME_MAPPING' undeclared here (not in a function) /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:213: error: expected '}' before 'ZEND_ME_MAPPING' /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:214:64: error: macro "ZEND_ME_MAPPING" passed 4 arguments, but takes just 3 ~略~ /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:265:45: error: macro "ZEND_ME_MAPPING" passed 4 arguments, but takes just 3 /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c: In function 'sqlite_get_iterator': /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1017: error: 'E_RECOVERABLE_ERROR' undeclared (first use in this function) /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1017: error: (Each undeclared identifier is reported only once /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1017: error: for each function it appears in.) /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1017: warning: passing argument 1 of 'zend_error' makes integer from pointer without a cast /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c: At top level: /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1028: error: parameter 1 has incomplete type /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c: In function 'PHP_GINIT_FUNCTION': /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1028: error: parameter name omitted /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1030: error: invalid type argument of '->' /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1030: error: request for member 'assoc_case' in something not a structure or union /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c: In function 'zm_startup_sqlite': /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1051: warning: assignment from incompatible pointer type /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1059: warning: assignment from incompatible pointer type /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c: In function 'php_sqlite_fetch': /usr/local/src/php-5.2.10/ext/sqlite/sqlite.c:1463: warning: assignment makes pointer from integer without a cast make: *** [sqlite.lo] Error 1 です。 原因がお分かりの方がおられましたらご教授お願いいたします。

  • C言語のバグの警告文について

    こんばんわ。 C++でプログラムを作成中なのですが警告文の意味がわからないので教えていただきたいです。 警告文 SAMPLE.c: 181 : warning: passing argument 4 of fwrite' makes pointer from integer without a cast /usr/include/stdio.h:688: note: expected 'struct FILE * __restrict__' but argument is of type 'int' どうぞよろしくお願いいたします。

  • makeコマンドのエラーについて(

    UNIX(Linux)系のOSやC言語には不慣れなのですが、よろしくお願いします。 普段はWindows7(Home Ed.)を利用しているのですが、 いくつかのlinux系のソフトを利用する際にcygwinも利用しています。 ========================================================== cygwinにソフトウェアをインストールしようとする際に、 ときどき遭遇するエラーなのですが 仮にsoftware.tar.gzというソースファイルからインストールしようとして、 > gunzip -c software.tar.gz | tar xvf - > cd software > ./configure > make ..... make: *** [all-recursive] error というエラーが生じて、makeが通らない時があります。 ========================================================= これまで何度か、どういうエラーなのか調べようとする度に挫折し、 何回かやり直している内に、たまたまmakeがすんなり通って インストールできてしまったりしていたので、 なんとなくうやむやにしていました。 そもそも、この"all-recursive"に全くピンとこないのですが、 これはどういった場合に生じるエラーを示しているのでしょうか? recursive(再帰的な)だから、関数かなにかの呼び出しに失敗している、 とかそういうことなのでしょうか? エラーの内容はケースバイケースだし、 漠然とした質問になって申し訳ないのですが、 ちょっとしたアドバイスでもいいので、ご回答をお願いします。