Giter Site home page Giter Site logo

Build wasm(libprotobuf.a failed with undefined symbol(std::__2::__basic_string_common<true>::__throw_length_error() const) about proxy-wasm-cpp-sdk HOT 2 OPEN

coolg92003 avatar coolg92003 commented on June 24, 2024
Build wasm(libprotobuf.a failed with undefined symbol(std::__2::__basic_string_common::__throw_length_error() const)

from proxy-wasm-cpp-sdk.

Comments (2)

coolg92003 avatar coolg92003 commented on June 24, 2024

em++ version is 3.1.23
Also run command "em++ --clear-cache" and no any improvement

from proxy-wasm-cpp-sdk.

coolg92003 avatar coolg92003 commented on June 24, 2024

do this make file again, then works now
cat Makefile_pb
CPP_API ?= .

all: proxy_wasm_intrinsics.pb.h proxy_wasm_intrinsics_lite.pb.h struct_lite.pb.h HFEDHttpScreenMsg.pb.h ${CPP_API}/libprotobuf.a ${CPP_API}/libprotobuf-lite.a

protobuf: proxy_wasm_intrinsics.pb.h proxy_wasm_intrinsics_lite.pb.h struct_lite.pb.h HFEDHttpScreenMsg.pb.h

proxy_wasm_intrinsics.pb.h: proxy_wasm_intrinsics.proto
protoc --cpp_out=. proxy_wasm_intrinsics.proto

proxy_wasm_intrinsics_lite.pb.h struct_lite.pb.h: proxy_wasm_intrinsics_lite.proto
protoc --cpp_out=. -I. proxy_wasm_intrinsics_lite.proto
protoc --cpp_out=. struct_lite.proto

HFEDHttpScreenMsg.pb.h: HFEDHttpScreenMsg.proto
protoc --proto_path=. --cpp_out=. HFEDHttpScreenMsg.proto

${CPP_API}/libprotobuf.a ${CPP_API}/libprotobuf-lite.a:
rm -rf protobuf-wasm && git clone https://github.com/protocolbuffers/protobuf protobuf-wasm
&& cd protobuf-wasm && git checkout v3.9.1
&& rm -rf wasm-patches && git clone https://github.com/kwonoj/protobuf-wasm wasm-patches
&& cd wasm-patches && git checkout 4bba8b2f38b5004f87489642b6ca4525ae72fe7f
&& cd .. && git apply wasm-patches/*.patch
&& ./autogen.sh
&& emconfigure ./configure --disable-shared CXXFLAGS="-O3 -flto"
&& emmake make
&& cd ..
&& cp protobuf-wasm/src/.libs/libprotobuf-lite.a ${CPP_API}/libprotobuf-lite.a
&& cp protobuf-wasm/src/.libs/libprotobuf.a ${CPP_API}/libprotobuf.a

clean:
rm -f proxy_wasm_intrinsics.pb.h proxy_wasm_intrinsics_lite.pb.h struct_lite.pb.h HFEDHttpScreenMsg.pb.h ${CPP_API}/libprotobuf.a ${CPP_API}/libprotobuf-lite.a

thanks

from proxy-wasm-cpp-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.