Closed bravenut closed 1 week ago
I've seen a very similar looking error when building an extension (though not from the example) with prebuilt protobuf libraries. In my case, it was ultimately resolved by rebuilding those libraries. I took provided Dockerfile to build the image and modified sdk_container.sh by adding the following at the end of the script:
git clone https://github.com/protocolbuffers/protobuf
cd protobuf
git checkout v3.9.1
git submodule update --init --recursive
./autogen.sh
emconfigure ./configure --disable-shared CXXFLAGS="-O3 -flto"
emmake make
cp src/.libs/libprotobuf-lite.a /sdk
cp src/.libs/libprotobuf.a /sdk
cd
rm -rf protobuf
This should build WASM version of the protobuf libraries and puts them into the /sdk directory inside the docker image instead of precompiled versions.
Note, I didn't test it extensively, but in the simple WASM filter I used it I didn't see any problems.
I think this issue is addressed by https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/pull/172.
@martijneken @mpwarres it does not seem that I can close this bug (since I didn't open it), but I faced the same issue and it was addressed for my be rebuilding libprotobuf, so I think the PR fixes it.
Closing per previous comment. Thanks @krinkinmu !
Hi,
when I follow the steps outlined in the README for the example on how to compile a C++ WASM filter, on running
docker run -v $PWD:/work -w /work wasmsdk:v2 /build_wasm.sh
The process exits with unsuccessfully because of some linker error. The full output of above docker run execution is: