From ed43cacb33fbec394283f0930b3d81878da81fa9 Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Tue, 7 May 2019 13:10:08 -0700 Subject: [PATCH] Ensure Conan downloads modern binaries. On a system with GCC 5.* Conan will conservatively choose 'libstdc++' over 'libstdc++11' for compiler.libcxx, and then proceed to download libraries compiled with the older ABI. Meanwhile, though, our own CMake setup dictates the use of the modern ABI, and the result is an application binary with ABI mismatches that yield SIGSEGVs almost immediately. Here, we guard against erronous invocations, and gently push the user towards sending in the right explicit override for their system. --- conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conanfile.py b/conanfile.py index 4da273e..4e13ccf 100644 --- a/conanfile.py +++ b/conanfile.py @@ -12,6 +12,10 @@ class FBX2glTFConan(ConanFile): ("fmt/5.3.0@bincrafters/stable")) generators = "cmake_find_package", "cmake_paths" + def configure(self): + if self.settings.compiler.libcxx == "libstdc++": + raise Exception("Rerun 'conan install' with argument: '-s compiler.libcxx=libstdc++11'") + def build(self): cmake = CMake(self) cmake.definitions["FBXSDK_SDKS"] = os.getenv('FBXSDK_SDKS', 'sdk')