You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the instructions on the wiki I tried building for RISC-V on my x86 (AMD) laptop and this is the error I get is for cross-compiling the SDK for risc-v is:
./tools/build.py --no-goma --no-clang -m release -a riscv64 create_sdk
Done. Made 381 targets from 89 files in 178ms
buildtools/ninja/ninja -C out/ReleaseXRISCV64 create_sdk
ninja: Entering directory `out/ReleaseXRISCV64'
[1851/5076] CXX obj/runtime/vm/libdart_vm_precompiler_product.image_snapshot.o
FAILED: obj/runtime/vm/libdart_vm_precompiler_product.image_snapshot.o
riscv64-linux-gnu-g++ -MMD -MF obj/runtime/vm/libdart_vm_precompiler_product.image_snapshot.o.d -D_FORTIFY_SOURCE=2 -DNDEBUG -DTARGET_ARCH_RISCV64 -DDART_USE_TCMALLOC -DDART_TARGET_OS_LINUX -DDART_PRECOMPILER -DPRODUCT -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../../runtime -I../.. -Igen -I../../runtime/include -I../../third_party/tcmalloc/gperftools/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -fPIC -Wall -Wextra -Werror -Wendif-labels -Wno-missing-field-initializers -Wno-unused-parameter -Wno-ignored-qualifiers -fdebug-prefix-map=/home/maks/builds/dart-sdk/sdk=../.. -no-canonical-prefixes -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O3 -fno-ident -fdata-sections -ffunction-sections -g3 -ggdb3 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wno-cast-function-type -O3 -fvisibility=hidden -fvisibility-inlines-hidden -fno-omit-frame-pointer -std=c++17 -fno-rtti -c ../../runtime/vm/image_snapshot.cc -o obj/runtime/vm/libdart_vm_precompiler_product.image_snapshot.o
../../runtime/vm/image_snapshot.cc: In member function ‘virtual void dart::AssemblyImageWriter::ExitSection(dart::ImageWriter::ProgramSection, bool, intptr_t)’:
../../runtime/vm/image_snapshot.cc:1416:27: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
1416 | assembly_stream_->Printf(".size %s, %zu\n", SectionSymbol(name, vm), size);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../runtime/vm/image_snapshot.cc:1417:27: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
1417 | assembly_stream_->Printf(".type %s, %%object\n", SectionSymbol(name, vm));
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
[1868/5076] CXX obj/runtime/vm/libdart_vm_precompiled_runtime_product.object.o
ninja: build stopped: subcommand failed.
BUILD FAILED
This seems to be newer versions of gcc being more fussy about potential null arguments used in printf.
I followed the instructions to install the risc-v cross-compiler with apt so I have:
Following the instructions on the wiki I tried building for RISC-V on my x86 (AMD) laptop and this is the error I get is for cross-compiling the SDK for risc-v is:
This seems to be newer versions of gcc being more fussy about potential null arguments used in
printf
.I followed the instructions to install the risc-v cross-compiler with
apt
so I have:Attempting the same command to compile the native version of the SDK (
x64
) gives the same error.Doing so with I assume clang instead of gcc works:
But if I attempt to use clang to build for riscv64 I get:
So is there a specific version of gcc I should be using for cross compiling for riscv64 ?
The text was updated successfully, but these errors were encountered: