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

[firebase_core]: <Unable to build Windows app with Flutter 3.x due to icu.lib missing> #13394

Open
1 task done
virusakos opened this issue Sep 25, 2024 · 3 comments
Open
1 task done
Labels
Needs Attention This issue needs maintainer attention. platform: windows Issues / PRs which are specifically for Windows. plugin: core type: bug Something isn't working

Comments

@virusakos
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Core

Which platforms are affected?

Windows

Description

icu.lib is no longer part of the Flutter engine in 3.x versions

Reproducing the issue

Build a Windows app with firebase_core 3.5.0 using Flutter 3.x

Firebase Core version

3.5.0

Flutter Version

3.24.3

Relevant Log Output

[  +38 ms] Link:
[   +4 ms]   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE
/OUT:"C:\xxx\build\windows\x64\runner\Release\x.exe" /INCREMENTAL:NO /NOLOGO ..\flutter\Release\flutter_wrapper_app.lib
dwmapi.lib ..\plugins\desktop_webview_auth\Release\desktop_webview_auth_plugin.lib ..\plugins\firebase_auth\Release\firebase_auth_plugin.lib
..\plugins\firebase_core\Release\firebase_core_plugin.lib ..\plugins\url_launcher_windows\Release\url_launcher_windows_plugin.lib
..\extracted\firebase_cpp_sdk_windows\libs\windows\VS2019\MD\x64\Release\firebase_app.lib advapi32.lib ws2_32.lib crypt32.lib rpcrt4.lib ole32.lib icu.lib
..\extracted\firebase_cpp_sdk_windows\libs\windows\VS2019\MD\x64\Release\firebase_auth.lib ..\flutter\Release\flutter_wrapper_plugin.lib
C:\xxx\windows\flutter\ephemeral\flutter_windows.dll.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib     
uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed
/manifestinput:C:\xxx\windows\runner\runner.exe.manifest
/PDB:"C:/flutter/flutter_application_1/build/windows/x64/runner/Release/x.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:/flutter/flutter_application_1/build/windows/x64/runner/Release/x.lib" /MACHINE:X64  /machine:x64 x.dir\Release\Runner.res        
[  +17 ms]   x.dir\Release\flutter_window.obj
[  +10 ms]   x.dir\Release\main.obj
[   +3 ms]   x.dir\Release\utils.obj
[   +1 ms]   x.dir\Release\win32_window.obj
[        ]   x.dir\Release\generated_plugin_registrant.obj
[ +540 ms] LINK : fatal error LNK1181: cannot open input file 'icu.lib' [C:\xxx\build\windows\x64\runner\x.vcxproj]

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.5.3
Flutter SDK 3.24.3
bpaidiatriki 1.0.0+1

dependencies:
- cupertino_icons 1.0.8
- dropdown_search 5.0.6 [flutter]
- firebase_auth 5.3.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 3.5.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_ui_auth 1.15.0 [email_validator firebase_auth firebase_core firebase_dynamic_links firebase_ui_localizations firebase_ui_oauth firebase_ui_shared flutter flutter_localizations meta]
- firebase_ui_oauth_apple 1.2.21 [firebase_auth firebase_ui_oauth flutter]
- firebase_ui_oauth_google 1.3.3 [firebase_auth firebase_ui_oauth flutter google_sign_in]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- google_sign_in 6.2.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web]
- http 1.2.2 [async http_parser meta web]
- intl 0.19.0 [clock meta path]
- logging 1.2.0
- provider 6.1.2 [collection flutter nested]
- sign_in_with_apple 6.1.2 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web]
- url_launcher 6.3.0 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]

dev dependencies:
- flutter_lints 4.0.0 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service]

transitive dependencies:
- _flutterfire_internals 1.3.43 [collection firebase_core firebase_core_platform_interface flutter meta]
- args 2.5.0
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- collection 1.18.0
- crypto 3.0.5 [typed_data]
- desktop_webview_auth 0.0.15 [crypto flutter http flutter_web_plugins plugin_platform_interface]
- email_validator 2.1.17
- fake_async 1.3.1 [clock collection]
- firebase_auth_platform_interface 7.4.6 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.13.1 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web]
- firebase_core_platform_interface 5.3.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.18.1 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_dynamic_links 6.0.7 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface]
- firebase_dynamic_links_platform_interface 0.2.6+43 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_ui_localizations 1.12.0 [flutter flutter_localizations path]
- firebase_ui_oauth 1.5.3 [desktop_webview_auth firebase_auth firebase_ui_auth firebase_ui_shared flutter_svg flutter]
- firebase_ui_shared 1.4.1 [flutter]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_svg 2.0.10+1 [flutter http vector_graphics vector_graphics_codec vector_graphics_compiler]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- google_identity_services_web 0.3.1+4 [meta web]
- google_sign_in_android 6.1.30 [flutter google_sign_in_platform_interface]
- google_sign_in_ios 5.7.7 [flutter google_sign_in_platform_interface]
- google_sign_in_platform_interface 2.4.5 [flutter plugin_platform_interface]
- google_sign_in_web 0.12.4+2 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http web]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- leak_tracker 10.0.5 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.5 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.1 [leak_tracker matcher meta]
- lints 4.0.0
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.15.0
- nested 1.0.0 [flutter]
- path 1.9.0
- path_parsing 1.0.1 [vector_math meta]
- petitparser 6.0.2 [meta]
- plugin_platform_interface 2.1.8 [meta]
- sign_in_with_apple_platform_interface 1.1.0 [flutter plugin_platform_interface meta]
- sign_in_with_apple_web 2.1.0 [flutter flutter_web_plugins sign_in_with_apple_platform_interface]
- sky_engine 0.0.99
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.11.1 [path]
- stream_channel 2.1.2 [async]
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.7.2 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- typed_data 1.3.2 [collection]
- url_launcher_android 6.3.10 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.3.1 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.2.0 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.2.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.3.3 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.2 [flutter url_launcher_platform_interface]
- vector_graphics 1.1.11+1 [flutter http vector_graphics_codec]
- vector_graphics_codec 1.1.11+1
- vector_graphics_compiler 1.1.11+1 [args meta path_parsing xml vector_graphics_codec path]
- vector_math 2.1.4
- vm_service 14.2.5
- web 1.0.0
- xml 6.5.0 [collection meta petitparser]

Additional context and comments

icudtl.dat has replaced icu.lib and is dynamically loaded at runtime by the Flutter engine.
I believe removing icu from

set(ADDITIONAL_LIBS advapi32 ws2_32 crypt32 rpcrt4 ole32 icu)

should be enough?

@virusakos virusakos added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Sep 25, 2024
@virusakos
Copy link
Author

I have tested it locally and removing icu from set(ADDITIONAL_LIBS advapi32 ws2_32 crypt32 rpcrt4 ole32 icu) build completes without errors.

@SelaseKay SelaseKay added plugin: core platform: windows Issues / PRs which are specifically for Windows. labels Sep 25, 2024
@jsc57x
Copy link

jsc57x commented Oct 11, 2024

I'm running into the same problem. "It works on my machine", but not at the CI system. On my system Visual Studio Professional 2022 is installed and the build completes without errors. The build system uses Visual Studio Build Tools 2022 and the icu.lib could not be opened.

@jsc57x
Copy link

jsc57x commented Oct 14, 2024

Maybe the problem is the OS. As described in firebase/firebase-cpp-sdk#1541 the icu.dll is not part of Windows Server 2017+2019. Our build system is hosted on 2019 and my machine runs Windows 11.
Nonetheless a solution which works on every system would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. platform: windows Issues / PRs which are specifically for Windows. plugin: core type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants