プロジェクト

全般

プロフィール

バグ #3734

trunkがコンパイルできない?

kanehiro7年以上前に追加. 7年以上前に更新.

ステータス:
終了
優先度:
通常
担当者:
-
対象バージョン:
-
開始日:
2016/11/28
期日:
進捗率:

100%

予定工数:

説明

ubuntu14.04LTSの64bitですが、trunkをコンパイルすると、

libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginS.o  .libs/CORBA_IORUtil.o .libs/NVUtil.o .libs/RTCUtil.o .libs/DefaultPeriodicTask.o .libs/FactoryInit.o .libs/CorbaNaming.o .libs/Factory.o .libs/ECFactory.o .libs/Manager.o .libs/ManagerConfig.o .libs/ModuleManager.o .libs/NamingManager.o .libs/NumberingPolicy.o .libs/ManagerServant.o .libs/SystemLogger.o .libs/LocalServiceAdmin.o .libs/ManagerActionListener.o .libs/DataFlowComponentBase.o .libs/ExecutionContextBase.o .libs/ExecutionContextProfile.o .libs/RTObjectStateMachine.o .libs/ExecutionContextWorker.o .libs/PeriodicExecutionContext.o .libs/ExtTrigExecutionContext.o .libs/OpenHRPExecutionContext.o .libs/PortAdmin.o .libs/RTObject.o .libs/ConfigAdmin.o .libs/ComponentActionListener.o .libs/ConfigurationListener.o .libs/SdoConfiguration.o .libs/SdoServiceAdmin.o .libs/SdoOrganization.o .libs/PeriodicECSharedComposite.o .libs/InPortConnector.o .libs/OutPortConnector.o .libs/OutPortPullConnector.o .libs/OutPortPushConnector.o .libs/InPortPullConnector.o .libs/InPortPushConnector.o .libs/ConnectorListener.o .libs/PortConnectListener.o .libs/CorbaPort.o .libs/InPortBase.o .libs/InPortProvider.o .libs/OutPortBase.o .libs/OutPortProvider.o .libs/PortBase.o .libs/PublisherFlush.o .libs/PublisherNew.o .libs/PublisherPeriodic.o .libs/CdrRingBuffer.o .libs/InPortCorbaCdrProvider.o .libs/OutPortCorbaCdrConsumer.o .libs/OutPortCorbaCdrProvider.o .libs/InPortCorbaCdrConsumer.o .libs/InPortDirectProvider.o .libs/InPortDirectConsumer.o  -Wl,--whole-archive ../../../src/lib/rtm/idl/.libs/libRTCSkel.a -Wl,--no-whole-archive  -Wl,-rpath -Wl,/home/kanehiro/src/OpenRTM-aist/src/lib/coil/lib/.libs -Wl,-rpath -Wl,/home/kanehiro/openrtp/lib -L../../../src/lib/rtm/idl ../../../src/lib/coil/lib/.libs/libcoil.so -L../../../../src/lib/rtm -L../../../../src/lib/rtm/idl -luuid -ldl -lpthread -lomniORB4 -lomnithread -lomniDynamic4 -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.8/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o    -Wl,-soname -Wl,libRTC-1.2.0.so -o .libs/libRTC-1.2.0.so
.libs/RTObject.o:(.data.rel.local+0x0): multiple definition of `openrtm_name'
.libs/ManagerConfig.o:(.data.rel.local+0x0): first defined here
.libs/RTObject.o:(.data.rel.local+0x8): multiple definition of `openrtm_version'
.libs/ManagerConfig.o:(.data.rel.local+0x8): first defined here
.libs/RTObject.o:(.data.rel.local+0x10): multiple definition of `corba_name'
.libs/ManagerConfig.o:(.data.rel.local+0x10): first defined here
collect2: error: ld returned 1 exit status
make[5]: *** [libRTC.la] エラー 1
make[5]: ディレクトリ `/home/kanehiro/src/OpenRTM-aist-trunk/src/lib/rtm' から出ます

となります。
ManagerConfig.cpp、RTObject.cppがDefaultConfiguration.hを介してversion.hをインクルードしているのが原因のようですが…

関係しているリビジョン

リビジョン 2807 (差分)
kawauchi が7年以上前に追加

[compat,bugfix,->RELENG_1_2] Definition of version.h has been modified. refs #3734

リビジョン 2807 (差分)
kawauchi が7年以上前に追加

[compat,bugfix,->RELENG_1_2] Definition of version.h has been modified. refs #3734

