Merge pull request #544 from bulwahn/assimp

resolve #525 and #526
This commit is contained in:
Lukas Bulwahn 2017-09-05 13:18:55 +01:00 committed by GitHub
commit 859f5da5cb
5 changed files with 109 additions and 17 deletions

View File

@ -0,0 +1,33 @@
From c2c12c1db5c8d7610ad46b1970aabf4afde0eef4 Mon Sep 17 00:00:00 2001
From: Daniel Knezevic <danielknezevic90@gmail.com>
Date: Thu, 18 Aug 2016 10:51:20 +0200
Subject: [PATCH] Use Assimp namespace to fix build for big-endian
architectures
Upstream-Status: Backport [https://github.com/assimp/assimp/commit/c2c12c1db5c8d7610ad46b1970aabf4afde0eef4]
This patch has been generated with:
`git format-patch -1 c2c12c1db5c8d7610ad46b1970aabf4afde0eef4`
in the assimp repository.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
code/glTFAsset.inl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/code/glTFAsset.inl b/code/glTFAsset.inl
index d52c825..470246c 100644
--- a/code/glTFAsset.inl
+++ b/code/glTFAsset.inl
@@ -40,6 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "StringUtils.h"
+using namespace Assimp;
+
namespace glTF {
namespace {
--
1.9.1

View File

@ -1,16 +0,0 @@
DESCRIPTION = "Open Asset Import Library"
SECTION = "devel"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bc4231a2268da8fc55525ad119638a87"
DEPENDS = "boost"
SRC_URI = "https://downloads.sourceforge.net/project/${PN}/${PN}-3.1/${PN}-${PV}_no_test_models.zip"
SRC_URI[md5sum] = "ccd4788204509da58a3a53c7aeda7a8b"
SRC_URI[sha256sum] = "da9827876f10a8b447270368753392cfd502e70a2e9d1361554e5dfcb1fede9e"
S = "${WORKDIR}/${PN}-${PV}"
inherit cmake
FILES_${PN}-dev += "${libdir}/cmake/assimp-3.1/*.cmake"

View File

@ -0,0 +1,18 @@
DESCRIPTION = "Open Asset Import Library"
SECTION = "devel"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4cd8c0aedc7a0623476669377d7eeda8"
DEPENDS = "boost"
SRC_URI = "https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz;downloadfilename=${PN}-${PV}.tar.gz"
SRC_URI[md5sum] = "fc57b024e80ebb13301bd0983826cad3"
SRC_URI[sha256sum] = "d385c3f90876241343f09e45f4e5033a6a05861b971c63d1f6d512371ffdc7bf"
SRC_URI += "file://0001-Use-Assimp-namespace-to-fix-build-for-big-endian-arc.patch"
S = "${WORKDIR}/${PN}-${PV}"
inherit cmake
FILES_${PN}-dev += "${libdir}/cmake/assimp-3.3/*.cmake"

View File

@ -0,0 +1,56 @@
From 658347978fc97675dbdff480f4557eb772e915dc Mon Sep 17 00:00:00 2001
From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Date: Mon, 4 Sep 2017 16:17:12 +0100
Subject: [PATCH] CMake: explicitly link the atomic library (#797)
For arm & mips architecture, the linker must explicitly be asked to
link the atomic library (with `-latomic`).
Otherwise, the linking fails with:
```
| devel/lib/libmavros.so: undefined reference to `__atomic_load_8'
| devel/lib/libmavros.so: undefined reference to `__atomic_store_8'
| collect2: error: ld returned 1 exit status
```
Linking `atomic` unconditionally as library is strictly needed only
for arm & mips, but it seems not to imply any further differences
with other architectures. Hence, this commit simply adds `atomic`
unconditionally for a uniform handling of all machine architectures.
This is an alternative solution to the proposed solution in #790.
The issue was discovered cross-compiling mavros in meta-ros, the
OpenEmbedded layer for ROS. Some further pointers are available at:
https://github.com/bmwcarit/meta-ros/issues/525
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Upstream-Status: Accepted [https://github.com/mavlink/mavros/commit/658347978fc97675dbdff480f4557eb772e915dc]
This patch has been generated with:
`git format-patch -1 658347978fc97675dbdff480f4557eb772e915dc`
in the mavros repository.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
mavros/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/mavros/CMakeLists.txt b/mavros/CMakeLists.txt
index a4ac3cb..5233e96 100644
--- a/mavros/CMakeLists.txt
+++ b/mavros/CMakeLists.txt
@@ -102,6 +102,7 @@ add_library(mavros
src/lib/rosconsole_bridge.cpp
)
target_link_libraries(mavros
+ atomic
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${GeographicLib_LIBRARIES}
--
1.9.1

View File

@ -48,4 +48,5 @@ require mavros.inc
ROS_PKG_SUBDIR = "mavros" ROS_PKG_SUBDIR = "mavros"
SRC_URI += "file://0001-always-find-Eigen-with-cmake_modules-mechanism.patch;striplevel=2" SRC_URI += "file://0001-always-find-Eigen-with-cmake_modules-mechanism.patch;striplevel=2 \
file://0001-CMake-explicitly-link-the-atomic-library-797.patch;striplevel=2"