flutter_secure_storage
flutter_secure_storage copied to clipboard
Linux deprecated literal operator
On the latest fedora version, I get the following errors:
project/linux/flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_linux/linux/include/json.hpp:24392:35: error: identifier '_json' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
project/linux/flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_linux/linux/include/json.hpp:24400:49: error: identifier '_json_pointer' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
project/linux/flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_linux/linux/include/json.hpp:24464:58: error: identifier '_json' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
project/linux/flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_linux/linux/include/json.hpp:24465:58: error: identifier '_json_pointer' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
Error: Build process failed
Using flutter_secure_storage 9.2.4 and flutter_secure_storage_linux 1.2.2
If I remove the spaces around the string literal, the app compiles again.
I am encountering this on my ubuntu 25 too
Same issue after upgrading to Fedora 42
As a workaround until is https://github.com/juliansteenbakker/flutter_secure_storage/pull/923 merged, those two overrides fixes it for me on Ubuntu 25.04:
dependency_overrides:
flutter_secure_storage_linux:
git:
url: https://github.com/m-berto/flutter_secure_storage.git
ref: patch-2
path: flutter_secure_storage_linux
flutter_secure_storage_platform_interface: 2.0.0
I encountered this build failure issue on Fedora 42, and the PR #923 fixed it.
⚠️ This issue has been marked as stale because it has been open for 60 days with no activity.
If this issue is still relevant, please comment to keep it active. Otherwise, it will be closed in 60 days.
I think this is still relevant, as the PR has not been merged.
I successfully worked around this by adding -Wno-error=deprecated-literal-operator to linux/CMakeLists.txt, so that the corresponding section looks like this:
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_14)
target_compile_options(${TARGET} PRIVATE -Wall -Werror -Wno-error=deprecated-literal-operator)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
endfunction()
This still produces a warning, but it does not stop the build
Gonna comment on this as well to keep everything from being stale. I too have this issue.