canonical / flutter-snap

GNU General Public License v3.0
18 stars 8 forks source link

Build failing: 'gnu/stubs-32.h' file not found (libc6-dev-i386 package missing) #73

Closed HendrikF closed 2 years ago

HendrikF commented 2 years ago

Since adding the 'pdf_render' package my builds are failing because of missing header files, see below.

The solution is most likely here: https://github.com/flutter/flutter/issues/72415#issuecomment-789181842 It seems nobody ever opened an issue here.

This happens because you are missing the libc6-dev-i386 package

As Snap seems to be the recommended (first listed) installation method for flutter, many installations could be broken.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':pdf_render:externalNativeBuildDebug'.
> Build command failed.
Error while executing process /home/hendrik/Android/Sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /home/hendrik/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/pdf_render-1.0.23/android/.cxx/cmake/debug/armeabi-v7a bbhelper}
ninja: Entering directory `/home/hendrik/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/pdf_render-1.0.23/android/.cxx/cmake/debug/armeabi-v7a'

  [1/2] Building CXX object CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o
  FAILED: CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o 
  /home/hendrik/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi21 --gcc-toolchain=/home/hendrik/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/hendrik/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -Dbbhelper_EXPORTS  -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security   -O0 -fno-limit-debug-info  -fPIC   -DBUILD_FOR_ANDROID -MD -MT CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o -MF CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o.d -o CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o -c ../../../../c++/directBufferAndroid.cpp
  In file included from ../../../../c++/directBufferAndroid.cpp:1:
  In file included from /home/hendrik/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/jni.h:28:
  In file included from /snap/flutter/current/usr/include/stdint.h:26:
  In file included from /snap/flutter/current/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33:
  In file included from /snap/flutter/current/usr/include/features.h:448:
  /snap/flutter/current/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
  # include <gnu/stubs-32.h>
            ^~~~~~~~~~~~~~~~
  1 error generated.
  ninja: build stopped: subcommand failed.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 26s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
# flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.3, on Ubuntu 20.04.4 LTS 5.4.0-105-generic, locale de_DE.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.65.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

Running on Ubuntu 20.04.4 LTS, Flutter (Snap) Version 0+git.671983f