diff --git a/func_collection.sh b/func_collection.sh index 2d0004d..c8626e0 100644 --- a/func_collection.sh +++ b/func_collection.sh @@ -448,8 +448,8 @@ function fetch_ode_mars() { pushd . > /dev/null 2>&1 mkdir -p ${MARS_DEV_ROOT}/external cd ${MARS_DEV_ROOT}/external - if [ ! -e "ode-0.12.tar.gz" ]; then - wget http://sourceforge.net/projects/opende/files/ODE/0.12/ode-0.12.tar.gz + if [ ! -e "ode-0.13.1.tar.gz" ]; then + wget http://bitbucket.org/odedevs/ode/downloads/ode-0.13.1.tar.gz if [ -d "ode_mars" ]; then uninstall_package "external/ode_mars" rm -rf ode_mars @@ -457,8 +457,8 @@ function fetch_ode_mars() { fi if [ ! -d "ode_mars" ]; then - tar -xzvf ode-0.12.tar.gz - mv ode-0.12 ode_mars + tar -xzvf ode-0.13.1.tar.gz + mv ode-0.13.1 ode_mars fi cd .. popd > /dev/null 2>&1 @@ -634,18 +634,18 @@ function patch_eigen { } function patch_ode_mars { - printBold "patching external/ode_mars version 0.12 ..." + printBold "patching external/ode_mars version 0.13.1..." setScriptDir setupConfig # patch was accepted upstream (http://sf.net/p/opende/patches/180) and # applied to Rev. 1913 (http://sf.net/p/opende/code/1913) and should be # in the next release - patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-va_end.patch - patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-lambda.patch - patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-export_joint_internals.patch + #patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-va_end.patch + patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.13.1-lambda.patch + patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.13.1-export_joint_internals.patch # patch was submitted upstream (http://sf.net/p/opende/patches/187) - patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-abort.patch - printBold "... done patching external/ode_mars version 0.12." + patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.13.1-abort.patch + printBold "... done patching external/ode_mars version 0.13.1." } @@ -727,6 +727,7 @@ function install_ode_mars { export CFLAGS=-fPIC export CXXFLAGS=-fPIC # --enable-release + ./bootstrap ./configure CPPFLAGS="-DdNODEBUG" CXXFLAGS="-O2 -ffast-math -fPIC" CFLAGS="-O2 -ffast-math -fPIC" --enable-double-precision --prefix=$prefix --with-drawstuff=none --disable-demos if [ "${platform}" = "linux" ]; then if [ x`which libtool` != x ]; then diff --git a/patches/ode-0.12-abort.patch b/patches/ode-0.12-abort.patch deleted file mode 100644 index 01ff7c6..0000000 --- a/patches/ode-0.12-abort.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- ode/src/error.cpp 2013-02-08 10:21:03.886689559 +0100 -+++ ode/src/error.cpp 2013-02-08 10:22:33.438692195 +0100 -@@ -90,7 +90,8 @@ - if (error_function) error_function (num,msg,ap); - else printMessage (num,"ODE Error",msg,ap); - va_end (ap); -- exit (1); -+ if (!error_function) -+ exit (1); - } - - -@@ -102,7 +103,8 @@ - else printMessage (num,"ODE INTERNAL ERROR",msg,ap); - // *((char *)0) = 0; ... commit SEGVicide - va_end (ap); -- abort(); -+ if (!debug_function) -+ abort(); - } - - -@@ -145,7 +147,8 @@ - MessageBox(0,s,title,MB_OK | MB_ICONWARNING); - } - va_end (ap); -- exit (1); -+ if (!error_function) -+ exit (1); - } - - -@@ -162,7 +165,8 @@ - MessageBox(0,s,title,MB_OK | MB_ICONSTOP); - } - va_end (ap); -- abort(); -+ if (!debug_function) -+ abort(); - } - - diff --git a/patches/ode-0.12-lambda.patch b/patches/ode-0.12-lambda.patch deleted file mode 100644 index c4b19e3..0000000 --- a/patches/ode-0.12-lambda.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- include/ode/common.h Mon Jun 2 23:09:37 2008 -+++ include/ode/common.h Wed Aug 8 08:43:51 2012 -@@ -370,6 +370,7 @@ - dVector3 t1; /* torque applied to body 1 */ - dVector3 f2; /* force applied to body 2 */ - dVector3 t2; /* torque applied to body 2 */ -+ dReal lambda; - } dJointFeedback; - - ---- ode/src/step.cpp Thu Jul 24 22:18:40 2008 -+++ ode/src/step.cpp Mon Oct 15 12:58:57 2012 -@@ -762,7 +762,8 @@ - cf2[4] += (fb->t2[0] = data[4]); - cf2[5] += (fb->t2[1] = data[5]); - cf2[6] += (fb->t2[2] = data[6]); - } -+ fb->lambda = *(lambdarow+5); - } - else { - // no feedback is required, let's compute cforce the faster way diff --git a/patches/ode-0.12-va_end.patch b/patches/ode-0.12-va_end.patch deleted file mode 100644 index 4d5e4ca..0000000 --- a/patches/ode-0.12-va_end.patch +++ /dev/null @@ -1,154 +0,0 @@ ---- ode/src/error.cpp Mon Oct 15 13:20:28 2012 -+++ ode/src/error.cpp Mon Oct 15 13:20:38 2012 -@@ -89,6 +89,7 @@ - va_start (ap,msg); - if (error_function) error_function (num,msg,ap); - else printMessage (num,"ODE Error",msg,ap); -+ va_end (ap); - exit (1); - } - -@@ -100,6 +101,7 @@ - if (debug_function) debug_function (num,msg,ap); - else printMessage (num,"ODE INTERNAL ERROR",msg,ap); - // *((char *)0) = 0; ... commit SEGVicide -+ va_end (ap); - abort(); - } - -@@ -110,6 +112,7 @@ - va_start (ap,msg); - if (message_function) message_function (num,msg,ap); - else printMessage (num,"ODE Message",msg,ap); -+ va_end (ap); - } - - #endif -@@ -141,6 +144,7 @@ - s[sizeof(s)-1] = 0; - MessageBox(0,s,title,MB_OK | MB_ICONWARNING); - } -+ va_end (ap); - exit (1); - } - -@@ -157,6 +161,7 @@ - s[sizeof(s)-1] = 0; - MessageBox(0,s,title,MB_OK | MB_ICONSTOP); - } -+ va_end (ap); - abort(); - } - -@@ -167,6 +172,7 @@ - va_start (ap,msg); - if (message_function) message_function (num,msg,ap); - else printMessage (num,"ODE Message",msg,ap); -+ va_end (ap); - } - - ---- ode/demo/demo_ode.cpp Mon Oct 15 13:17:15 2012 -+++ ode/ode/demo/demo_ode.cpp Mon Oct 15 13:17:26 2012 -@@ -951,6 +951,7 @@ - va_list ap; - va_start (ap,name); - vsprintf (mi->name,name,ap); -+ va_end (ap); - if (strlen(mi->name) >= sizeof (mi->name)) dDebug (0,"name too long"); - - mat.push_back(mi); -@@ -967,6 +968,7 @@ - va_list ap; - va_start (ap,name); - vsprintf (mi.name,name,ap); -+ va_end (ap); - if (strlen(mi.name) >= sizeof (mi.name)) dDebug (0,"name too long"); - - if (strcmp(mp->name,mi.name) != 0) ---- drawstuff/src/osx.cpp Mon Oct 15 13:18:38 2012 -+++ drawstuff/src/osx.cpp Mon Oct 15 13:18:48 2012 -@@ -79,6 +79,7 @@ - va_list ap; - va_start (ap,msg); - printMessage ("Error",msg,ap); -+ va_end (ap); - exit (1); - } - -@@ -89,6 +90,7 @@ - va_start (ap,msg); - printMessage ("INTERNAL ERROR",msg,ap); - // *((char *)0) = 0; ... commit SEGVicide ? -+ va_end (ap); - abort(); - } - -@@ -97,6 +99,7 @@ - va_list ap; - va_start (ap,msg); - vprintf (msg,ap); -+ va_end (ap); - } - - static void captureFrame( int num ){ ---- drawstuff/src/windows.cpp Mon Oct 15 13:18:55 2012 -+++ drawstuff/src/windows.cpp Mon Oct 15 13:19:15 2012 -@@ -54,6 +54,7 @@ - va_list ap; - va_start (ap,msg); - errorBox ("Warning",msg,ap); -+ va_end (ap); - } - - -@@ -62,6 +63,7 @@ - va_list ap; - va_start (ap,msg); - errorBox ("Error",msg,ap); -+ va_end (ap); - exit (1); - } - -@@ -72,6 +74,7 @@ - va_start (ap,msg); - errorBox ("INTERNAL ERROR",msg,ap); - // *((char *)0) = 0; ... commit SEGVicide ? -+ va_end (ap); - abort(); - exit (1); // should never get here, but just in case... - } -@@ -82,6 +85,7 @@ - va_list ap; - va_start (ap,msg); - vprintf (msg,ap); -+ va_end (ap); - } - - //*************************************************************************** ---- drawstuff/src/x11.cpp Mon Oct 15 13:19:50 2012 -+++ drawstuff/src/x11.cpp Mon Oct 15 13:19:58 2012 -@@ -62,6 +62,7 @@ - va_list ap; - va_start (ap,msg); - printMessage ("Error",msg,ap); -+ va_end (ap); - exit (1); - } - -@@ -72,6 +73,7 @@ - va_start (ap,msg); - printMessage ("INTERNAL ERROR",msg,ap); - // *((char *)0) = 0; ... commit SEGVicide ? -+ va_end (ap); - abort(); - } - -@@ -81,6 +83,7 @@ - va_list ap; - va_start (ap,msg); - vprintf (msg,ap); -+ va_end (ap); - } - - //*************************************************************************** diff --git a/patches/ode-0.13.1-abort.patch b/patches/ode-0.13.1-abort.patch new file mode 100644 index 0000000..5d0e510 --- /dev/null +++ b/patches/ode-0.13.1-abort.patch @@ -0,0 +1,38 @@ +--- ode/src/error.cpp 2014-02-04 07:00:58.000000000 +0100 ++++ ode/src/error.cpp 2016-01-25 13:14:51.437768604 +0100 +@@ -90,7 +90,8 @@ + if (error_function) error_function (num,msg,ap); + else printMessage (num,"ODE Error",msg,ap); + va_end (ap); +- exit (1); ++ if (!error_function) ++ exit (1); + } + + +@@ -102,6 +103,7 @@ + else printMessage (num,"ODE INTERNAL ERROR",msg,ap); + va_end (ap); + // *((char *)0) = 0; ... commit SEGVicide ++ if (!debug_function) + abort(); + } + +@@ -145,6 +147,7 @@ + MessageBox(0,s,title,MB_OK | MB_ICONWARNING); + } + va_end (ap); ++ if (!error_function) + exit (1); + } + +@@ -162,7 +165,8 @@ + MessageBox(0,s,title,MB_OK | MB_ICONSTOP); + } + va_end (ap); +- abort(); +++ if (!debug_function) +++ abort(); + } + + diff --git a/patches/ode-0.12-export_joint_internals.patch b/patches/ode-0.13.1-export_joint_internals.patch similarity index 52% rename from patches/ode-0.12-export_joint_internals.patch rename to patches/ode-0.13.1-export_joint_internals.patch index 249df00..1663cc5 100644 --- a/patches/ode-0.12-export_joint_internals.patch +++ b/patches/ode-0.13.1-export_joint_internals.patch @@ -1,9 +1,10 @@ ---- ode/src/Makefile.am Fri Jul 11 08:16:50 2008 -+++ ode/src/Makefile.am Wed Aug 8 08:43:51 2012 -@@ -14,6 +14,13 @@ - libode_la_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ @ODE_VERSION_INFO@ - libode_la_LIBADD = libfast.la joints/libjoints.la +--- ode/src/Makefile.am 2014-02-04 07:00:58.000000000 +0100 ++++ ode/src/Makefile.am 2016-01-25 13:14:51.545768600 +0100 +@@ -8,7 +8,13 @@ + noinst_LTLIBRARIES = libfast.la + libfast_la_SOURCES = fastldlt.c fastltsolve.c fastdot.c fastlsolve.c +- +# to create child classes of dJoint, we need to make more of +# the internal data structures accessible. +libode_la_includedir = $(includedir)/ode-internals @@ -12,11 +13,11 @@ + obstack.h \ + config.h - # please, let's keep the filenames sorted - libode_la_SOURCES = array.cpp array.h \ ---- ode/src/joints/Makefile.am Wed Jun 4 23:47:13 2008 -+++ ode/ode/src/joints/Makefile.am Wed Aug 8 08:43:51 2012 -@@ -2,6 +2,9 @@ + lib_LTLIBRARIES = libode.la + +--- ode/src/joints/Makefile.am 2014-02-04 07:00:58.000000000 +0100 ++++ ode/ode/src/joints/Makefile.am 2016-01-25 13:14:51.949768584 +0100 +@@ -4,6 +4,9 @@ noinst_LTLIBRARIES = libjoints.la @@ -26,3 +27,4 @@ libjoints_la_SOURCES = joints.h \ joint.h joint.cpp \ joint_internal.h \ + diff --git a/patches/ode-0.13.1-lambda.patch b/patches/ode-0.13.1-lambda.patch new file mode 100644 index 0000000..64db5a7 --- /dev/null +++ b/patches/ode-0.13.1-lambda.patch @@ -0,0 +1,23 @@ +--- include/ode/common.h 2014-02-27 21:42:09.000000000 +0100 ++++ include/ode/common.h 2016-01-25 13:14:50.297768650 +0100 +@@ -337,6 +337,7 @@ + dVector3 t1; /* torque applied to body 1 */ + dVector3 f2; /* force applied to body 2 */ + dVector3 t2; /* torque applied to body 2 */ ++ dReal lambda; + } dJointFeedback; + + +--- ode/src/step.cpp 2014-03-05 17:05:14.000000000 +0100 ++++ ode/src/step.cpp 2016-01-25 13:14:51.665768595 +0100 +@@ -1293,8 +1293,9 @@ + cf2[2] += (fb->f2[2] = data[2]); + cf2[4] += (fb->t2[0] = data[4]); + cf2[5] += (fb->t2[1] = data[5]); +- cf2[6] += (fb->t2[2] = data[6]); ++ cf2[6] += (fb->t2[2] = data[6]); + } ++ fb->lambda = *(lambdarow+5); + } + else { + // no feedback is required, let's compute cforce the faster way