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

Warning: Redefining fopen64 with std::fopen #576

Closed
jakirkham opened this issue Oct 25, 2019 · 4 comments · Fixed by #598
Closed

Warning: Redefining fopen64 with std::fopen #576

jakirkham opened this issue Oct 25, 2019 · 4 comments · Fixed by #598

Comments

@jakirkham
Copy link

jakirkham commented Oct 25, 2019

Am seeing the following warning when building xgboost on Linux and macOS. It seems to be pointing to dmlc-core. So am raising here. Appears there is an issue where fopen64 is being redefined with std::fopen. Build logs linked below as well in case they are of interest.

/home/conda/feedstock_root/build_artifacts/xgboost_1571964986924/work/dmlc-core/src/build_config.cc:14:6: warning: #warning "Redefining fopen64 with std::fopen" [-Wcpp]
     #warning "Redefining fopen64 with std::fopen"
      ^~~~~~~

ref: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=84089

@hcho3
Copy link
Contributor

hcho3 commented Oct 25, 2019

@jakirkham This is expected, since you are using 64-bit systems. Some 32-bit systems define fopen64() and fopen() separately, whereas in 64-bit systems, fopen64() is an alias of fopen().

@leezu
Copy link
Contributor

leezu commented Mar 6, 2020

@hcho3 why then print the warning? If this is standard practice, no need to print an extra warning

#ifdef DMLC_EMIT_FOPEN64_REDEFINE_WARNING
#ifdef _MSC_VER
#pragma message(": warning : Redefining fopen64 with std::fopen")
#else
#warning "Redefining fopen64 with std::fopen"
#endif
#endif // DMLC_EMIT_FOPEN64_REDEFINE_WARNING

If not, why do it?

@hcho3
Copy link
Contributor

hcho3 commented Mar 6, 2020

@leezu I didn't add the warning. The warning was added by #432.

@leezu
Copy link
Contributor

leezu commented Mar 6, 2020

Ok. I suggest to remove the warning: #598

@szha szha closed this as completed in #598 Mar 10, 2020
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

Successfully merging a pull request may close this issue.

3 participants