[openrtm-beginners:00536] Ubuntu 12.04 64bit環境におけるRTCBuilderに生成されたCMakeLists.txtからのビルド

sase sase @ scc.ist.hokudai.ac.jp
2014年 8月 12日 (火) 15:08:36 JST


北海道大学の佐瀬です。
初歩的なことかもしれませんが、RTCBuilderが生成するCMakeList.txtからRTCのビルドについて質問させていただきます。
※類似の問題は[openrtm-users 02914] で投稿されていますが、特に議論されていないようでした。
つまずいた点はおおむね解決できたのですが、合理的な方法なのかどうか判断できずアドバイスをいただきたく存じます。

OS: Ubuntu 12.04.4 LTS x86_64
OpenRTP: OpenRTP 1.1.0-RC4 Linux(64bit)用全部入り

openrtmをインストールすると、ライブラリなどが

 /usr/lib64/openrtm-1.1

に配置されました。

その関係かと思われますが、RTCBuilderが生成したCMakeList.txtをそのままcmakeするとエラーが発生しました。(メッセージの全文はメールの最後に張り付けます。)
これを解決するために以下のような対処をしてcmake, make, 実行を行うことができています。

1. CMakeList.txtの find_package(OpenRTM) の直前に、下記を追加。
 set(CMAKE_MODULE_PATH "/usr/lib64/openrtm-1.1/cmake")

2. 環境変数PKG_CONFIG_PATHにopenrtm-aist.pcのパスを設定。
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib64

3. 環境変数LD_LIBRARY_PATHに/usr/lib64を追加。(動的リンクのため)
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64


なお、RTCBuilderのプロジェクトは言語をC++に設定したのみの最小プロジェクトです。

このような対処は正当な方法でしょうか。
あるいはRTCBuilderで設定できたり、環境変数を自動的に設定してくれるスクリプトなどが用意されていたりするのでしょうか。
アドバイスをいただければ幸いです。


(以下、cmake実行時のメッセージ)

-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Warning at CMakeLists.txt:49 (find_package):
  Could not find module FindOpenRTM.cmake or a configuration file for package
  OpenRTM.

  Adjust CMAKE_MODULE_PATH to find FindOpenRTM.cmake or set OpenRTM_DIR to
  the directory containing a CMake configuration file for OpenRTM.  The file
  will have one of the following names:

    OpenRTMConfig.cmake
    openrtm-config.cmake



-- Use cmake/Modules/FindOpenRTM.cmake in the project
-- checking for module 'openrtm-aist'
--   found openrtm-aist, version 1.1.0
-- checking for module 'libcoil'
--   found libcoil, version 1.1.0
-- checking for module 'omniORB4'
--   found omniORB4, version 4.1.6
-- checking for module 'omnithread3'
--   found omnithread3, version 4.1.6
-- checking for module 'omniDynamic4'
--   found omniDynamic4, version 4.1.6
-- checking for module 'uuid'
--   found uuid, version 2.20.0
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91
(MESSAGE):
  Could NOT find OpenRTM (missing: COIL_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252
(_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindOpenRTM.cmake:99 (find_package_handle_standard_args)
  CMakeLists.txt:55 (find_package)


-- Configuring incomplete, errors occurred!

(以上、cmake実行時のメッセージ)


More information about the openrtm-beginners mailing list