Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building boost_container with emscripten is not supported by boost_generator #1243

Open
Arghnews opened this issue Aug 3, 2020 · 0 comments

Comments

@Arghnews
Copy link

Arghnews commented Aug 3, 2020

Firstly apologies if this doesn't fit the "Feature Request" model very well and if it should be a bug report or question instead.

I am trying to use boost_container with the emscripten toolchain and conan. Running conan install fails because of "Emscripten" not being a valid b2_os in boost_generator.

I have followed the emscripten hello world conan example here and have successfully built other packages using emscripten and conan.

I will detail my smallest simple example below.

conanfile.txt

[requires]
boost_container/1.69.0@bincrafters/stable

CMakeLists.txt

cmake_minimum_required(VERSION 3.14)
project(example)

find_package(boost_container REQUIRED)
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::container)

main.cpp (unimportant for now really as it won't install)

#include <boost/container/small_vector.hpp>
int main() {
  boost::container::small_vector<int, 8> v;
  v.push_back(4);
}

emscripten.profile (Exactly as the conan hello world emscripten example linked above)

include(default)
[settings]
os=Emscripten
arch=wasm
compiler=clang
compiler.version=6.0
compiler.libcxx=libc++
[options]
[build_requires]
emsdk_installer/1.38.29@bincrafters/stable
[env]

From the directory containing the above conanfile.txt, CMakeLists.txt and main.cpp, I run these commands:

mkdir build/ && cd build/
conan install -pr /path/to/emscripten/toolchain/features/emscripten/emscripten.profile --build missing

Here is the error at the end of the the output:

boost_container/1.69.0@bincrafters/stable: Applying build-requirement: emsdk_installer/1.38.29@bincrafters/stable
boost_container/1.69.0@bincrafters/stable: Applying build-requirement: boost_generator/1.69.0@bincrafters/stable
boost_container/1.69.0@bincrafters/stable: Applying build-requirement: nodejs_installer/10.15.0@bincrafters/stable
boost_container/1.69.0@bincrafters/stable: Applying build-requirement: boost_build/1.69.0@bincrafters/stable
boost_container/1.69.0@bincrafters/stable: WARN: Build folder is dirty, removing it: /home/justin/.conan/data/boost_container/1.69.0/bincrafters/stable/build/002c222e5644fb495e466f68ec8bff30b15e7aea
boost_container/1.69.0@bincrafters/stable: Copying sources to build folder
boost_container/1.69.0@bincrafters/stable: Building your package in /home/justin/.conan/data/boost_container/1.69.0/bincrafters/stable/build/002c222e5644fb495e466f68ec8bff30b15e7aea
Traceback (most recent call last):
  File "/home/justin/.conan/data/boost_generator/1.69.0/bincrafters/stable/export/conanfile.py", line 49, in content
    .replace("{{{os}}}", self.b2_os) \
  File "/home/justin/.conan/data/boost_generator/1.69.0/bincrafters/stable/export/conanfile.py", line 158, in b2_os
    return b2_os[str(self.settings.os)]
KeyError: 'Emscripten'
boost_container/1.69.0@bincrafters/stable: ERROR: Generator boost(file:None) failed
'Emscripten'
ERROR: 'Emscripten'

I can post the full output if needed but as far as I can tell it's the usual conan going through the dependency resolving motions and all is good until it hits this.

Cheers if you've read this far!

My system is using Ubuntu 18.10, conan 1.28.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant