-
Notifications
You must be signed in to change notification settings - Fork 58
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
Compilation issue: Missing strtod_l and locale_t #30
Comments
Thanks for the report. It looks like it might be a bug on my end.
You are using GNU GCC and it definitively supports it. It even says so in your stream...
|
Let me investigate the issue a bit. |
I think I understand what is going on. |
@AlbertoEAF Can you try with this commit... My guess is not that you are missing the function but rather that, somehow, the include xlocale.h does not pan out. It is a complicated issue. If you are mixing and matching various runtime libraries and with various compilers, it gets a bit tricky. I think my new heuristic should work. (I looked at your CI and it a bit difficult to reproduce at the moment.) |
Great Lemire! I will test it Monday ;) |
@AlbertoEAF Great. Please follow-up. This include code is something new, and I am eager to get it right. |
It is really simply a matter of declaring the function which may involve including the right header. My backup plan is to kill strtod_l and go with @nigeltao proposal (which is to include our own fallback parser... thankfully something that is quite easy thanks to Nigel's pointers). It will fatten a bit the header, so I'd prefer if we could just use strtod_l especially since it is present on the systems you care about. |
By the way, the other library I'm using follows this approach: Don't know if it helps, anyway I'll try your commit first ;) |
On freebsd and apple platforms, we definitively should be including xlocale.h already. This morning, I will see about adding more platform coverage on my end. |
@AlbertoEAF I have just updated my CI to include many, many systems... Visit the README on github... https://github.com/lemire/fast_double_parser I cannot reproduce any build problems. Did you get around to testing the issue further? E.g., you could just describe the system where you encounter the issue. |
Note that my CI tests include FreeBSD. They do not include macos but I am a mac user myself, so mac support is never an issue. |
Hello @lemire, yes we had progress using that commit. ;) It no longer fails on that job due to locale: https://travis-ci.org/github/microsoft/LightGBM/jobs/731344749. Now it fails with internal LGBM build system issues alone. I'd like to thank you for your work @lemire, it was a really quick turn-around time and effective ;) Thanks for developing and maintaining this project! |
Fantastic. I am closing this issue now. Please come back if there is more we can do. |
Hello,
I'm using this library for LightGBM (microsoft/LightGBM#3405) and whilst I'm really happy with it, there are some CI environments where this does not compile. I don't understand why. CMakeLists claims strtod_l was found:
You can see the job error details here. See lines 704 and 708 for instance: https://travis-ci.org/github/microsoft/LightGBM/jobs/730024056
I first mistakenly added this issue at the fmt library which I'm also using and they suggested using this fmtlib/fmt#1901.
As
strtod_l
andlocale_t
are non-standard, how do you solve this usually?The text was updated successfully, but these errors were encountered: