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
Enable IDN on Windows when building with clang #12606
Conversation
So why isn't |
It doesn't look right to enable Windows SDK-specific code based on compiler vendor. What needs to be seen is why this build env is missing these Windows declarations What build tool, build config, curl version is this happening with? |
@mraunak: this PR awaits info from you... |
Hi Team, Thank you very much for your input. idn.c gets compiled successfully with CLANG 15.0.7 but has the error shown above when compiled with CLANG 17 Build tool: Bazel version 6.4.0 Build config: Curl version: curl 8.4.0 (Windows) libcurl/8.4.0 Schannel WinIDN Clang version: 17.0.6 |
Could you show the actual compile error? That's not included in that snippet. |
Hi @dfandrich, please find the attached log with the error. Please let me know if any further information is needed from my end |
The underlying errors seem to be the same as in your initial screenshot:
So, the question from vszakats still stands: why this build env is missing these Windows declarations? |
Hi Team, IdnToUnicode and IdnToASCII function is handled by WinNls.h The other solution is to update the TensorFlow configuration file for the Windows platform, for this approach, there is no need for a PR to Curl. |
If this is caused by mismatched Edit: As seen in Windows SDK 7.1 and mingw-w64 Windows headers, if undefined, |
This could be caused by missing defines/includes/files to compile&link in https://github.com/tensorflow/tensorflow/blob/master/third_party/curl.BUILD |
Is this correct though? According to the comment it's trying to fix something in curl The Tensorflow build hack triggers some logic in curl, which Lines 320 to 380 in 24ae4a0
This logic in curl seems dangerous and possibly obsolete, but I haven't tried but this problem might be fixed by deleting either The other logic in curl that touches Lines 2471 to 2488 in 24ae4a0
Added as part of a commit fixing legacy-mingw issues in 37f1c21. |
Hi Team, Thank you very much for your input, removing the hack (D_USING_V110_SDK71_) works. |
- If the minimum Windows target OS is pre-Vista (_WIN32_WINNT < 0x600) then error. - Stop comparing against WINVER when making the minimum OS determinations (ie check only _WIN32_WINNT instead of both since that's the one that matters). Prior to this change, if --with-winidn was used in such a case configure would change the minimum target OS to Vista (0x600) so the build would compile. That was done primarily as a workaround for original MinGW which we no longer support. Bug: curl#12606 (comment) Reported-by: Viktor Szakats Closes #xxxxx
I will check this with some old Visual Studio versions. I think it was primarily meant as workarounds for old versions (which are still supported via winbuild and pregenerated projects). I don't know why it would be applied to new versions. Regardless that tensor hack is fishy.
|
- If the minimum Windows target OS is pre-Vista (_WIN32_WINNT < 0x600) then error. - Stop comparing against WINVER when making the minimum OS determinations (ie check only _WIN32_WINNT instead of both since that's the one that matters). Prior to this change, if --with-winidn was used in such a case configure would change the minimum target OS to Vista (0x600) so the build would compile. That was done primarily as a workaround for original MinGW which we no longer support. Bug: curl#12606 (comment) Reported-by: Viktor Szakats Closes #xxxxx
@mraunak I take it this PR is no longer actually necessary or wanted? |
Hi @bagder, yes, we can close it. Thank you! |
Thanks! |
This PR aims to enable IDN on the Windows platform with CLANG compiler version 17 which is required to successfully
build TensorFlow-CPU on the Windows
Changed https://github.com/curl/curl/blob/master/lib/idn.c to use an inbuilt Windows function IdnToAscii on the Clang Compiler
Below is the screenshot of the error: