Hello Sam, Yes you're right, one first needs to compile protoc for the host, as it is used later to compile the rest. I previously found the protobuf-wasm <https://github.com/dsyer/protobuf-wasm> repo and tried to use that one. But my attempt at pointing CMake to this precompiled version failed <https://github.com/dsyer/protobuf-wasm/issues/1>, and compiling it from source using the instructions in the repo's README failed as well <https://github.com/dsyer/protobuf-wasm/issues/2>. Maybe you have some tips on how to fix either CMake's config or make the procedure to compile from source work? Thank you for your help,
Giacomo Il giorno martedì 25 luglio 2023 alle 15:11:56 UTC+2 s...@google.com ha scritto: > I believe `protoc` is a program that runs on your host machine for > compiling `.proto` files into `.cc` files. When cross compiling (as with > emscripten) you need to ensure that that program is built using the host > compiler and not that target compiler. I'm not sure how well protobuf is > setup for cross compiling but I would try googling for "protobuf cross > compiling" to see if you get any tips on how to make it work. > > cheers, > sam > > On Thu, Jul 13, 2023 at 8:32 AM Giacomo Tommaso Petrucci < > giacomo.to...@gmail.com> wrote: > >> Greetings, >> >> I'm trying to compile to WASM a C++ cli application. The project uses >> CMake and Ninja. My approach so far was to try to invoke CMake using >> emcmake, see where the build process failed, get a precompiled WASM version >> of the missing library or compile that myself, modify the CMake >> configuration to point to the newly obtained library and then move onto >> fixing the next missing library. >> In protobuf's specific case, the CMake config was written in such a way >> that it would try to download and compile it. I just modified it so that it >> was going to do the same also if the platform is "Emscripten": >> >> if (${CMAKE_SYSTEM_NAME} MATCHES "Windows" OR ${CMAKE_SYSTEM_NAME} >> MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Emscripten") #GTP: >> added Emscripten to compile to WASM >> set(PROTOBUF_ENV_STRING CXX=${CMAKE_CXX_COMPILER} C=${CMAKE_C_COMPILER}) >> >> # Deal with compiler specific issues when building protobuf. >> # Compiler sniffing code was copied/adapted from CMake's FindBoost >> module. >> if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC") >> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4065") >> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4506") >> # I suppose we should use a linker-sniffing section to suppress linker >> warnings in, but CMake provides no LINKER_ID variable to facilitate such a >> task. >> # (See https://cmake.org/cmake/help/v3.0/manual/cmake-variables.7.html >> ). >> # We'll just assume that the Microsoft compiler is always used in >> conjunction with the Microsoft linker. >> SET(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} >> /IGNORE:4221") >> elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang") >> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} >> -Wno-inconsistent-missing-override") >> endif() >> >> ExternalProject_Add(protobuf >> URL >> https://github.com/google/protobuf/releases/download/v3.6.1/protobuf-cpp-3.6.1.tar.gz >> URL_HASH SHA1=0595bb8c2447ebd13bec4818f99fa8faa8c8b8c5 >> ${PEP_DOWNLOAD_EXTRACT_TIMESTAMP_PARAM_NAME} >> ${PEP_DOWNLOAD_EXTRACT_TIMESTAMP_PARAM_VALUE} >> PREFIX "${CMAKE_CURRENT_BINARY_DIR}" >> BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/src/protobuf" >> CMAKE_ARGS >> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} # needed for Qt/JOM/cmake >> builds on windows >> -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} >> -DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER} >> -DCMAKE_C_FLAGS=${BASE_C_FLAGS} >> -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} >> -DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER} >> -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} >> -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS} >> -Dprotobuf_BUILD_TESTS=OFF >> -Dprotobuf_BUILD_EXAMPLES=OFF >> -Dprotobuf_BUILD_SHARED_LIBS=OFF >> -Dprotobuf_MSVC_STATIC_RUNTIME=OFF >> -Dprotobuf_DEBUG_POSTFIX= >> # Disable install step >> INSTALL_COMMAND "" >> PATCH_COMMAND ${CMAKE_COMMAND} -E copy >> ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.bld.txt >> ${CMAKE_CURRENT_BINARY_DIR}/src/protobuf/CMakeLists.txt >> BUILD_BYPRODUCTS >> "src/protobuf/cmake/libprotobuf${CMAKE_STATIC_LIBRARY_SUFFIX}" >> ) >> >> # Specify include dir >> ExternalProject_Get_Property(protobuf source_dir) >> set(PROTOBUF_INCLUDE_DIR ${source_dir}/src PARENT_SCOPE) >> >> # Specify MainTest's link libraries >> ExternalProject_Get_Property(protobuf binary_dir) >> >> if("${CMAKE_GENERATOR}" MATCHES "Visual Studio.*") >> set(build_prefix ${binary_dir}/cmake/${CMAKE_BUILD_TYPE}) >> else() >> set(build_prefix ${binary_dir}/cmake) >> endif() >> >> set(PROTOBUF ${build_prefix}/libprotobuf${CMAKE_STATIC_LIBRARY_SUFFIX} >> PARENT_SCOPE) >> >> set(PROTOC ${build_prefix}/protoc${CMAKE_EXECUTABLE_SUFFIX} >> PARENT_SCOPE) >> MESSAGE("PROTOC path: ${build_prefix}/protoc${CMAKE_EXECUTABLE_SUFFIX}") >> >> >> With this approach, I got to the point where I can have CMake >> successfully generating build files by executing "emcmake cmake >> -DWITH_CASTOR=OFF .." inside my build directory (which I called 'wasm'). >> The problem is that when I invoke Ninja, the build fails while dealing with >> protobuf: >> >> osboxes@osboxes:~/core-master/wasm$ ninja pepcli >> [3/116] Performing configure step for 'protobuf' >> -- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11") >> -- Configuring done >> -- Generating done >> -- Build files have been written to: >> /home/osboxes/core-master/wasm/cpp/ext/protobuf/src/protobuf >> [4/116] Performing configure step for 'libarchive' >> -- Configuring done >> -- Generating done >> -- Build files have been written to: >> /home/osboxes/core-master/wasm/cpp/ext/libarchive/src/libarchive >> [5/116] Performing build step for 'libarchive' >> ninja: no work to do. >> [8/116] Performing build step for 'protobuf' >> [1/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/arenastring.cc.o >> [2/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/arena.cc.o >> [3/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/extension_set.cc.o >> [4/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/generated_message_table_driven_lite.cc.o >> [5/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/generated_message_util.cc.o >> [6/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/implicit_weak_message.cc.o >> [7/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/io/zero_copy_stream.cc.o >> [8/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/io/coded_stream.cc.o >> [9/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/io/zero_copy_stream_impl_lite.cc.o >> [10/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/repeated_field.cc.o >> [11/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/message_lite.cc.o >> [12/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/bytestream.cc.o >> [13/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/io_win32.cc.o >> [14/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/int128.cc.o >> [15/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/common.cc.o >> [16/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/status.cc.o >> [17/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/statusor.cc.o >> [18/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/stringpiece.cc.o >> [19/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/stringprintf.cc.o >> [20/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/structurally_valid.cc.o >> [21/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/strutil.cc.o >> [22/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/stubs/time.cc.o >> [23/189] Building CXX object >> cmake/CMakeFiles/libprotobuf-lite.dir/__/src/google/protobuf/wire_format_lite.cc.o >> [24/189] Linking CXX static library cmake/libprotobuf-lite.a >> [25/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/arena.cc.o >> [26/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/arenastring.cc.o >> [27/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/generated_message_table_driven_lite.cc.o >> [28/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/generated_message_util.cc.o >> [29/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/extension_set.cc.o >> [30/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/io/coded_stream.cc.o >> [31/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/implicit_weak_message.cc.o >> [32/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/io/zero_copy_stream.cc.o >> [33/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/repeated_field.cc.o >> [34/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/io/zero_copy_stream_impl_lite.cc.o >> [35/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/message_lite.cc.o >> [36/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/bytestream.cc.o >> [37/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/int128.cc.o >> [38/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/io_win32.cc.o >> [39/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/common.cc.o >> [40/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/stringpiece.cc.o >> [41/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/status.cc.o >> [42/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/statusor.cc.o >> [43/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/stringprintf.cc.o >> [44/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/structurally_valid.cc.o >> [45/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/strutil.cc.o >> [46/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/time.cc.o >> [47/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/wire_format_lite.cc.o >> [48/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/any.cc.o >> [49/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/any.pb.cc.o >> [50/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/api.pb.cc.o >> [51/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/compiler/importer.cc.o >> [52/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/compiler/parser.cc.o >> [53/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/descriptor.pb.cc.o >> [54/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/descriptor_database.cc.o >> [55/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/duration.pb.cc.o >> [56/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/descriptor.cc.o >> [57/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/dynamic_message.cc.o >> [58/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/empty.pb.cc.o >> [59/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/field_mask.pb.cc.o >> [60/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/extension_set_heavy.cc.o >> [61/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/io/gzip_stream.cc.o >> [62/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/generated_message_reflection.cc.o >> [63/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/generated_message_table_driven.cc.o >> [64/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/io/printer.cc.o >> [65/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/io/strtod.cc.o >> [66/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/io/zero_copy_stream_impl.cc.o >> [67/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/io/tokenizer.cc.o >> [68/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/map_field.cc.o >> [69/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc.o >> [70/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/message.cc.o >> [71/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/service.cc.o >> [72/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/reflection_ops.cc.o >> [73/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/mathlimits.cc.o >> [74/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/source_context.pb.cc.o >> [75/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/struct.pb.cc.o >> [76/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/stubs/substitute.cc.o >> [77/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/timestamp.pb.cc.o >> [78/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/type.pb.cc.o >> [79/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/text_format.cc.o >> [80/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/unknown_field_set.cc.o >> [81/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/delimited_message_util.cc.o >> [82/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/field_comparator.cc.o >> [83/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/field_mask_util.cc.o >> [84/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/datapiece.cc.o >> [85/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/default_value_objectwriter.cc.o >> [86/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/error_listener.cc.o >> [87/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/field_mask_utility.cc.o >> [88/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/json_escaping.cc.o >> [89/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/json_objectwriter.cc.o >> [90/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/object_writer.cc.o >> [91/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/json_stream_parser.cc.o >> [92/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/proto_writer.cc.o >> [93/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/protostream_objectsource.cc.o >> [94/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/protostream_objectwriter.cc.o >> [95/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/type_info.cc.o >> [96/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/type_info_test_helper.cc.o >> [97/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/internal/utility.cc.o >> [98/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/json_util.cc.o >> [99/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/time_util.cc.o >> [100/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/type_resolver_util.cc.o >> [101/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/util/message_differencer.cc.o >> [102/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/wire_format.cc.o >> [103/189] Building CXX object >> cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/wrappers.pb.cc.o >> [104/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc.o >> [105/189] Linking CXX static library cmake/libprotobuf.a >> [106/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/code_generator.cc.o >> [107/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_enum.cc.o >> [108/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/command_line_interface.cc.o >> [109/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_enum_field.cc.o >> [110/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_field.cc.o >> [111/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_extension.cc.o >> [112/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_file.cc.o >> [113/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_generator.cc.o >> [114/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_helpers.cc.o >> [115/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_map_field.cc.o >> [116/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_message_field.cc.o >> [117/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_message.cc.o >> [118/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc.o >> [119/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_service.cc.o >> [120/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc.o >> [121/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/cpp/cpp_string_field.cc.o >> [122/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_enum.cc.o >> [123/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_enum_field.cc.o >> [124/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_field_base.cc.o >> [125/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_generator.cc.o >> [126/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_helpers.cc.o >> [127/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_map_field.cc.o >> [128/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_message_field.cc.o >> [129/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_message.cc.o >> [130/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc.o >> [131/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc.o >> [132/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc.o >> [133/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc.o >> [134/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc.o >> [135/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc.o >> [136/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_doc_comment.cc.o >> [137/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_context.cc.o >> [138/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_enum.cc.o >> [139/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_enum_field.cc.o >> [140/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_enum_field_lite.cc.o >> [141/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_enum_lite.cc.o >> [142/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_extension.cc.o >> [143/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_extension_lite.cc.o >> [144/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_field.cc.o >> [145/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_generator.cc.o >> [146/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_file.cc.o >> [147/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_generator_factory.cc.o >> [148/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_helpers.cc.o >> [149/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_lazy_message_field.cc.o >> [150/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc.o >> [151/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_map_field.cc.o >> [152/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_map_field_lite.cc.o >> [153/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_message.cc.o >> [154/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_message_builder_lite.cc.o >> [155/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_message_builder.cc.o >> [156/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_message_field.cc.o >> [157/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_message_field_lite.cc.o >> [158/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_message_lite.cc.o >> [159/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_name_resolver.cc.o >> [160/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_primitive_field.cc.o >> [161/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_primitive_field_lite.cc.o >> [162/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_service.cc.o >> [163/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_shared_code_generator.cc.o >> [164/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_string_field.cc.o >> [165/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/js/well_known_types_embed.cc.o >> [166/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/java/java_string_field_lite.cc.o >> [167/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_enum.cc.o >> [168/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/js/js_generator.cc.o >> [169/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc.o >> [170/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_extension.cc.o >> [171/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_field.cc.o >> [172/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_file.cc.o >> [173/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_generator.cc.o >> [174/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc.o >> [175/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc.o >> [176/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_message.cc.o >> [177/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc.o >> [178/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc.o >> [179/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc.o >> [180/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/php/php_generator.cc.o >> [181/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/plugin.cc.o >> [182/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/plugin.pb.cc.o >> [183/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/subprocess.cc.o >> [184/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/python/python_generator.cc.o >> [185/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/ruby/ruby_generator.cc.o >> [186/189] Building CXX object >> cmake/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/zip_writer.cc.o >> [187/189] Building CXX object >> cmake/CMakeFiles/protoc.dir/__/src/google/protobuf/compiler/main.cc.o >> [188/189] Linking CXX static library cmake/libprotoc.a >> [189/189] Linking CXX executable cmake/protoc >> em++: warning: cmake/libprotobuf.a: archive is missing an index; Use emar >> when creating libraries to ensure an index is created [-Wemcc] >> em++: warning: cmake/libprotobuf.a: adding index [-Wemcc] >> em++: warning: cmake/libprotoc.a: archive is missing an index; Use emar >> when creating libraries to ensure an index is created [-Wemcc] >> em++: warning: cmake/libprotoc.a: adding index [-Wemcc] >> cache:INFO: generating system asset: >> symbol_lists/91d91c9bf638be49b2962de9ec0eedbf08f08bfd.json... (this will be >> cached in >> "/home/osboxes/emsdk/upstream/emscripten/cache/symbol_lists/91d91c9bf638be49b2962de9ec0eedbf08f08bfd.json" >> >> for subsequent builds) >> cache:INFO: - ok >> [11/116] Generating Messages.pb.cc >> FAILED: cpp/pep/proto/Messages.pb.cc >> /home/osboxes/core-master/wasm/cpp/pep/proto/Messages.pb.cc >> cd /home/osboxes/core-master/wasm/cpp/pep/proto && >> /home/osboxes/core-master/wasm/cpp/ext/protobuf/src/protobuf/cmake/protoc.js >> -I/home/osboxes/core-master/messages >> --cpp_out=/home/osboxes/core-master/wasm/cpp/pep/proto >> /home/osboxes/core-master/messages/Messages.proto >> /bin/sh: 1: >> /home/osboxes/core-master/wasm/cpp/ext/protobuf/src/protobuf/cmake/protoc.js: >> >> not found >> [12/116] Generating Messages.pb.checksum.h >> ninja: build stopped: subcommand failed. >> >> It isn't able to find "protoc.js", so I assume the problem arises when it >> tries to compile protobuf. Any suggestions on how to fix this issue? >> >> Thank you for your help, >> >> Giacomo Tommaso Petrucci >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to emscripten-disc...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/emscripten-discuss/1361ec65-7059-4905-a049-bc662d3b45e9n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/emscripten-discuss/1361ec65-7059-4905-a049-bc662d3b45e9n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/097716f6-2ce0-4b78-8a87-535ae4337b46n%40googlegroups.com.