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

[WIP] build: enable WinIDN by default #13947

Closed
wants to merge 4 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Jun 14, 2024

Windows XP is not compatible with WinIDN by default. It requires
a Normaliz.dll to be installed, but the necessary package is no longer
offered by Microsoft. Thus, for Windows XP compatibility, we recommend
building with -DUSE_WIN32_IDN=OFF.

Discussion: #13565
Closes #13947


Cleaner diff without whitespace changes: https://github.com/curl/curl/pull/13947/files?w=1

There are a few ways to resolve compatibility with existing builds
and also to handle interactions with the USE_LIBIDN2 option.
This is an initial attempt.

TODO:

  • cmake: detect WinXP target using HAVE_WIN32_WINNT and adjust default USE_WIN32_IDN setting accordingly?
  • review and update CI jobs where/if necessary.
  • review and fixup WinIDN / libidn2 interactions in autotools.
  • fix autotools logic to only make WinIDN the default when targeting native Windows.
  • figure out how to make IDN tests work on Windows.
  • split off VS2008 log dump on failure in AppVeyor into separate PR. → appveyor: dump build logs on failure in VS2008 jobs #13957

@vszakats vszakats added build Windows Windows-specific name lookup DNS and related tech labels Jun 14, 2024
@vszakats vszakats marked this pull request as draft June 14, 2024 02:31
@vszakats
Copy link
Member Author

Tests are unprepared to handle IDN with Windows, both UNICODE and non-UNICODE modes (but differently).

@github-actions github-actions bot added the CI Continuous Integration label Jun 14, 2024
@vszakats
Copy link
Member Author

vszakats commented Jun 14, 2024

Unexpected fallout with VS2008. Vista target, Normaliz.lib specified, yet the IDN functions are not found:

6>unity_0.obj : error LNK2019: unresolved external symbol __imp__IdnToAscii@20 referenced in function _win32_idn_to_ascii
6>unity_0.obj : error LNK2019: unresolved external symbol __imp__IdnToUnicode@20 referenced in function _win32_ascii_to_idn
6>C:\projects\curl\_bld\lib\libcurl.dll : fatal error LNK1120: 2 unresolved externals

Anybody with a solution for the above issue?

I still couldn't figure out how to enable verbose logging for the VS2008 jobs. [RESOLVED]

@vszakats
Copy link
Member Author

The VS2008 issue was reported here earlier: #1863

This trace message says that normaliz is added to the list of libs:

-- ws2_32;bcrypt;wldap32;normaliz

Ref: https://ci.appveyor.com/project/curlorg/curl/builds/50021801/job/xpd1d5cor294gp3m#L42

It feels like something very obvious (or something very cryptic). Seeing the actual linker command would tell more of what's happening.

Windows XP is not compatible with WinIDN by default. It requires
a `normaliz.dll` to be installed, but the necessary package is no longer
offered by Microsoft. Thus, for Windows XP compatibility, we recommend
building with `-DUSE_WIN32_IDN=OFF`.

Discussion: curl#13565
Closes #xxxxx
@vszakats
Copy link
Member Author

vszakats commented Jun 17, 2024

Backing off of this. It looks nearly hopeless to make IDN tests pass on Windows (without going crazies that is.) It needs passing Unicode text via the command-line for starters. Also the unexplained VC2008 fallout. Then autotools.

I might cherry pick the part moving WINVER detection up to the top.

Feel free to pick up and continue.

@vszakats vszakats closed this Jun 17, 2024
@vszakats vszakats deleted the winidn-default branch June 17, 2024 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build CI Continuous Integration name lookup DNS and related tech Windows Windows-specific
Development

Successfully merging this pull request may close these issues.

None yet

1 participant