protobuf-emscripten icon indicating copy to clipboard operation
protobuf-emscripten copied to clipboard

Compile errors

Open smlehbleh opened this issue 6 years ago • 5 comments

Hi, I've tried to compile 3.1.0 following the build instructions and I have the following compile errors:

./google/protobuf/stubs/once.h:135:30: error: cannot initialize a parameter of type 'const volatile google::protobuf::internal::Atomic32 *' (aka 'const volatile int *') with an lvalue of type 'google::protobuf::ProtobufOnceType *' (aka 'long *') if (internal::Acquire_Load(once) != ONCE_STATE_DONE) { ^~~~

smlehbleh avatar Feb 25 '19 11:02 smlehbleh

same

yarco avatar Apr 27 '19 05:04 yarco

same...

chenghui-li avatar Nov 23 '19 08:11 chenghui-li

same

HandDown avatar Apr 11 '23 09:04 HandDown

To solve this issue follow these steps:

git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install emscripten-1.36.14
./emsdk activate emscripten-1.36.14
source ./emsdk_env.sh

I also installed llvm here: https://apt.llvm.org/

And ran the configure files as such:

emconfigure --em-config LLVM_ROOT=/usr/bin; ./configure
emmake --em-config LLVM_ROOT=/usr/bin; make

Don't know if that's required though

cheers

ktb92677 avatar May 06 '23 23:05 ktb92677