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 static or shared boost libraries with Emscripten #381

Closed
akontsevich opened this issue Jan 5, 2019 · 6 comments · Fixed by bfgroup/b2#310
Closed

Building static or shared boost libraries with Emscripten #381

akontsevich opened this issue Jan 5, 2019 · 6 comments · Fixed by bfgroup/b2#310
Labels
transition Transition to bfgroup/b2

Comments

@akontsevich
Copy link

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
Copy link
Author

akontsevich commented Jan 6, 2019

Solved for now by running

# emar q library_name.a *.bc

for every .bc file in a directory.

@stale
Copy link

stale bot commented Jun 11, 2021

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 stale bot added the transition Transition to bfgroup/b2 label Jun 11, 2021
@mpconte
Copy link

mpconte commented May 24, 2022

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?

@David-Herzog-Vexcel
Copy link

I am stuck on this problem, please help:
emscripten-core/emscripten#17187

@grisumbras
Copy link
Member

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.

@grafikrobot
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
transition Transition to bfgroup/b2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants