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

[libuv] add # ifndef ssize_t #40316

Merged
merged 1 commit into from
Sep 3, 2024
Merged

Conversation

talregev
Copy link
Contributor

@talregev talregev commented Aug 6, 2024

When compile curl with libuv (for their tests) in vcpkg, I get this error:

C:\vcpkg\installed\x64-windows\include\uv\win.h(27,18): error C2628: 'intptr_t' followed by '__int64' is illegal (did you forget a ';'?) [D:\a\curl\curl\bld\src\curl.vcxproj]
Error: Process completed with exit code 1.

I am not sure if vcpkg or curl add the definition of ssize_t.

I create a PR on upstream:
libuv/libuv#4493

upstream want to implement it different way, but I am not sure the source of the problem.

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@talregev talregev changed the title [libub] add # ifndef ssize_t [libuv] add # ifndef ssize_t Aug 6, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Aug 7, 2024

See upstream comments: The issue is probably coming from another port leaking an improper definition of ssize_t. It must be fixed once, in that port. Must be investigated in the non-POSIX world of windows.
@talregev If you lack the time for a proper fix, you must at least report the set of curl features you install when the error occurs.

@talregev
Copy link
Contributor Author

talregev commented Aug 7, 2024

See upstream comments: The issue is probably coming from another port leaking an improper definition of ssize_t. It must be fixed once, in that port. Must be investigated in the non-POSIX world of windows. @talregev If you lack the time for a proper fix, you must at least report the set of curl features you install when the error occurs.

I did it on local branch from curl ci.
minimum packages install that this happen:

vcpkg install brotli zlib zstd libpsl pkgconf libidn2 libssh libuv
with these flags:

-DENABLE_DEBUG=ON -DENABLE_UNICODE=OFF -DCURL_USE_SCHANNEL=OFF -DCURL_BROTLI=ON -DCURL_ZSTD=ON -DCURL_USE_LIBPSL=ON -DHTTP_ONLY=ON -DUSE_LIBIDN2=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DCURL_USE_LIBUV=ON

In addition to:

            "-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
            "-DVCPKG_INSTALLED_DIR=$VCPKG_INSTALLATION_ROOT/installed" \
            '-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-${{ matrix.plat }}' \
            -DCMAKE_VS_GLOBALS=TrackFileAccess=false \
            '-DCMAKE_BUILD_TYPE=${{ matrix.type }}' \
            -DCMAKE_UNITY_BUILD=ON \
            -DCURL_WERROR=ON \
            -DBUILD_EXAMPLES=ON \
            -DENABLE_WEBSOCKETS=ON \
            -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
            -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE= \

@talregev talregev marked this pull request as draft August 7, 2024 05:58
@FrankXie05 FrankXie05 added the category:port-bug The issue is with a library, which is something the port should already support label Aug 7, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Aug 7, 2024

And which file fails to compile?

@talregev
Copy link
Contributor Author

talregev commented Aug 7, 2024

C:\vcpkg\installed\x64-windows\include\uv\win.h(27,18): error C2628: 'intptr_t' followed by '__int64' is illegal (did you forget a ';'?) [D:\a\curl\curl\bld\src\curl.vcxproj]
Error: Process completed with exit code 1.

@dg0yt
Copy link
Contributor

dg0yt commented Aug 7, 2024

That's the header where the error occurs. That's not the source file which constitutes the translation unit.

AFAICS uv.h is only included by docs/examples/multi-uv.c. Which implies:

  • the error only occurs in curl examples, not when building vcpkg ports.
  • before uv.h, there is only
#include <stdio.h>
#include <stdlib.h>

If this enough to reproduce the error, that would be a good base for an error report to libuv.

@dg0yt
Copy link
Contributor

dg0yt commented Aug 7, 2024

jdkfshjkfhdujhiuhfldjyfdhskjfydfdsyjsrc/tool_operate.cjdkfshjkfhdujhiuhfldjyfdhskjfydfd

@talregev talregev marked this pull request as ready for review August 19, 2024 16:08
@talregev
Copy link
Contributor Author

talregev commented Aug 19, 2024

@FrankXie05
This PR is ready for review.
It take a long time to solve the real problem and search why the ssize_t is defined on curl port. (because curl or other ports, maybe boths) and fix this from their side.
This is a workaround until we find the correct solution.

@talregev
Copy link
Contributor Author

@Cheney-W Can you review my PR?

@FrankXie05 FrankXie05 added the info:reviewed Pull Request changes follow basic guidelines label Aug 20, 2024
@vicroms vicroms added the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Aug 27, 2024
@vicroms vicroms merged commit 40e98b5 into microsoft:master Sep 3, 2024
16 checks passed
@talregev talregev deleted the TalR/libuv_ssize_t branch September 4, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants