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

Visual Studio compilation error: "LightGBM::inet_pton ambiguous call to overloaded function" #5499

Closed
ArtificialZeng opened this issue Sep 23, 2022 · 3 comments
Labels

Comments

@ArtificialZeng
Copy link

1>------ 已启动生成: 项目: LightGBM, 配置: Release x64 ------
1>application.cpp
1>boosting.cpp
1>gbdt.cpp
1>gbdt_model_text.cpp
1>gbdt_prediction.cpp
1>prediction_early_stop.cpp
1>c_api.cpp
1>bin.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\c_api.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\application\application.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\boosting\gbdt_model_text.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\io\bin.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\boosting\boosting.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\boosting\gbdt_prediction.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\boosting\gbdt.cpp)
1>config.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\io\config.cpp)
1>config_auto.cpp
1>dataset.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\io\config_auto.cpp)
1>dataset_loader.cpp
1>file_io.cpp
1>json11.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\io\dataset.cpp)
1>metadata.cpp
1>parser.cpp
1>train_share_states.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\io\dataset_loader.cpp)
1>tree.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\io\parser.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\io\metadata.cpp)
1>dcg_calculator.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\io\train_share_states.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\io\tree.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\metric\dcg_calculator.cpp)
1>metric.cpp
1>network.cpp
1>linkers_mpi.cpp
1>linkers_socket.cpp
1>linker_topo.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\metric\metric.cpp)
1>objective_function.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\network\network.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\network\linkers_socket.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\network\linker_topo.cpp)
1>main.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\objective\objective_function.cpp)
1>data_parallel_tree_learner.cpp
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(70,7): warning C4996: 'WSAStringToAddressA': Use WSAStringToAddressW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings (编译源文件 ..\src\network\network.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(236,1): error C2668: “LightGBM::inet_pton”: 对重载函数的调用不明确 (编译源文件 ..\src\network\network.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(60,12): message : 可能是“int LightGBM::inet_pton(int,const char *,void *)” (编译源文件 ..\src\network\network.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\ws2tcpip.h(573,1): message : 或 “INT inet_pton(INT,PCSTR,PVOID)”[使用参数相关的查找找到] (编译源文件 ..\src\network\network.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(236,1): message : 尝试匹配参数列表“(int, const char *, IN_ADDR *)”时 (编译源文件 ..\src\network\network.cpp)
1>feature_parallel_tree_learner.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\main.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\treelearner\data_parallel_tree_learner.cpp)
1>linear_tree_learner.cpp
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(70,7): warning C4996: 'WSAStringToAddressA': Use WSAStringToAddressW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings (编译源文件 ..\src\network\linkers_socket.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(236,1): error C2668: “LightGBM::inet_pton”: 对重载函数的调用不明确 (编译源文件 ..\src\network\linkers_socket.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(60,12): message : 可能是“int LightGBM::inet_pton(int,const char *,void *)” (编译源文件 ..\src\network\linkers_socket.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\ws2tcpip.h(573,1): message : 或 “INT inet_pton(INT,PCSTR,PVOID)”[使用参数相关的查找找到] (编译源文件 ..\src\network\linkers_socket.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(236,1): message : 尝试匹配参数列表“(int, const char *, IN_ADDR *)”时 (编译源文件 ..\src\network\linkers_socket.cpp)
1>serial_tree_learner.cpp
1>tree_learner.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\treelearner\feature_parallel_tree_learner.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\treelearner\linear_tree_learner.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\treelearner\serial_tree_learner.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(70,7): warning C4996: 'WSAStringToAddressA': Use WSAStringToAddressW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings (编译源文件 ..\src\main.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(236,1): error C2668: “LightGBM::inet_pton”: 对重载函数的调用不明确 (编译源文件 ..\src\main.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(60,12): message : 可能是“int LightGBM::inet_pton(int,const char *,void *)” (编译源文件 ..\src\main.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\ws2tcpip.h(573,1): message : 或 “INT inet_pton(INT,PCSTR,PVOID)”[使用参数相关的查找找到] (编译源文件 ..\src\main.cpp)
1>G:\quantProject\LightGBM\src\network\socket_wrapper.hpp(236,1): message : 尝试匹配参数列表“(int, const char *, IN_ADDR *)”时 (编译源文件 ..\src\main.cpp)
1>voting_parallel_tree_learner.cpp
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\treelearner\tree_learner.cpp)
1>G:\quantProject\LightGBM\external_libs\eigen\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\treelearner\linear_tree_learner.cpp)
1>G:\quantProject\LightGBM\external_libs\eigen\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\treelearner\linear_tree_learner.cpp)
1>G:\quantProject\LightGBM\external_libs\eigen\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(666,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\treelearner\linear_tree_learner.cpp)
1>G:\quantProject\LightGBM\external_libs\fast_double_parser\include\fast_double_parser.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ..\src\treelearner\voting_parallel_tree_learner.cpp)
1>已完成生成项目“LightGBM.vcxproj”的操作 - 失败。
========== “生成”: 0 成功,1 失败,0 更新,0 已跳过 ==========

Description

Reproducible example

Environment info

LightGBM version or commit hash:

Command(s) you used to install LightGBM

Additional Comments

@jameslamb
Copy link
Collaborator

Thanks for your interest in LightGBM!

I put some of the text of those logs through Google Translate (I cannot read the language they're in, apologies), and saw that it looks like you are hitting this during compilation:

error C2668: "LightGBM::inet_pton": ambiguous call to overloaded function (compile source file..\src\network \linkers_socket.cpp)

LightGBM has its own implementation of inet_pton, but some newer compilers on Windows ship with their own, conflicting implementation.

If you searched this project's issue tracker for that error message, you'd see that the same error was reported in #5019, and fixed about 5 months ago in #5159.

Please update to a newer version of LightGBM's source code, from at least after #5159.

If that doesn't resolve the issue you're facing, please click below to see the information we need to efficiently, effectively help you.

how to ask for help (click me)

It is very very very difficult for maintainers to help you when you only report a wall of logs without other context.

  • are you installing the Python package / R package? just building the CLI? something else?
  • how did you try to install LightGBM?
  • what version are you using?
  • it seems like you might be using Visual Studio to compile LightGBM... what version of Visual Studio? Did you customize anything about the installation?

Without answers like this, you are asking maintainers here to guess what you're doing, and that will take away our already-limited time from other work on this project.

Can you please provide the answers to the questions I've asked above?

@jameslamb jameslamb changed the title Visual Studio build from source bug Visual Studio compilation error: "LightGBM::inet_pton ambiguous call to overloaded function" Oct 7, 2022
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one. Thank you for taking the time to improve LightGBM!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

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

No branches or pull requests

2 participants