build icon indicating copy to clipboard operation
build copied to clipboard

Building static or shared boost libraries with Emscripten

Open akontsevich opened this issue 6 years ago • 3 comments

Trying to build boost libraries with following commands

cd boost_1_68_0
./bootstrap.sh
./b2 toolset=emscripten link=static variant=release threading=single runtime-link=static system random date_time

However it produces .bc files to me, not .a for static build flags or .so for shared build flags. Then I have problem linking that libraries into my WebAssebly project. How to produce .a or .so files here? Thanks!

akontsevich avatar Jan 05 '19 10:01 akontsevich

Solved for now by running

# emar q library_name.a *.bc

for every .bc file in a directory.

akontsevich avatar Jan 06 '19 09:01 akontsevich

Thank you for your contributions. Main development of B2 has moved to https://github.com/bfgroup/b2 This issue has been automatically marked as "transition" to indicate the potential for needing transition to the new B2 development project.

stale[bot] avatar Jun 11 '21 01:06 stale[bot]

Thanks for your contribution @akontsevich, but I still encounter issues with building my CMake project. When I attempt to make my project I get the following error:

em++: error: /usr/local/boost_emscripten/lib/libboost_system.a: Unknown format, not a static library!

Have you encountered this?

mpconte avatar May 24 '22 21:05 mpconte

I am stuck on this problem, please help: https://github.com/emscripten-core/emscripten/issues/17187

David-Herzog-Vexcel avatar Apr 25 '23 15:04 David-Herzog-Vexcel

OP in that issue had

E:\emsdk\python\3.9.2-nuget_64bit\python.exe: can't open file 'E:\boost\boost_1_78_0\emcc.py': [Errno 2] No such file or directory

This line implies that emscripten toolset was not configured properly. So you have to be more specific,provide the build output, add your Boost/b2 config and so on.

grisumbras avatar Apr 25 '23 15:04 grisumbras

https://github.com/bfgroup/b2/issues/170 https://github.com/bfgroup/b2/pull/111

grafikrobot avatar Apr 25 '23 15:04 grafikrobot