[ros-users] [FreeBSD] compiler command line gets mangled in rxtools ?
René Ladan
rene at freebsd.org
Fri May 28 16:29:44 UTC 2010
2010/5/28 Rene Ladan <rene at freebsd.org>:
> On 27-05-2010 19:10, Brian Gerkey wrote:
>> On Thu, May 27, 2010 at 7:40 AM, René Ladan <rene at freebsd.org> wrote:
>>>
>>> While building ros-boxturtle (revision 9742 and the patch at
>>> ftp://rene-ladan.nl/pub/freebsd/ros-boxturtle-9491.diff) on FreeBSD,
>>> everything now builds
>>> fine until the build stops in rxtools (some messages from gmake are in Dutch):
>>
>>> Looking inside the build directory, the semicolon before -D_THREAD_SAFE in
>>> /home/rene/ros/tools/rxtools/build/CMakeFiles/rxtools.dir/link.txt
>>> looks suspicious (-Wl,-rpath
>>> -L, and -l arguments omitted for readability, -lboost_thread is one of them):
>>>
>>> /usr/bin/c++ -fPIC -pthread;-D_THREAD_SAFE -O2 -g -pthread -shared
>>
>> hi Rene,
>>
>> The semicolon is almost certainly causing the problem. The semicolon
>> is CMake's list separator, which makes me suspect that the problem is
>> in CMake code somewhere.
>>
>> Looks like you're not the only one to encounter this issue with CMake
>> on FreeBSD, e.g.:
>> http://www.luxrender.net/forum/viewtopic.php?f=22&t=2788 .
>>
>> Common between that instance and rxtools is the use of wxWidgets. So
>> I would guess that there's a bug in CMake's FindwxWidgets.cmake,
>> perhaps specific to FreeBSD and/or the version of CMake you're using.
>>
> Hi Brian,
>
> I'll see if it can be fixed on FreeBSD, it indeed looks like a bug.
> Thanks for the explanations.
>
The luxrender port of FreeBSD (http://www.freshports.org/graphics/luxrender/)
indeed suffers from the same semicolon problem, there they just patch the
offending file(s) after they are generated. This is done in the port
Makefile itself
(comparable to a Ubuntu package source I think). From
graphics/luxrender/Makefile:
------8<--------
post-configure:
# Fix CXX_FLAGS in generated files
@${REINPLACE_CMD} -e \
's,-pthread;-D_THREAD_SAFE,-pthread -D_THREAD_SAFE,' \
${WRKSRC}/CMakeFiles/lux.dir/flags.make \
${WRKSRC}/CMakeFiles/luxconsole.dir/flags.make \
${WRKSRC}/CMakeFiles/luxconsole.dir/link.txt \
${WRKSRC}/CMakeFiles/luxmerger.dir/flags.make \
${WRKSRC}/CMakeFiles/luxmerger.dir/link.txt \
${WRKSRC}/CMakeFiles/luxrender.dir/flags.make \
${WRKSRC}/CMakeFiles/luxrender.dir/link.txt
------8<--------
Would it be possible to use a similar trick for ROS (e.g. run 'make
configure' to
configure everything like detecting installed software and letting
CMake do its job,
and then run 'make' to compile everything using the generated Makefiles) ?
Regards,
Rene
More information about the ros-users
mailing list