リビジョン 2810 (差分)
kawauchi が7年以上前に追加

[compat,->RELENG_1_2] Include guard has been added to version.h. refs #3734

リビジョン 2810 (差分)
kawauchi が7年以上前に追加

[compat,->RELENG_1_2] Include guard has been added to version.h. refs #3734

リビジョン 3098 (差分)
n-ando6年以上前に追加

merged changes from trunk/OpenRTM-aist r2807 during 2016-12:
[compat,bugfix,->RELENG_1_2] Definition of version.h has been modified. refs #3734
[compat,bugfix,->RELENG_1_2] Delete unnecessary file. refs #3709
[compat,->RELENG_1_2] Installer creation process has been deleted. refs #3436
[compat,->RELENG_1_2] Include guard has been added to version.h. refs #3734
[compat,->RELENG_1_2] Project file generation processing for Visual Studio has been organized. refs #3742
[compat,->RELENG_1_2] Setting for Visual Studio vc8 have been deleted. refs #3742

リビジョン 3098 (差分)
n-ando6年以上前に追加

merged changes from trunk/OpenRTM-aist r2807 during 2016-12:
[compat,bugfix,->RELENG_1_2] Definition of version.h has been modified. refs #3734
[compat,bugfix,->RELENG_1_2] Delete unnecessary file. refs #3709
[compat,->RELENG_1_2] Installer creation process has been deleted. refs #3436
[compat,->RELENG_1_2] Include guard has been added to version.h. refs #3734
[compat,->RELENG_1_2] Project file generation processing for Visual Studio has been organized. refs #3742
[compat,->RELENG_1_2] Setting for Visual Studio vc8 have been deleted. refs #3742

履歴

#1 n.kawauchi7年以上前に更新

  • 進捗率0 から 50 に変更

ロボットソフトウエアプラットフォーム研究チーム テクニカルスタッフ 河内です

こちらで確認したところコンパイルが通りましたので、お知らせいたします。

Ubuntu14.04 64bit環境は以前に構築していたものを利用しましたが、gccすらインストールしていない状態でしたので、
下記スクリプトをダウンロードして実行しました。
http://svn.openrtm.org/OpenRTM-aist/tags/RELEASE_1_1_2/OpenRTM-aist/build/pkg_install_ubuntu.sh

$ sudo sh pkg_install_ubuntu.sh -s

この環境でtrunkソースをコンパイルすると、boostのエラーとなるので、追加で libboost-filesystem-dev をインストールしました。
これで、make, make dist もOKでした。

以上、よろしくお願いいたします。

#2 kanehiro7年以上前に更新

ご確認頂きありがとうございます。
まっさらなソースツリーをcheckoutすればコンパイルできることを確認しました。
自動生成されるversion.h内の文字列が以前は
const char *
だったのがr2774で
static const char *
に修正されたようですが、その修正がMakefile.amに入ってもversion.hが更新されなかったようです。
version.hが更新されるようにする、またmake distcleanしたらversion.hも消すようにする、等して頂けると助かります。

#3 n.kawauchi7年以上前に更新

  • 進捗率50 から 100 に変更

詳細な情報、ありがとうございます。

金広さんと同じエラーを確認できました。
r2774の修正が影響しているとのことでしたので、その前のr2760のソースをmakeし、その後最新版にupdateしての確認です。
make distcleanを実行されたとのことでしたので、こちらでも同じ操作をしました。
この場合、確かに OpenRTM-aist/src/lib/rtm/version.h が残ることを確認しました。

make distcleanではなく、make maintainer-cleanをお使いください。これですとversion.hは残りません。
私の作業では、いつもmake maintainer-cleanを使っているので、この状況に気づかず申し訳ございませんでした。

以上、よろしくお願いいたします。

#4 kanehiro7年以上前に更新

make maintainer-cleanの件、承知しました。
Makefile.amが変更されたらversion.hを生成し直すようにするのは難しいでしょうか?
こちらではcheckout済み、ビルド済みのソースツリーでsvn updateしてmake installする、というのを日常的にやっていて、毎回完全にクリーンにするというのはしていないので。

#5 n.kawauchi7年以上前に更新

遅くなって申し訳ございませんでした。 r2807 で対応しました。
Makefile.amが変更されればversion.hは生成し直され、make distcleanで削除される動作を確認しました。

以上、よろしくお願いいたします。

#6 kanehiro7年以上前に更新

  • ステータス新規 から 終了 に変更

ありがとうございました。

他の形式にエクスポート: Atom PDF