質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Q&A

解決済

1回答

954閲覧

ubuntuでターミナルのエラーメッセージの読み方を知りたい[1/2]

programan

総合スコア25

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

0グッド

0クリップ

投稿2018/08/09 18:04

編集2018/08/10 02:23

前提・実現したいこと

ns-3を使用して他人が作成したプログラムをビルドしてみようとした結果以下のエラーが出ました。
たくさんのエラーメッセージが出て、どのエラーを直すべきかわかりませんでした。
このような時のエラーメッセージの読み取り方と対処方法を教えていただきたいです。

エラーメッセージが長すぎてわかりづらくなってしまいましたがご教授お願いします。

文字数が10000文字を超えてしまったため二つに分けて投稿します。
エラーの続きは以下のリンクです。
https://teratail.com/questions/140487

発生している問題・エラーメッセージ[1/2]

***@***-VirtualBox:~/ns-allinone-3.27/ns-3.27$ ./waf build Waf: Entering directory `/home/***/ns-allinone-3.27/ns-3.27/build' [ 977/2438] Compiling examples/routing/global-routing-slash32.cc [ 991/2438] Compiling examples/traffic-control/red-vs-fengadaptive.cc [1006/2438] Compiling examples/wireless/wifi-simple-interference.cc [1010/2438] Compiling examples/wireless/wifi-ap.cc [1016/2438] Compiling src/wimax/examples/wimax-multicast.cc [1043/2438] Compiling src/wimax/model/wimax-mac-header.cc [1046/2438] Compiling src/wifi/examples/wifi-manager-example.cc [1050/2438] Compiling src/wifi/helper/yans-wifi-helper.cc [1068/2438] Compiling src/wifi/model/originator-block-ack-agreement.cc [1085/2438] Compiling src/wifi/model/mac-tx-middle.cc [1132/2438] Compiling build/src/stats/bindings/ns3module.cc [1143/2438] Compiling src/stats/model/data-collection-object.cc [1146/2438] Compiling src/stats/model/time-data-calculators.cc [1155/2438] Compiling src/spectrum/model/non-communicating-net-device.cc [1165/2438] Compiling src/spectrum/model/spectrum-propagation-loss-model.cc [1173/2438] Compiling src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc [1191/2438] Compiling src/network/utils/packet-burst.cc [1196/2438] Compiling src/network/utils/ethernet-header.cc [1216/2438] Compiling src/muddy-children-puzzle/model/muddy_protocol.pb.cc In file included from ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc:4:0: ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^ In file included from ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc:4:0: ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:142:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:259:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:448:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:554:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:653:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:752:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:857:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:962:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.h:1076:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc: In function ‘void protobuf_muddy_5fprotocol_2eproto::protobuf_AssignDescriptors()’: ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc:374:38: error: cannot convert ‘google::protobuf::MessageFactory*’ to ‘google::protobuf::Metadata*’ for argument ‘5’ to ‘void google::protobuf::internal::AssignDescriptors(const string&, const google::protobuf::internal::MigrationSchema*, const google::protobuf::Message* const*, const uint32*, google::protobuf::Metadata*, const google::protobuf::EnumDescriptor**, const google::protobuf::ServiceDescriptor**)’ file_level_metadata, NULL, NULL); ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc: In static member function ‘static const google::protobuf::Descriptor* protocol::Header::descriptor()’: ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc:477:67: error: ‘kIndexInFileMessages’ was not declared in this scope return ::protobuf_muddy_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc: In member function ‘virtual google::protobuf::Metadata protocol::Header::GetMetadata() const’: ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc:703:67: error: ‘kIndexInFileMessages’ was not declared in this scope return ::protobuf_muddy_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages]; ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc: In static member function ‘static const google::protobuf::Descriptor* protocol::Packet::descriptor()’: ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc:916:67: error: ‘kIndexInFileMessages’ was not declared in this scope return ::protobuf_muddy_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc: In member function ‘virtual google::protobuf::Metadata protocol::Packet::GetMetadata() const’: ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc:1413:67: error: ‘kIndexInFileMessages’ was not declared in this scope return ::protobuf_muddy_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages]; ^ ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc: In static member function ‘static const google::protobuf::Descriptor* protocol::State::descriptor()’: ../src/muddy-children-puzzle/model/muddy_protocol.pb.cc:1467:67: error: ‘kIndexInFileMessages’ was not declared in this scope return ::protobuf_muddy_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; ^

試したこと

ns-3のサンプルコードは動かすことができました。

補足情報(FW/ツールのバージョンなど)

ubuntu16.04

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

確かに沢山、エラーは出ていますが、ほとんどは類似。

..../muddy_protocol.pb.h:17:2: error: #error This file was generated by an older version of protoc

.../muddy_protocol.pb.h:142:10: error: ‘PROTOBUF_CONSTEXPR’ does not name a type ...

.../muddy_protocol.pb.cc:477:67: error: ‘kIndexInFileMessages’ was not declared in this scope ....

あたりでしょうか? 一つエラーが起きると同じ変数とかを参照している箇所全てがエラーになっています。 最初から地道につぶして行きましょう。
なんか、古いコードをコンパイルしているために発生したエラーっぽいみたいですね。


ところで、ログに個人名出ていません?

投稿2018/08/10 00:53

pepperleaf

総合スコア6383

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

programan

2018/08/10 02:32

回答とご指摘ありがとうございます。 エラーが出たら最初のエラーメッセージから潰していくのがいいのですね。
programan

2018/08/10 17:17

これらのエラーはprotocol bufferのバージョンを変更することで解決することができました。 ありがとうございました。 解決したら新たなエラーが出てしまいましたが、、、 この調子でエラー解決していきたいと思います。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問