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

Android build is failing because of localeconv #327

Closed
dpantele opened this issue May 17, 2016 · 1 comment
Closed

Android build is failing because of localeconv #327

dpantele opened this issue May 17, 2016 · 1 comment

Comments

@dpantele
Copy link

Locale support added the following issue with the android build:

/tmp/asdk/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -MMD -MP -MF ./obj/local/armeabi-v7a/objs-debug/hello-jni/hello-jni.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mthumb -Os -g -DNDEBUG -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -O0 -UNDEBUG -marm -fno-omit-frame-pointer -I/tmp/asdk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include -I/tmp/asdk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -I/tmp/asdk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -Ijni/../../fmt-3.0.0 -Ijni -DANDROID  -Wa,--noexecstack -Wformat -Werror=format-security  -fexceptions     -I/tmp/asdk/android-ndk-r10e/platforms/android-19/arch-arm/usr/include -c  jni/hello-jni.cpp -o ./obj/local/armeabi-v7a/objs-debug/hello-jni/hello-jni.o 
In file included from jni/hello-jni.cpp:19:0:
jni/../../fmt-3.0.0/fmt/format.h: In member function 'void fmt::BasicWriter<Char>::write_int(T, Spec)':
jni/../../fmt-3.0.0/fmt/format.h:2756:45: error: 'struct lconv' has no member named 'thousands_sep'
     fmt::StringRef sep = std::localeconv()->thousands_sep;

The problem is that in some implementation the lconv structed is just stubbed:

#if 1 /* MISSING FROM BIONIC - DEFINED TO MAKE libstdc++-v3 happy */
struct lconv { };
struct lconv *localeconv(void);
#endif /* MISSING */

However, c++ api exists, and everything compiles after the patch: https://gist.github.com/dpantele/d2e2aec8ff23b0208245c8a6e882f7fe

A haven't checked if it works though, because I am not an android dev.

@vitaut
Copy link
Contributor

vitaut commented May 17, 2016

Thanks for catching this. Could you by any chance submit a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants