manhluong / dart_sdk_build_raspberry_pi_dockerfile

Dockerfile to build the dart sdk.
https://luongbui.com/building-dart-2-sdk-for-armv6-using-docker-and-circleci/
1 stars 2 forks source link

Does not work for dart 2.7.0 #29

Open EP-u-NW opened 4 years ago

EP-u-NW commented 4 years ago

I'm trying to compile dart 2.7.0 using the dart_version argument but it gives me:


 ---> Running in 03e965233358
ninja: Entering directory `out/ReleaseXARMV6'
[1/1] Regenerating ninja files
[1/3895] CXX obj/runtime/bin/libcrashpad.crashpad.o
FAILED: obj/runtime/bin/libcrashpad.crashpad.o
/build_cross_toolchain_raspberry/armv6-rpi-linux-gnueabihf/bin/armv6-rpi-linux-gnueabihf-g++ -MMD -MF obj/runtime/bin/libcrashpad.crashpad.o.d -D_FORTIFY_SOURCE=2 -DNDEBUG -DTARGET_ARCH_ARM -DTARGET_ARCH_ARM_6 -DNDEBUG -DDART_USE_TCMALLOC -DPRODUCT -DTARGET_OS_FUCHSIA -I../../runtime -I../.. -Igen -I../../runtime/include -I../../third_party/tcmalloc/gperftools/src -march=armv6 -mfloat-abi=hard -fno-tree-sra -fno-caller-saves -fno-exceptions -fPIC -mfpu=vfp -Wall -Wextra -Werror -Wendif-labels -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-type-limits -fdebug-prefix-map=/dart-sdk/sdk=../.. -no-canonical-prefixes --sysroot=../../build/linux/debian_jessie_arm-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/i486-linux-gnu -O3 -fno-ident -fdata-sections -ffunction-sections -g3 -ggdb3 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Wno-conversion-null -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wimplicit-fallthrough -Wno-cast-function-type -O3 -fvisibility-inlines-hidden -fno-omit-frame-pointer -std=gnu++11 -fno-rtti -fno-exceptions -c ../../runtime/bin/crashpad.cc -o obj/runtime/bin/libcrashpad.crashpad.o
armv6-rpi-linux-gnueabihf-g++: error: unrecognized command line option '-Wimplicit-fallthrough'; did you mean '-Wno-fallthrough'?
[2/3895] CXX obj/runtime/bin/gen_snapshot_dart_io.namespace_win.o
FAILED: obj/runtime/bin/gen_snapshot_dart_io.namespace_win.o
/build_cross_toolchain_raspberry/armv6-rpi-linux-gnueabihf/bin/armv6-rpi-linux-gnueabihf-g++ -MMD -MF obj/runtime/bin/gen_snapshot_dart_io.namespace_win.o.d -DDART_IO_SECURE_SOCKET_DISABLED -D_FORTIFY_SOURCE=2 -DNDEBUG -DNDEBUG -DDART_USE_TCMALLOC -DDART_PRECOMPILER -DTARGET_ARCH_ARM -DTARGET_ARCH_ARM_6 -DTARGET_OS_LINUX -I../../runtime -I../../third_party -I../.. -Igen -I../../runtime/include -I../../third_party/tcmalloc/gperftools/src -I../../third_party/zlib -march=armv6 -mfloat-abi=hard -fno-tree-sra -fno-caller-saves -fno-exceptions -fPIC -mfpu=vfp -Wall -Wextra -Werror -Wendif-labels -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-type-limits -fdebug-prefix-map=/dart-sdk/sdk=../.. -no-canonical-prefixes --sysroot=../../build/linux/debian_jessie_arm-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/i486-linux-gnu -O3 -fno-ident -fdata-sections -ffunction-sections -g3 -ggdb3 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Wno-conversion-null -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wimplicit-fallthrough -Wno-cast-function-type -O3 -fvisibility-inlines-hidden -fno-omit-frame-pointer -std=gnu++11 -fno-rtti -fno-exceptions -c ../../runtime/bin/namespace_win.cc -o obj/runtime/bin/gen_snapshot_dart_io.namespace_win.o
armv6-rpi-linux-gnueabihf-g++: error: unrecognized command line option '-Wimplicit-fallthrough'; did you mean '-Wno-fallthrough'?
[3/3895] CXX obj/runtime/bin/gen_snapshot_dart_io.platform_fuchsia.o
FAILED: obj/runtime/bin/gen_snapshot_dart_io.platform_fuchsia.o
/build_cross_toolchain_raspberry/armv6-rpi-linux-gnueabihf/bin/armv6-rpi-linux-gnueabihf-g++ -MMD -MF obj/runtime/bin/gen_snapshot_dart_io.platform_fuchsia.o.d -DDART_IO_SECURE_SOCKET_DISABLED -D_FORTIFY_SOURCE=2 -DNDEBUG -DNDEBUG -DDART_USE_TCMALLOC -DDART_PRECOMPILER -DTARGET_ARCH_ARM -DTARGET_ARCH_ARM_6 -DTARGET_OS_LINUX -I../../runtime -I../../third_party -I../.. -Igen -I../../runtime/include -I../../third_party/tcmalloc/gperftools/src -I../../third_party/zlib -march=armv6 -mfloat-abi=hard -fno-tree-sra -fno-caller-saves -fno-exceptions -fPIC -mfpu=vfp -Wall -Wextra -Werror -Wendif-labels -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-type-limits -fdebug-prefix-map=/dart-sdk/sdk=../.. -no-canonical-prefixes --sysroot=../../build/linux/debian_jessie_arm-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/i486-linux-gnu -O3 -fno-ident -fdata-sections -ffunction-sections -g3 -ggdb3 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Wno-conversion-null -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wimplicit-fallthrough -Wno-cast-function-type -O3 -fvisibility-inlines-hidden -fno-omit-frame-pointer -std=gnu++11 -fno-rtti -fno-exceptions -c ../../runtime/bin/platform_fuchsia.cc -o obj/runtime/bin/gen_snapshot_dart_io.platform_fuchsia.o
armv6-rpi-linux-gnueabihf-g++: error: unrecognized command line option '-Wimplicit-fallthrough'; did you mean '-Wno-fallthrough'?
[4/3895] CXX obj/runtime/bin/gen_snapshot_dart_io.platform_android.o
FAILED: obj/runtime/bin/gen_snapshot_dart_io.platform_android.o
/build_cross_toolchain_raspberry/armv6-rpi-linux-gnueabihf/bin/armv6-rpi-linux-gnueabihf-g++ -MMD -MF obj/runtime/bin/gen_snapshot_dart_io.platform_android.o.d -DDART_IO_SECURE_SOCKET_DISABLED -D_FORTIFY_SOURCE=2 -DNDEBUG -DNDEBUG -DDART_USE_TCMALLOC -DDART_PRECOMPILER -DTARGET_ARCH_ARM -DTARGET_ARCH_ARM_6 -DTARGET_OS_LINUX -I../../runtime -I../../third_party -I../.. -Igen -I../../runtime/include -I../../third_party/tcmalloc/gperftools/src -I../../third_party/zlib -march=armv6 -mfloat-abi=hard -fno-tree-sra -fno-caller-saves -fno-exceptions -fPIC -mfpu=vfp -Wall -Wextra -Werror -Wendif-labels -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-type-limits -fdebug-prefix-map=/dart-sdk/sdk=../.. -no-canonical-prefixes --sysroot=../../build/linux/debian_jessie_arm-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/i486-linux-gnu -O3 -fno-ident -fdata-sections -ffunction-sections -g3 -ggdb3 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Wno-conversion-null -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wimplicit-fallthrough -Wno-cast-function-type -O3 -fvisibility-inlines-hidden -fno-omit-frame-pointer -std=gnu++11 -fno-rtti -fno-exceptions -c ../../runtime/bin/platform_android.cc -o obj/runtime/bin/gen_snapshot_dart_io.platform_android.o
armv6-rpi-linux-gnueabihf-g++: error: unrecognized command line option '-Wimplicit-fallthrough'; did you mean '-Wno-fallthrough'?
[5/3895] CXX obj/runtime/bin/gen_snapshot_dart_io.platform.o
FAILED: obj/runtime/bin/gen_snapshot_dart_io.platform.o
/build_cross_toolchain_raspberry/armv6-rpi-linux-gnueabihf/bin/armv6-rpi-linux-gnueabihf-g++ -MMD -MF obj/runtime/bin/gen_snapshot_dart_io.platform.o.d -DDART_IO_SECURE_SOCKET_DISABLED -D_FORTIFY_SOURCE=2 -DNDEBUG -DNDEBUG -DDART_USE_TCMALLOC -DDART_PRECOMPILER -DTARGET_ARCH_ARM -DTARGET_ARCH_ARM_6 -DTARGET_OS_LINUX -I../../runtime -I../../third_party -I../.. -Igen -I../../runtime/include -I../../third_party/tcmalloc/gperftools/src -I../../third_party/zlib -march=armv6 -mfloat-abi=hard -fno-tree-sra -fno-caller-saves -fno-exceptions -fPIC -mfpu=vfp -Wall -Wextra -Werror -Wendif-labels -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-type-limits -fdebug-prefix-map=/dart-sdk/sdk=../.. -no-canonical-prefixes --sysroot=../../build/linux/debian_jessie_arm-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/i486-linux-gnu -O3 -fno-ident -fdata-sections -ffunction-sections -g3 -ggdb3 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Wno-conversion-null -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wimplicit-fallthrough -Wno-cast-function-type -O3 -fvisibility-inlines-hidden -fno-omit-frame-pointer -std=gnu++11 -fno-rtti -fno-exceptions -c ../../runtime/bin/platform.cc -o obj/runtime/bin/gen_snapshot_dart_io.platform.o
armv6-rpi-linux-gnueabihf-g++: error: unrecognized command line option '-Wimplicit-fallthrough'; did you mean '-Wno-fallthrough'?
[6/3895] ACTION //runtime:generate_version_cc_file(//build/toolchain/linux:arm)
ninja: build stopped: subcommand failed.
ninja -C out/ReleaseXARMV6 create_sdk
BUILD FAILED
The command '/bin/sh -c ./tools/build.py -m release -a armv6 create_sdk' returned a non-zero code: 1```
rostopira commented 4 years ago

I've tried 2.0.0, 2.1.0 and 2.2.0 - everything failed

EP-u-NW commented 4 years ago

The version from the readme (2.0.0-dev.55.0) worked for me.

rostopira commented 4 years ago

@EPNW yeah, but it's a bit outdated. And it's very annoying, that this version of sdk requires new keyword

hurelhuyag commented 6 months ago

I changed Dockerfile a bit.

changed debian:stretch to debian:buster, added python3 and procps packages. Beceause debian stretch is too old. But it is not working for the same version.