[Bug 804] New: OCL cross compile problem and RTT compile warning
Submitted by peter on Mon, 2011-01-24 20:52 |
http://bugs.orocos.org/show_bug.cgi?id=804
Summary: OCL cross compile problem and RTT compile warning
Product: Toolchain
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
When i compile RTT 2.2.0 i have this warning :
sources/orocos-rtt-2.2.0/rtt/internal/ConnFactory.cpp: In static member
function 'static RTT::base::ChannelElementBase::shared_ptr
RTT::internal::ConnFactory::createRemoteConnection(RTT::base::OutputPortInterface&,
RTT::base::InputPortInterface&, const RTT::ConnPolicy&)':
sources/orocos-rtt-2.2.0/rtt/internal/ConnFactory.cpp:83:16: warning:
converting 'false' to pointer type for argument 1 of
'boost::intrusive_ptr<T>::intrusive_ptr(T*, bool) [with T =
RTT::base::ChannelElementBase]'
sources/orocos-rtt-2.2.0/rtt/internal/ConnFactory.cpp:89:16: warning:
converting 'false' to pointer type for argument 1 of
'boost::intrusive_ptr<T>::intrusive_ptr(T*, bool) [with T =
RTT::base::ChannelElementBase]'
When i compile OCL 2.2.0 i have these error (it's a cross compilation case see
below) :
-- Optional library RTT_PLUGIN_rtt-scripting NOT FOUND. If the library is
already installed, use the RTT_PLUGIN_rtt-scripting_ROOT_DIR environment
variable or ccmake to set the missing variables manually.
-- Optional library RTT_PLUGIN_rtt-marshalling NOT FOUND. If the library is
already installed, use the RTT_PLUGIN_rtt-marshalling_ROOT_DIR environment
variable or ccmake to set the missing variables manually.
and later
TaskBrowser.cpp:(.text+0x4a22): undefined reference to
`RTT::scripting::Parser::Parser(RTT::TaskContext*)'
...
Would it be possible to compile without manually defining
RTT_PLUGIN_rtt-scripting_ROOT_DIR ?
As i cross compile i use a CMAKE_INSTALL_PREFIX that refer to a target path and
an OROCOS_INSTALL that refer to an host path. Is there any mistake ?
[Bug 804] OCL cross compile problem and RTT compile warning
http://bugs.orocos.org/show_bug.cgi?id=804
--- Comment #14 from Philippe Hamelin <philippe [dot] hamelin [..] ...> 2011-07-05 14:35:12 CEST ---
(In reply to comment #13)
> Hi.
>
> With the Philippe's patch that is in 2.3.2, the compilation works well.
>
> There are still some problems at runtime.
>
> First the RTT COMPONENT PATH isn't set to the target local tree. In
> rtt/rtt/plugin/CMakeLists.txt, for example, DEFAULT_PLUGIN_PATH is set to
> "${CMAKE_INSTALL_PREFIX}/lib/orocos". But in ocl/deployment/CMakeLists.txt,
> DEFAULT_COMPONENT_PATH is set to "${OROCOS-RTT_PATH}/lib/orocos". The problem
> is that OROCOS-RTT_PATH is a build machine path. So i purpose a patch that
> replace OROCOS-RTT_PATH by CMAKE_INSTALL_PREFIX.
I also had this problem, but not really solved it. I just overrided the default
value using the environment variable RTT_COMPONENT_PATH. The proposed
workaround works only if RTT has been installed in the default install
directory. However, I don't have any better solution to propose right now.
>
> The second problem is that deployer-corba-gnulinux, for example, still depends
> on librtt-marshalling-gnulinux. But its rpath lack the plugins directory. So i
> purpose a patch that add
> ${CMAKE_INSTALL_PREFIX}/lib/orocos${OROCOS_SUFFIX}/plugins to the rpath.
>
Damn. I already fixed that but I forgot to push it to my branch. You can find
the commit here :
https://github.com/phamelin/orocos-ocl/commit/ec806c7f5adb1f1bf2deb13369...
I will send an e0mail on the mailing list to make sure this is merged in 2.5.
[Bug 804] OCL cross compile problem and RTT compile warning
http://bugs.orocos.org/show_bug.cgi?id=804
--- Comment #13 from Chavent Paul <paul [dot] chavent [..] ...> 2011-07-05 14:18:56 CEST ---
Hi.
With the Philippe's patch that is in 2.3.2, the compilation works well.
There are still some problems at runtime.
First the RTT COMPONENT PATH isn't set to the target local tree. In
rtt/rtt/plugin/CMakeLists.txt, for example, DEFAULT_PLUGIN_PATH is set to
"${CMAKE_INSTALL_PREFIX}/lib/orocos". But in ocl/deployment/CMakeLists.txt,
DEFAULT_COMPONENT_PATH is set to "${OROCOS-RTT_PATH}/lib/orocos". The problem
is that OROCOS-RTT_PATH is a build machine path. So i purpose a patch that
replace OROCOS-RTT_PATH by CMAKE_INSTALL_PREFIX.
The second problem is that deployer-corba-gnulinux, for example, still depends
on librtt-marshalling-gnulinux. But its rpath lack the plugins directory. So i
purpose a patch that add
${CMAKE_INSTALL_PREFIX}/lib/orocos${OROCOS_SUFFIX}/plugins to the rpath.
Please comment these patches.
Paul.
[Bug 804] OCL cross compile problem and RTT compile warning
http://bugs.orocos.org/show_bug.cgi?id=804
--- Comment #12 from Chavent Paul <paul [dot] chavent [..] ...> 2011-07-05 14:07:45 CEST ---
Created attachment 715
--> http://bugs.orocos.org/attachment.cgi?id=715
Fix the rtt component path.
[Bug 804] OCL cross compile problem and RTT compile warning
http://bugs.orocos.org/show_bug.cgi?id=804
--- Comment #11 from Chavent Paul <paul [dot] chavent [..] ...> 2011-07-05 14:07:25 CEST ---
Created attachment 714
--> http://bugs.orocos.org/attachment.cgi?id=714
Fix the rpath.
[Bug 804] OCL cross compile problem and RTT compile warning
http://bugs.orocos.org/show_bug.cgi?id=804
Philippe Hamelin <philippe [dot] hamelin [..] ...> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |philippe [dot] hamelin [..] ...
--- Comment #10 from Philippe Hamelin <philippe [dot] hamelin [..] ...> 2011-07-04 19:37:49 CEST ---
(In reply to comment #9)
> (In reply to comment #6)
> >
> > This patch obselete the previous patch
> > orocos-ocl-2.2.0-crosscompil_rpath.patch, but I didn't needed the two other
> > patches to make it work.
>
> What is the version this patch apply to ?
>
I'm using 2.3.1.
> The compilation fails for me (2.3.2) :
>
> Linking CXX executable cdeployer-gnulinux
> /home/ressac/work/pip22/sdk/work/pip22/toolchain_root/opt/pip22/lib/gcc/i686-pip22-linux-gnu/4.5.3/../../../../i686-pip22-linux-gnu/bin/ld:
> warning: librtt-marshalling-gnulinux.so.2.3.2, needed by
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2, not found (try using
> -rpath or -rpath-link)
> /home/ressac/work/pip22/sdk/work/pip22/toolchain_root/opt/pip22/lib/gcc/i686-pip22-linux-gnu/4.5.3/../../../../i686-pip22-linux-gnu/bin/ld:
> warning: librtt-scripting-gnulinux.so.2.3.2, needed by
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2, not found (try using
> -rpath or -rpath-link)
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2: undefined reference
> to `RTT::marsh::PropertyLoader::configure(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&, RTT::TaskContext*, bool)
> const'
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2: undefined reference
> to `RTT::marsh::PropertyDemarshaller::deserialize(RTT::PropertyBag&)'
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2: undefined reference
> to `RTT::marsh::PropertyDemarshaller::~PropertyDemarshaller()'
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2: undefined reference
> to `RTT::marsh::PropertyLoader::save(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&, RTT::TaskContext*, bool)
> const'
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2: undefined reference
> to
> `RTT::marsh::PropertyDemarshaller::PropertyDemarshaller(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)'
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2: undefined reference
> to `RTT::Scripting::Scripting(RTT::TaskContext*)'
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2: undefined reference
> to `typeinfo for RTT::Scripting'
> ../deployment/liborocos-ocl-deployment-gnulinux.so.2.3.2: undefined reference
> to `RTT::marsh::PropertyLoader::load(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&, RTT::TaskContext*)
> const'
> collect2: ld returned 1 exit status
Are you sure you applied the patch? Because this is exactly the error the patch
should fix.
Re: [Bug 804] OCL cross compile problem and RTT compile warning
Are you sure you applied the patch? Because this is exactly the error the patch should fix.
Sorry. I "reversed-applied" the patch :(