(Setting aside my knowledge about build system is limited,)
There's a macro in catkin: [catkin/cmake/tools/rt.cmake](https://github.com/ros/catkin/blob/85556d6776337e9cb1970f0f1733687dbbcb8a42/cmake/tools/rt.cmake), inside of which it tries to find `librt` I think. Does `catkin` need realtime extension for:
- building `catkin` itself?
OR
- building whatever packages that require `rt`?
or both?
I'm wondering, because while trying to build `catkin` workspace from source (following [this doc](http://ros.org/rosdoclite/groovy/api/catkin/html/adv_user_guide/underlay.html)) on non-Ubuntu platform (`QNX`), I get this error:
# cd catkinws && mkdir build && cd build && cmake ../src
:
-- Found gtest sources under '/home/rosuer/catkin_ws/src/gtest': gtests will be built
CMake Error at catkin/cmake/assert.cmake:17 (message):
Assertion failed: check for file existence, but filename
(RT_LIBRARY-NOTFOUND) unset. Message: RT Library
Call Stack (most recent call first):
catkin/cmake/tools/rt.cmake:42 (assert_file_exists)
catkin/cmake/all.cmake:134 (include)
CMakeLists.txt:12 (include)
-- Configuring incomplete, errors occurred!
While remaining not so sure, I modified [a line](https://github.com/ros/catkin/blob/85556d6776337e9cb1970f0f1733687dbbcb8a42/cmake/tools/rt.cmake#L34) of `rt.cmake` as follows that bypass the error above on `QNX`. And no build-time error occurs on `Ubuntu` (`Quantal`) too (I don't know if there's any runtime misbehavior):
x if(NOT (APPLE OR WIN32 OR MINGW OR ANDROID))
o if(NOT (APPLE OR WIN32 OR MINGW OR ANDROID OR UNIX))
Although I'm not sure if `UNIX` symbol is recognized by `cmake` on Ubuntu/Linux, succeeding this even on Ubuntu made me wonder why linking to `rt` is needed in `catkin` level.
Thank you!
↧