Local android builds failing on spirv-cross

This issue has been created since 2022-09-23.

Not sure why this TU is even getting compiled for Android:

[2660/3293] CXX clang_arm64/obj/third_party/vulkan-deps/spirv-tools/src/source/opt/libspvtools_opt.scalar_replacement_pass.o
FAILED: clang_arm64/obj/third_party/vulkan-deps/spirv-tools/src/source/opt/libspvtools_opt.scalar_replacement_pass.o 
/Users/dnfield/goma/gomacc  ../../buildtools/mac-x64/clang/bin/clang++ -MD -MF clang_arm64/obj/third_party/vulkan-deps/spirv-tools/src/source/opt/libspvtools_opt.scalar_replacement_pass.o.d -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_AVAILABILITY=1 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../.. -Iclang_arm64/gen -I../../third_party/libcxx/include -I../../third_party/libcxxabi/include -I../../build/secondary/third_party/libcxx/config -I../../third_party/vulkan-deps/spirv-tools/src -I../../third_party/vulkan-deps/spirv-headers/src/include -I../../third_party/vulkan-deps/spirv-tools/src/include -Iclang_arm64/gen/third_party/vulkan-deps/spirv-tools/src -isysroot /Users/dnfield/src/flutter/engine/src/out/android_debug/gen/SDKs/MacOSX13.sdk -mmacosx-version-min=10.13.0 -fno-strict-aliasing -fstack-protector-all -arch arm64 -fno-aligned-allocation -fcolor-diagnostics -Wall -Wextra -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-deprecated-copy -Wno-psabi -Wno-unqualified-std-cast-call -Wno-non-c-typedef-for-linkage -Wno-range-loop-construct -Wunguarded-availability -fvisibility=hidden -stdlib=libc++ -Wstring-conversion -Wnewline-eof -O2 -fno-ident -fdata-sections -ffunction-sections -g2 -Wno-implicit-fallthrough -Wno-newline-eof -Wno-unreachable-code-break -Wno-unreachable-code-return -fvisibility-inlines-hidden -std=c++17 -fno-rtti -nostdinc++ -nostdinc++ -fvisibility=hidden -fno-exceptions  -c ../../third_party/vulkan-deps/spirv-tools/src/source/opt/scalar_replacement_pass.cpp -o clang_arm64/obj/third_party/vulkan-deps/spirv-tools/src/source/opt/libspvtools_opt.scalar_replacement_pass.o
In file included from ../../third_party/vulkan-deps/spirv-tools/src/source/opt/scalar_replacement_pass.cpp:15:
../../third_party/vulkan-deps/spirv-tools/src/source/opt/scalar_replacement_pass.h:42:5: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
    sprintf(&name_[strlen(name_)], "%d", max_num_elements_);
    ^
/Users/dnfield/src/flutter/engine/src/out/android_debug/gen/SDKs/MacOSX13.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Users/dnfield/src/flutter/engine/src/out/android_debug/gen/SDKs/MacOSX13.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))

@chinmaygarde do you know?

chinmaygarde wrote this answer on 2022-09-23

Seems to be a host build. Perhaps of ImpellerC. Is this on an Apple Silicon Mac? That would explain the arch flags.

Seems like the Mac 13 SDK libc is deprecating certain methods like sprintf.

chinmaygarde wrote this answer on 2022-09-23

I found this in the headers on my local machine.

#if !defined(_POSIX_C_SOURCE)
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.")
#endif

We should define _POSIX_C_SOURCE since this is a POSIX call and the deprecation would be a compliance violation.

dnfield wrote this answer on 2022-09-23

...but why is impellerc getting built for Android? Will dig.

chinmaygarde wrote this answer on 2022-09-23

It needs to be built so we can generate the GLSL for the Android backend so we can support the --enable-impeller flag in go/try-impeller.

dnfield wrote this answer on 2022-09-23

Yes, but this is in my out/android_debug directory.

dnfield wrote this answer on 2022-09-23

It's coming from the flutter_shell_native_unittests.

dnfield wrote this answer on 2022-09-23

...maybe

dnfield wrote this answer on 2022-09-23

Ahh I see now. Ok. Need to figure out where/how to get that _POSIX_C_SOURCE define.

chinmaygarde wrote this answer on 2022-09-23

