GCC4.3 Build -> KDL/OCL patch

Hi
I've tried and finally succeded to compile rtt/kdl/bfl/ocl with GCC 4.3 on Debian Lenny.

GCC 4.3 now needs explicit #includes.

These patches are the changes wich were necessary to compile
"orocos/trunk/kdl" and "orocos/trunk/ocl".

Hope this helps

regards
Marc

kdl-trunk.patch:

Index: src/velocityprofile.cpp
===================================================================
--- src/velocityprofile.cpp (revision 29666)
+++ src/velocityprofile.cpp (working copy)
@@ -46,6 +46,7 @@
#include "velocityprofile_dirac.hpp"
#include "velocityprofile_trap.hpp"
#include "velocityprofile_traphalf.hpp"
+#include

namespace KDL {

Index: src/path.cpp
===================================================================
--- src/path.cpp (revision 29666)
+++ src/path.cpp (working copy)
@@ -51,6 +51,7 @@
#include "path_roundedcomposite.hpp"
#include "path_cyclic_closed.hpp"
#include
+#include

namespace KDL {

ocl-trunk.patch:

Index: hardware/robotsimulation/tests/main.cpp
===================================================================
--- hardware/robotsimulation/tests/main.cpp (revision 29670)
+++ hardware/robotsimulation/tests/main.cpp (working copy)
@@ -26,15 +26,16 @@

using namespace Orocos;
using namespace RTT;
+using namespace OCL;
using namespace std;

int ORO_main(int argc, char* argv[])
{
- int axes = 6;
- if (argc>1)
- axes=atoi(argv[1]);
+// int axes = 6;
+// if (argc>1)
+// axes=atoi(argv[1]);

- nAxesVelocityController myMachine("MyNAxesMachine",axes);
+ nAxesVelocityController myMachine("MyNAxesMachine");

Attribute > velocities("velocities",vector(6,0));
myMachine.attributes()->addAttribute(&velocities);
Index: hardware/robotsimulation/nAxesVelocityController.hpp
===================================================================
--- hardware/robotsimulation/nAxesVelocityController.hpp (revision 29670)
+++ hardware/robotsimulation/nAxesVelocityController.hpp (working copy)
@@ -62,7 +62,7 @@
std::vector driveValues;
std::vector positionValues;

- std::vector simulation_axes;
+ std::vector simulation_axes;

protected:
Method M_startAllAxes;
Index: hardware/kuka/Kuka361TorqueSimulator.hpp
===================================================================
--- hardware/kuka/Kuka361TorqueSimulator.hpp (revision 29670)
+++ hardware/kuka/Kuka361TorqueSimulator.hpp (working copy)
@@ -6,6 +6,9 @@
#include
#include "kuka361FwDynnf.hpp"
#include
+#include
+#include "dev/SimulationAxis.hpp"
+#include "dev/TorqueSimulationAxis.hpp"

#include

Index: hardware/kuka/Kuka361nAxesTorqueController.hpp
===================================================================
--- hardware/kuka/Kuka361nAxesTorqueController.hpp (revision 29670)
+++ hardware/kuka/Kuka361nAxesTorqueController.hpp (working copy)
@@ -35,8 +35,8 @@

#endif

-#include
-#include
+#include "dev/SimulationAxis.hpp"
+#include "dev/TorqueSimulationAxis.hpp"
#include
#include "Kuka361TorqueSimulator.hpp"

Index: hardware/axes/dev/SimulationAxis.cpp
===================================================================
--- hardware/axes/dev/SimulationAxis.cpp (revision 29670)
+++ hardware/axes/dev/SimulationAxis.cpp (working copy)
@@ -17,6 +17,7 @@
***************************************************************************/

#include "SimulationAxis.hpp"
+#include

using namespace RTT;
using namespace OCL;
Index: hardware/axes/dev/TorqueSimulationAxis.cpp
===================================================================
--- hardware/axes/dev/TorqueSimulationAxis.cpp (revision 29670)
+++ hardware/axes/dev/TorqueSimulationAxis.cpp (working copy)
@@ -18,6 +18,7 @@

#include "TorqueSimulationAxis.hpp"
#include
+#include

using namespace OCL;

Index: motion_control/cartesian/tests/main.cpp
===================================================================
--- motion_control/cartesian/tests/main.cpp (revision 29670)
+++ motion_control/cartesian/tests/main.cpp (working copy)
@@ -13,7 +13,7 @@
#include

//Kinematics component
-#include
+//#include
#include

#include
@@ -29,7 +29,7 @@

int ORO_main(int argc, char* argv[])
{
- Toolkit::Import( KDLToolkit );
+// Toolkit::Import( KDLToolkit );

Kuka361nAxesVelocityController my_robot("Robot");

Index: motion_control/naxes/tests/main.cpp
===================================================================
--- motion_control/naxes/tests/main.cpp (revision 29670)
+++ motion_control/naxes/tests/main.cpp (working copy)
@@ -83,11 +83,16 @@
_emergency.addEvent(my_robot,"positionOutOfRange");

//nAxesComponents
- nAxesGeneratorPos generatorPos("nAxesGeneratorPos",number_of_axes);
- nAxesGeneratorVel generatorVel("nAxesGeneratorVel",number_of_axes);
- nAxesControllerPos controllerPos("nAxesControllerPos",number_of_axes);
- nAxesControllerPosVel controllerPosVel("nAxesControllerPosVel",number_of_axes);
- nAxesControllerVel controllerVel("nAxesControllerVel",number_of_axes);
+// nAxesGeneratorPos generatorPos("nAxesGeneratorPos",number_of_axes);
+ nAxesGeneratorPos generatorPos("nAxesGeneratorPos");
+// nAxesGeneratorVel generatorVel("nAxesGeneratorVel",number_of_axes);
+ nAxesGeneratorVel generatorVel("nAxesGeneratorVel");
+// nAxesControllerPos controllerPos("nAxesControllerPos",number_of_axes);
+ nAxesControllerPos controllerPos("nAxesControllerPos");
+// nAxesControllerPosVel controllerPosVel("nAxesControllerPosVel",number_of_axes);
+ nAxesControllerPosVel controllerPosVel("nAxesControllerPosVel");
+// nAxesControllerVel controllerVel("nAxesControllerVel",number_of_axes);
+ nAxesControllerVel controllerVel("nAxesControllerVel");

//connection naxes components to each other and the robot
connectPorts(my_robot,&generatorPos);

GCC4.3 Build -> KDL/OCL patch

On Wednesday 15 October 2008 16:55:45 marc [dot] bodmer [..] ... wrote:
> Hi
> I've tried and finally succeded to compile rtt/kdl/bfl/ocl with GCC 4.3 on
> Debian Lenny.
>
> GCC 4.3 now needs explicit #includes.
>
> These patches are the changes wich were necessary to compile
> "orocos/trunk/kdl" and "orocos/trunk/ocl".
>
> Hope this helps

The forum erases <...> content (to avoid html tags, see the #include
statements in your post).

Could you attach this patch as a file to a comment on this thread ?

In some examples, you removed the number of Axes. Is this better ? Ruben ?

Peter
--
Peter Soetens -- FMTC --
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

GCC4.3 Build -> KDL/OCL patch

These are the patch files

GCC4.3 Build -> KDL/OCL patch

These are the patch files

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

Ruben Smits's picture

GCC4.3 Build -> KDL/OCL patch

&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"&gt;
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
<style><head><body style=" font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Friday 17 October 2008 09:25:58 Peter Soetens wrote:<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> These are the patch files<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">The patch for kdl was not on the latest trunk, as i'm not mistaken. Since both files include utilities/error.h which includes <string>. So if i'm not mistaken that should do the trick also. Can you confirm that the latest trunk did not compile with gcc 4.3<

<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Ruben<

<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- <

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Ruben Smits <http://people.mech.kuleuven.be/~rsmits><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Autonomous Compliant Motion <http://www.mech.kuleuven.be/robotics/acm><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Mechanical Engineering <http://www.mech.kuleuven.be> <

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Katholieke Universiteit Leuven <http://www.kuleuven.be><

<body><html>

GCC4.3 Build -> KDL/OCL patch

Hi Ruben, the KDL revision the diff is against is: 29666 (you can find the rev# in the diff files)

The current trunk still gives this error, since gcc-4.3 needs implicit includes now:

.../orocos/src/kdl-trunk/src/velocityprofile.cpp: In static member function ‘static KDL::VelocityProfile* KDL::VelocityProfile::Read(std::istream&)’:
.../orocos/src/kdl-trunk/src/velocityprofile.cpp:59: error: ‘strcmp’ was not declared in this scope
make[2]: *** [src/CMakeFiles/orocos-kdl.dir/velocityprofile.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/orocos-kdl.dir/all] Error 2

With my patch KDL compiles, but still gives a bunch of warnings. I've attached a build log for kdl.

Ruben Smits's picture

GCC4.3 Build -> KDL/OCL patch

On Monday 20 October 2008 08:08:52 marc [dot] bodmer [..] ... wrote:
> Hi Ruben, the KDL revision the diff is against is: 29666 (you can find the
> rev# in the diff files)
>
> The current trunk still gives this error, since gcc-4.3 needs implicit
> includes now:
>
> .../orocos/src/kdl-trunk/src/velocityprofile.cpp: In static member function
> ‘static KDL::VelocityProfile* KDL::VelocityProfile::Read(std::istream&)’:
> .../orocos/src/kdl-trunk/src/velocityprofile.cpp:59: error: ‘strcmp’ was
> not declared in this scope make[2]: ***
> [src/CMakeFiles/orocos-kdl.dir/velocityprofile.cpp.o] Error 1 make[1]: ***
> [src/CMakeFiles/orocos-kdl.dir/all] Error 2
>
> With my patch KDL compiles, but still gives a bunch of warnings. I've
> attached a build log for kdl.

The warnings are not a problem. I committed your patches to KDL and OCL trunk,
thanks for supplying the patches.

Ruben.

GCC4.3 Build -> KDL/OCL patch

On Monday 20 October 2008 08:08:52 marc [dot] bodmer [..] ... wrote:
> Hi Ruben, the KDL revision the diff is against is: 29666 (you can find the
> rev# in the diff files)

Please have patch submissions and discussions to Orocos-dev.

Thanks,
Peter

Ruben Smits's picture

GCC4.3 Build -> KDL/OCL patch

&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"&gt;
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
<style><head><body style=" font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Wednesday 15 October 2008 17:39:05 Peter Soetens wrote:<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> On Wednesday 15 October 2008 16:55:45 marc.bodmer@bystronic.com wrote:<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > Hi<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > I've tried and finally succeded to compile rtt/kdl/bfl/ocl with GCC 4.3<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > on Debian Lenny.<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> ><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > GCC 4.3 now needs explicit #includes.<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> ><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > These patches are the changes wich were necessary to compile<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > "orocos/trunk/kdl" and "orocos/trunk/ocl".<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> ><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > Hope this helps<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> The forum erases <...> content (to avoid html tags, see the #include<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> statements in your post).<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Could you attach this patch as a file to a comment on this thread ?<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> In some examples, you removed the number of Axes. Is this better ? Ruben ?<

<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">To make the nAxesComponents deployable they cannot take any constructor arguments anymore besides a string for their name. Therefore the number_of_axes argument was removed and replaced by a property.<

<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">But i was thinking to remove the main.cpp examples and replace them by deployer.xml examples. Any comments on this?<

<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Ruben <

<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Peter<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> --<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Peter Soetens -- FMTC -- <http://www.fmtc.be><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> --<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Orocos-Users mailing list<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Orocos-Users@lists.mech.kuleuven.be<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users<

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm<

<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- <

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Ruben Smits <http://people.mech.kuleuven.be/~rsmits><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Autonomous Compliant Motion <http://www.mech.kuleuven.be/robotics/acm><

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Mechanical Engineering <http://www.mech.kuleuven.be> <

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Katholieke Universiteit Leuven <http://www.kuleuven.be><

<body><html>

GCC4.3 Build -> KDL/OCL patch

On Wednesday 15 October 2008 19:08:02 Ruben Smits wrote:
> On Wednesday 15 October 2008 17:39:05 Peter Soetens wrote:
> > On Wednesday 15 October 2008 16:55:45 marc [dot] bodmer [..] ... wrote:
> > > Hi
> > > I've tried and finally succeded to compile rtt/kdl/bfl/ocl with GCC 4.3
> > > on Debian Lenny.
> > >
> > > GCC 4.3 now needs explicit #includes.
> > >
> > > These patches are the changes wich were necessary to compile
> > > "orocos/trunk/kdl" and "orocos/trunk/ocl".
> > >
> > > Hope this helps
> >
> > The forum erases <...> content (to avoid html tags, see the #include
> > statements in your post).
> >
> > Could you attach this patch as a file to a comment on this thread ?
> >
> > In some examples, you removed the number of Axes. Is this better ? Ruben
> > ?
>
> To make the nAxesComponents deployable they cannot take any constructor
> arguments anymore besides a string for their name. Therefore the
> number_of_axes argument was removed and replaced by a property.

Ok. so that part of the patch is then also correct.

>
> But i was thinking to remove the main.cpp examples and replace them by
> deployer.xml examples. Any comments on this?

I have no preference, both is also ok.

Peter

--
Peter Soetens -- FMTC --
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm