diff --git a/VERSION.txt b/VERSION.txt index 6261a05bb..d5e98f723 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.3.1 \ No newline at end of file +1.3.2 \ No newline at end of file diff --git a/installer/debian/deb_installer_ia64.sh b/installer/debian/deb_installer_ia64.sh index 8ef0170b6..458bb54c2 100755 --- a/installer/debian/deb_installer_ia64.sh +++ b/installer/debian/deb_installer_ia64.sh @@ -75,7 +75,7 @@ do elif [ "$1" = "--ros" ] ; then echo "Marking ros dependencies" - DEPENDS="$DEPENDS, ros-kinetic-desktop-full (>= 1.3.2-0), python-rosinstall (>= 0.7.8-1), ros-kinetic-ros-type-introspection (>= 1.1.1-0), ros-kinetic-move-base-msgs (>= 1.13.0-0), ros-kinetic-navigation (>= 1.14.4-0), libactionlib-dev (>= 1.11.4-2), libactionlib-msgs-dev (>= 1.12.3-5), libmove-base-msgs-dev (>= 1.13.0-1)" + DEPENDS="$DEPENDS, ros-melodic-desktop-full (>= 1.3.2-0), python-rosinstall (>= 0.7.8-1), ros-melodic-ros-type-introspection (>= 1.1.1-0), ros-melodic-move-base-msgs (>= 1.13.0-0), ros-melodic-navigation (>= 1.14.4-0), libactionlib-dev (>= 1.11.4-2), libactionlib-msgs-dev (>= 1.12.3-5), libmove-base-msgs-dev (>= 1.13.0-1)" DEPENDS_ROS=1 shift else diff --git a/port/python/using_python.mpb b/port/python/using_python.mpb index 400b706a1..32b54185e 100644 --- a/port/python/using_python.mpb +++ b/port/python/using_python.mpb @@ -31,7 +31,7 @@ feature (python) { expand(PYTHON_VERSION) { $PYTHON_VERSION - 2.7 + 3.6 } expand(BOOST_PYTHON_VERSION) { @@ -39,6 +39,16 @@ feature (python) { "" } + expand(PYTHON_LIBDIR) { + $PYTHON_LIBDIR + $(PYTHON_ROOT)/lib/python$(PYTHON_VERSION) + } + + expand(PYTHON_LIBNAME) { + $PYTHON_LIBNAME + python$(PYTHON_VERSION) + } + expand(BOOST_PYTHON_DEBUG) { $BOOST_PYTHON_DEBUG @@ -52,8 +62,8 @@ feature (python) { macros += _MADARA_PYTHON_CALLBACKS_ - libpaths += $(PYTHON_ROOT)/lib/python$(PYTHON_VERSION) - lit_libs += python$(PYTHON_VERSION) + libpaths += $(PYTHON_LIBDIR) + lit_libs += $(PYTHON_LIBNAME) specific(prop:windows) { @@ -66,7 +76,7 @@ feature (python) { // end if windows build } else { includes += $(PYTHON_ROOT)/include/python$(PYTHON_VERSION) - libpaths += $(PYTHON_ROOT)/lib/python$(PYTHON_VERSION) + lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_python$(BOOST_PYTHON_VERSION)$(BOOST_CFG) } } diff --git a/scripts/linux/base_build.sh b/scripts/linux/base_build.sh index 568727048..c5d11af03 100755 --- a/scripts/linux/base_build.sh +++ b/scripts/linux/base_build.sh @@ -142,6 +142,11 @@ VREP_CONFIG=0 WARNINGS=0 ZMQ=0 +if [ -z $PYTHON_VERSION ] ; then + echo "PYTHON_VERSION unset, so setting it to default of 2.7" + export PYTHON_VERSION="2.7" +fi + CAPNP_AS_A_PREREQ=0 EIGEN_AS_A_PREREQ=0 GAMS_AS_A_PREREQ=0 @@ -395,7 +400,7 @@ do echo " odroid target ODROID computing platform" echo " opencv build opencv" echo " osc build with open stage control support" - echo " python build with Python 2.7 support" + echo " python build with Python $PYTHON_VERSION support" echo " prereqs use apt-get to install prereqs. This usually only" echo " has to be used on the first usage of a feature" echo " ros build ROS platform classes" @@ -774,10 +779,11 @@ if [ $PREREQS -eq 1 ] && [ $MAC -eq 0 ]; then if [ $ROS -eq 1 ]; then ROS_FIRST_SETUP=0 - if [ ! -d "/opt/ros/kinetic" ] ; then + if [ ! -d "/opt/ros/melodic" ] ; then ROS_FIRST_SETUP=1 sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' - sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 + sudo apt install curl # if you haven't already installed curl + curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - fi fi @@ -806,9 +812,9 @@ if [ $PREREQS -eq 1 ] && [ $MAC -eq 0 ]; then fi if [ $PYTHON -eq 1 ]; then - sudo apt-get install -y -f python2.7 python-pip python-tk + sudo apt-get install -y -f python$PYTHON_VERSION python-pip python-tk python$PYTHON_VERSION-dev sudo pip install matplotlib - sudo pip install pycapnp + #sudo pip install pycapnp sudo pip install pyyaml sudo pip install yamlloader fi @@ -871,12 +877,12 @@ if [ $PREREQS -eq 1 ] && [ $MAC -eq 0 ]; then fi #android condition ends if [ $ROS -eq 1 ]; then - sudo apt-get install -y ros-kinetic-desktop-full python-rosinstall ros-kinetic-ros-type-introspection ros-kinetic-move-base-msgs ros-kinetic-navigation libactionlib-dev libactionlib-msgs-dev libmove-base-msgs-dev ros-kinetic-pcl-conversions ros-kinetic-pcl-ros libpcl-dev + sudo apt-get install -y ros-melodic-desktop-full python-rosinstall ros-melodic-ros-type-introspection ros-melodic-move-base-msgs ros-melodic-navigation libactionlib-dev libactionlib-msgs-dev libmove-base-msgs-dev ros-melodic-pcl-conversions ros-melodic-pcl-ros libpcl-dev if [ $ROS_FIRST_SETUP -eq 1 ]; then sudo rosdep init rosdep update - echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc + echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc source ~/.bashrc fi fi @@ -1624,6 +1630,33 @@ if [ $MADARA -eq 1 ] || [ $MADARA_AS_A_PREREQ -eq 1 ]; then else echo "GENERATING MADARA PROJECT" + + if [ $PYTHON -eq 1 ]; then + if [ -z $PYTHON_LIBDIR ] ; then + echo "Because PYTHON_LIBDIR is not set, we will attempt to find libpython$PYTHON_VERSION.so" + + if [ -f "/usr/lib/x86_64-linux-gnu/libpython$PYTHON_VERSION.so" ]; then + + export PYTHON_LIBDIR="/usr/lib/x86_64-linux-gnu" + export PYTHON_LIBNAME="python${PYTHON_VERSION}" + echo "Found it at $PYTHON_LIBDIR" + else + echo "python$PYTHON_VERSION.so was not found. Checking an m version (libpython${PYTHON_VERSION}m.so" + + if [ -f "/usr/lib/x86_64-linux-gnu/libpython${PYTHON_VERSION}m.so" ]; then + + export PYTHON_LIBDIR="/usr/lib/x86_64-linux-gnu" + export PYTHON_LIBNAME="python${PYTHON_VERSION}m" + echo "Found it at $PYTHON_LIBDIR with name python${PYTHON_VERSION}m.so" + else + echo "ERROR: libpython$PYTHON_VERSION.so was not found. THIS BUILD IS LIKELY TO FAIL" + echo "Blame the python distribution managers who removed support for /usr/lib/python${PYTHON_VERSION}" + fi + + fi + fi + fi + echo "perl $MPC_ROOT/mwc.pl -type make -features no_karl=$NOKARL,android=$ANDROID,python=$PYTHON,java=$JAVA,tests=$TESTS,tutorials=$TUTORIALS,docs=$DOCS,ssl=$SSL,zmq=$ZMQ,simtime=$SIMTIME,nothreadlocal=$NOTHREADLOCAL,clang=$CLANG,debug=$DEBUG,warnings=$WARNINGS,capnp=$CAPNP MADARA.mwc" perl $MPC_ROOT/mwc.pl -type make -features no_karl=$NOKARL,lz4=$LZ4,android=$ANDROID,python=$PYTHON,java=$JAVA,tests=$TESTS,tutorials=$TUTORIALS,docs=$DOCS,ssl=$SSL,zmq=$ZMQ,simtime=$SIMTIME,nothreadlocal=$NOTHREADLOCAL,clang=$CLANG,debug=$DEBUG,warnings=$WARNINGS,capnp=$CAPNP MADARA.mwc @@ -1815,6 +1848,12 @@ if [ $GAMS -eq 1 ] || [ $GAMS_AS_A_PREREQ -eq 1 ]; then cmake --build . --target install --config debug GAMS_BUILD_RESULT=$? else + + if [ $ROS -eq 1 ]; then + export ROS=0 + echo "... disabling ROS setting for GAMS build as it is unsupported in current GAMS" + fi + echo "GENERATING GAMS PROJECT" echo "perl $MPC_ROOT/mwc.pl -type make -features no_karl=$NOKARL,capnp=$CAPNP,airlib=$AIRLIB,java=$JAVA,ros=$ROS,types=$TYPES,vrep=$VREP,scrimmage=$SCRIMMAGE,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,simtime=$SIMTIME,debug=$DEBUG,warnings=$WARNINGS gams.mwc" perl $MPC_ROOT/mwc.pl -type make -features no_karl=$NOKARL,capnp=$CAPNP,airlib=$AIRLIB,java=$JAVA,ros=$ROS,python=$PYTHON,types=$TYPES,vrep=$VREP,scrimmage=$SCRIMMAGE,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,simtime=$SIMTIME,debug=$DEBUG,warnings=$WARNINGS gams.mwc