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

Noob question: Compiling issues - missing strtod_l and locale_t #1901

Closed
AlbertoEAF opened this issue Sep 25, 2020 · 2 comments
Closed

Noob question: Compiling issues - missing strtod_l and locale_t #1901

AlbertoEAF opened this issue Sep 25, 2020 · 2 comments

Comments

@AlbertoEAF
Copy link

Hello,

I used fmt to replace numeric->string conversions in LightGBM microsoft/LightGBM#3405 and whilst in many environments it compiles and works very fast, there are some systems where it doesn't compile. I don't understand why. CMakeLists claims strtod_l was found:

-- Looking for strtod_l - found
-- Configuring done

but then the compilation fails. See lines 704 and 708 for instance: https://travis-ci.org/github/microsoft/LightGBM/jobs/730024056
image

Any ideas of what's the cause?

I believe it's something really basic and stupid from my part but don't know what I'm missing.

Thank you!

P.S.: This library is awesome - easy, featureful and FAST!! Thank you for that!

@vitaut
Copy link
Contributor

vitaut commented Sep 25, 2020

fast_double_parser.h is not a part of {fmt}. Here's the detection code in case you want to replicate it in your project:

fmt/CMakeLists.txt

Lines 165 to 175 in 34179b3

set(strtod_l_headers stdlib.h)
if (APPLE)
set(strtod_l_headers ${strtod_l_headers} xlocale.h)
endif ()
include(CheckSymbolExists)
if (WIN32)
check_symbol_exists(_strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
else ()
check_symbol_exists(strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
endif ()

@vitaut vitaut closed this as completed Sep 25, 2020
@AlbertoEAF
Copy link
Author

Thank you, my bad!

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