gn refs out/android_debug //flutter/impeller/compiler:impellerc

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2022-10-05
Star Count 145512
Watcher Count 3569
Fork Count 23398
Issue Count 11205

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Win32/Contebrew.A!ml found in Loader.exe 1 2022-04-23 2022-08-09
user avatars and server icons in folders are rounded 1 2021-06-02 2022-05-25
CondaEnv auto-offline behaviour with local package repositories 2 2021-12-29 2022-10-05
I lost half of my project when I imported it into Lpub3d 2 2021-06-18 2022-07-04
About "sep peek [address]" stuck ? 2 2021-08-04 2022-09-17
Tempest battery percentage / operating mode 15 2021-08-25 2022-08-22
out of memory at /pytorch/torch/lib/THC/generic/THCStorage.cu:58 3 2018-04-12 2022-09-19
Support the plugin in Intellij IDEA 0 2022-01-14 2022-08-13
Error when inserting fenced code block at EOB 0 2021-08-08 2022-07-30
[0.6-1.4.0-rc] AppleSettings is not accessible in iosMain code 6 2020-07-31 2022-07-21
如何训练检测和识别过程?这个过程是合并还是单独? 0 2021-08-13 2022-10-02
Clarification on IMU propagation 1 2022-05-09 2022-09-02
{Enhancement} HTML toggles for false positives 3 2021-12-07 2022-09-16
Crash while using an editor 6 2022-02-09 2022-09-19
Could not find suitable distribution for Requirement.parse 1 2021-09-14 2022-08-29
Possible to compare a given database with current model 2 2022-04-02 2022-10-04
What is "New default DNS and hosts" in REALEASE 0.6 BETA 15? 0 2021-12-16 2022-09-27
Input buffer has corrupt header: source input: Old-style JPEG compression support is not configured 2 2022-06-11 2022-10-05
background_jobs crashes makes other instances not receive federation updates 18 2021-10-06 2021-11-20
Initial comment and post upvotes failing to federate, stays at zero. 2 2021-10-07 2022-08-19
Regex escape sequences require one extra backslash 0 2022-09-01 2022-09-23
Allow wildcard dns in outposts 0 2022-05-02 2022-09-23
Highlights not working properly 1 2021-03-30 2022-09-13
[Feature Request] underground map view 2 2021-06-06 2022-08-22
Error handling in `get_vm_prefix` does not work as expected 0 2021-05-25 2022-07-19
Can't print / export to PDF 1 2022-02-22 2022-10-05
Remove .placeholder file generated after operator-sdk init command 5 2021-10-20 2022-09-24
Upload to & delete backup from Hitachi Vantara Storage (HCP) fails 2 2021-11-18 2022-09-26
Overlay onHide is not called even if rootClose is true when an element with stopPropagation is clicked. 0 2022-09-28 2022-10-02
Dropdown toggle overlayed not overlayed by dropdown menu 3 2022-09-26 2022-10-02
After importing 1-Base, SDK location not found 6 2015-10-24 2022-10-04
Codepen examples with React UMD not functional: `Uncaught TypeError: Cannot read property 'Component' of undefined` 5 2021-08-05 2022-10-02
VK_KHR_acceleration_structure: missing buffer & deviceAddress VUIDs 0 2022-02-28 2022-07-22
Multiple errors in integrity check report 17 2021-09-03 2022-09-26
Synthesis failed for nodejs-recaptcha-enterprise 4 2020-05-14 2022-10-03
TerminateExecution does not appear to be terminating execution of isolate 2 2021-07-06 2022-10-02
Is this a "bug" in the Mango Queries Guide's Pagination section? 3 2021-09-14 2022-10-05
'a' element within uk-switcher not working as expected 1 2021-02-14 2022-10-03
Cosmos response headers uses the wrong header key 0 2021-06-19 2022-10-05
ftp.pcre.org is no longer available 0 2021-11-05 2022-10-04
x/tools/gopls: update protocol generation to support unions 1 2022-05-18 2022-09-12
`backref` relationships raise `has no attribute` 1 2020-07-29 2022-09-23
CR: DNS contract example: add `get_owner()` message 1 2021-12-16 2022-09-29
Long tooltip series name causes horizontal scrolling 0 2022-05-21 2022-10-05
Błąd REST Api na środowisku testowym i środowisku produkcyjnym 2 2022-04-01 2022-10-02
[Bug report] GitHub links do not respect config 2 2022-06-10 2022-09-19
[l10n_fr_pos_cert] rule for decreasing quantity of point of sale order line 4 2021-10-27 2022-10-05
Videos UI: User progression for multiple courses seems unpredictable. 5 2022-01-13 2022-09-01
Connecting Airflow to Azure data factory fails giving a red banner but doesn't give the reason. 6 2022-01-25 2022-09-23
[Bug]: `<Popover>` component does not use forwardRef 7 2021-07-04 2022-09-23