boostorg / boostorg/boost_install
Problem in cmake files generated when building with emscripten
- Dominant language
- C
- Stars
- 11
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I am building boost, and in particular boost-python, for emscripten. My detailed setup is given below. When I run `b2`, it is clear that the address-model is correctly detected:
```
Performing configuration checks
- default address-model : 32-bit (cached) [1]
- default architecture : none (cached) [1]
[1] clang-emscripten
```
However, in the installed cmake config files, I see this:
```
# Generated by Boost 1.90.0
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
_BOOST_SKIPPED("libboost_python313.a" "64 bit, need 32")
return()
endif()
```
which is weird because the generated libraries are indeed 32-bit, not 64-bit. I checked:
```
$ emar x ../boost-install/lib/libboost_python313.a exec.o
$ file exec.o
exec.o: WebAssembly (wasm) binary module version 0x1 (MVP)
```
I'm not sure how to debug how these cmake files are created, but something is going wrong. This is preventing further use of cmake with these libraries, since they are wrongly rejected:
```
No suitable build variant has been found.
The following variants have been tried and rejected:
* libboost_python313.a (64 bit, need 32)
```
The compilation line is:
```
./b2 variant=release toolset=clang-emscripten link=static threading=single --layout=system --prefix=/Users/fx/Desktop/pyodide/boost-install -d2 install
```
The jam file is standard, but I have added:
```
using clang : emscripten : emcc : emar emranlib emlink ;
using python : 3.13 : python3.13 : /Users/fx/Library/Caches/.pyodide-xbuildenv-0.33.0/0.29.3/xbuildenv/pyodide-root/cpython/installs/python-3.13.2/include/python3.13 : ;
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.