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

3.0b1 build error with musl c library #5407

Closed
Chocimier opened this issue Dec 12, 2018 · 2 comments
Closed

3.0b1 build error with musl c library #5407

Chocimier opened this issue Dec 12, 2018 · 2 comments
Milestone

Comments

@Chocimier
Copy link

Tested to build 3.0b1 for Void Linux. With glibc it compiles, but not with musl:

/builddir/fish-3.0b1/src/builtin_printf.cpp: In function 'T raw_string_to_scalar_type(const wchar_t*, wchar_t**) [with T = long double]':
/builddir/fish-3.0b1/src/builtin_printf.cpp:278:12: error: 'wcstod_l' was not declared in this scope
     return wcstod_l(s, end, fish_c_locale());
            ^~~~~~~~
/builddir/fish-3.0b1/src/builtin_printf.cpp:278:12: note: suggested alternative: 'wcstoull'
     return wcstod_l(s, end, fish_c_locale());
            ^~~~~~~~
            wcstoull

/builddir/fish-3.0b1/src/wutil.cpp: In function 'double fish_wcstod(const wchar_t*, wchar_t**)':
/builddir/fish-3.0b1/src/wutil.cpp:776:12: error: 'wcstod_l' was not declared in this scope
     return wcstod_l(str, endptr, fish_c_locale());
            ^~~~~~~~
/builddir/fish-3.0b1/src/wutil.cpp:776:12: note: suggested alternative: 'wcstoull'
     return wcstod_l(str, endptr, fish_c_locale());
            ^~~~~~~~
            wcstoull
faho added a commit to faho/fish-shell that referenced this issue Dec 12, 2018
Just sets locale to "C" (because that's the only one we need), does
wcstod and resets the locale.

No idea why uselocale(loc) failed for me, but it did.

Fixes fish-shell#5407.
@faho faho added this to the fish-3.0 milestone Dec 12, 2018
@faho
Copy link
Member

faho commented Dec 12, 2018

I just added ffab420, which adds the stupidest possible wcstod_l "implementation".

It builds and runs on void musl.

@faho faho closed this as completed Dec 12, 2018
@andrew-schulman
Copy link
Contributor

FYI, Cygwin also has this problem. ffab420 seems to fix it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants