[Bug 652] New: python bindings fail to compile if boost-ublas is not installed in a standard path.

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=652

Summary: python bindings fail to compile if boost-ublas is not
installed in a standard path.
Product: KDL
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Build system
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

The following compile error occurs:

[ 96%] Generating PyKDL.so
cd /u/rsmits/kdl/build/src/bindings/python && /usr/bin/make
make[3]: Entering directory `/wg/stor5/rsmits/kdl/build/src/bindings/python'
g++ -c -O2 -g -fPIC -Wall -W -I. -I/u/rsmits/kdl/src -I/u/rsmits/kdl/build/src
-I/usr/include/python2.5 -o sipPyKDLChainJntToJacSolver.o
sipPyKDLChainJntToJacSolver.cpp
In file included from /u/rsmits/kdl/src/segment.hpp:27,
from /u/rsmits/kdl/src/chain.hpp:25,
from /u/rsmits/kdl/src/chainjnttojacsolver.hpp:28,
from /u/rsmits/kdl/src/bindings/python/kinfam.sip:374:
/u/rsmits/kdl/src/inertia.hpp:25:45: error: boost/numeric/ublas/symmetric.hpp:
No such file or directory
In file included from /u/rsmits/kdl/src/segment.hpp:27,
from /u/rsmits/kdl/src/chain.hpp:25,
from /u/rsmits/kdl/src/chainjnttojacsolver.hpp:28,
from /u/rsmits/kdl/src/bindings/python/kinfam.sip:374:
/u/rsmits/kdl/src/inertia.hpp:30: error: ‘boost’ has not been declared
/u/rsmits/kdl/src/inertia.hpp:30: error: ‘ublas’ is not a namespace-name
/u/rsmits/kdl/src/inertia.hpp:30: error: expected namespace-name before ‘;’
token
/u/rsmits/kdl/src/inertia.hpp:61: error: ‘boost’ has not been declared
/u/rsmits/kdl/src/inertia.hpp:61: error: ISO C++ forbids declaration of
‘symmetric_matrix’ with no type
/u/rsmits/kdl/src/inertia.hpp:61: error: expected ‘;’ before ‘<’ token
make[3]: *** [sipPyKDLChainJntToJacSolver.o] Error 1

The solution is to change the FindBoostUblas.cmake to set a variable that is
used in the include_directories statement of each sub-library

Ruben

[Bug 652] New: python bindings fail to compile if boost-ublas is

On Wed, May 13, 2009 at 12:04 AM, Ruben Smits
<ruben [dot] smits [..] ...>wrote:

> https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=652
>
> Summary: python bindings fail to compile if boost-ublas is not
> installed in a standard path.
> Product: KDL
> Version: unspecified
> Platform: All
> OS/Version: All
> Status: NEW
> Severity: normal
> Priority: P3
> Component: Build system
> AssignedTo: orocos-dev [..] ...
> ReportedBy: ruben [dot] smits [..] ...
> CC: orocos-dev [..] ...
> Estimated Hours: 0.0
>
>
> The following compile error occurs:
>
> [ 96%] Generating PyKDL.so
> cd /u/rsmits/kdl/build/src/bindings/python && /usr/bin/make
> make[3]: Entering directory
> `/wg/stor5/rsmits/kdl/build/src/bindings/python'
> g++ -c -O2 -g -fPIC -Wall -W -I. -I/u/rsmits/kdl/src
> -I/u/rsmits/kdl/build/src
> -I/usr/include/python2.5 -o sipPyKDLChainJntToJacSolver.o
> sipPyKDLChainJntToJacSolver.cpp
> In file included from /u/rsmits/kdl/src/segment.hpp:27,
> from /u/rsmits/kdl/src/chain.hpp:25,
> from /u/rsmits/kdl/src/chainjnttojacsolver.hpp:28,
> from /u/rsmits/kdl/src/bindings/python/kinfam.sip:374:
> /u/rsmits/kdl/src/inertia.hpp:25:45: error:
> boost/numeric/ublas/symmetric.hpp:
> No such file or directory
> In file included from /u/rsmits/kdl/src/segment.hpp:27,
> from /u/rsmits/kdl/src/chain.hpp:25,
> from /u/rsmits/kdl/src/chainjnttojacsolver.hpp:28,
> from /u/rsmits/kdl/src/bindings/python/kinfam.sip:374:
> /u/rsmits/kdl/src/inertia.hpp:30: error: ‘boost’ has not been declared
> /u/rsmits/kdl/src/inertia.hpp:30: error: ‘ublas’ is not a namespace-name
> /u/rsmits/kdl/src/inertia.hpp:30: error: expected namespace-name before ‘;’
> token
> /u/rsmits/kdl/src/inertia.hpp:61: error: ‘boost’ has not been declared
> /u/rsmits/kdl/src/inertia.hpp:61: error: ISO C++ forbids declaration of
> ‘symmetric_matrix’ with no type
> /u/rsmits/kdl/src/inertia.hpp:61: error: expected ‘;’ before ‘<’ token
> make[3]: *** [sipPyKDLChainJntToJacSolver.o] Error 1
>
> The solution is to change the FindBoostUblas.cmake to set a variable that
> is
> used in the include_directories statement of each sub-library

Hi Ruben,

Have you considered using the FindBoost.cmake module + the Boost_ROOT
(environment or cmake) varaible?, or it does not deliver exactly what you
want?.
The main difference I see is that FindBoostUblas.cmake searches for
ublas-specific include paths, whereas FindBoost looks for boost's main
include path. This should not be a problem though, since boost dev packages
usually install those headers (right?).

Cheers,

Adolfo

>
>
> Ruben
>
> --
> Configure bugmail:
> https://www.fmtc.be/bugzilla/orocos/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
> You are the assignee for the bug.
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>

Ruben Smits's picture

[Bug 652] python bindings fail to compile if boost-ublas is not

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=652

Ruben Smits <ruben [dot] smits [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #2 from Ruben Smits <ruben [dot] smits [..] ...> 2009-05-13 01:36:50 ---
svn ci -m "Fix bug #652: python bindings fail to compile if boost-ublas is not
installed in a standard path"
Sending CMakeLists.txt
Sending config/FindBoostUblas.cmake
Sending src/CMakeLists.txt
Sending src/bindings/python/configure.py.in
Sending src/kdl.pc.in
Sending tests/CMakeLists.txt
Transmitting file data ......
Committed revision 30149.

Ruben Smits's picture

[Bug 652] python bindings fail to compile if boost-ublas is not

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=652

--- Comment #1 from Ruben Smits <ruben [dot] smits [..] ...> 2009-05-13 01:35:21 ---
Created an attachment (id=422)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=422)
patch for bug 652