Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build Dart SDK for arm with error: "cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU" #55669

Open
falrom opened this issue May 8, 2024 · 0 comments
Assignees
Labels
area-build Use area-build for SDK build issues.

Comments

@falrom
Copy link

falrom commented May 8, 2024

I have tried multiple times to delete the out directory and execute the command gclient sync -D, but always encounter the same error when compiling third_party/boringssl.

Referenced these two instructional documents:

My PC (Ubuntu 22):

$ uname -a

Linux ?????? 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  4 14:39:20 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

GCC Version (Got from apt):

$ arm-linux-gnueabihf-gcc -v

Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/11/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a+fp --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)

SDK source:

$ git status

HEAD is at 3.3.4
nothing to commit, clean working directory

Build error:

$ ./tools/build.py --no-rbe --no-clang --mode release --arch arm create_sdk

Done. Made 476 targets from 120 files in 211ms
buildtools/ninja/ninja -C out/ReleaseXARM create_sdk
ninja: Entering directory `out/ReleaseXARM'
[636/5259] ASM obj/third_party/boringssl/linux-arm/crypto/chacha/boringssl_asm.chacha-armv4-linux.o
FAILED: obj/third_party/boringssl/linux-arm/crypto/chacha/boringssl_asm.chacha-armv4-linux.o 
arm-linux-gnueabihf-gcc -MMD -MF obj/third_party/boringssl/linux-arm/crypto/chacha/boringssl_asm.chacha-armv4-linux.o.d -D_FORTIFY_SOURCE=2 -DNDEBUG -I../../third_party/boringssl/src/include -I../.. -Igen -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -fno-tree-sra -fno-caller-saves -fPIE -mthumb -c ../../third_party/boringssl/linux-arm/crypto/chacha/chacha-armv4-linux.S -o obj/third_party/boringssl/linux-arm/crypto/chacha/boringssl_asm.chacha-armv4-linux.o
cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU
[649/5259] ACTION //runtime/vm:vm_platform_product(//build/toolchain/linux:arm)
ninja: build stopped: subcommand failed.
BUILD FAILED
@rmacnak-google rmacnak-google added the area-build Use area-build for SDK build issues. label May 9, 2024
@rmacnak-google rmacnak-google self-assigned this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-build Use area-build for SDK build issues.
Projects
None yet
Development

No branches or pull requests

2 participants