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

[libusb] build failure on Windows - <assert.h> not found #39414

Open
VioletGiraffe opened this issue Jun 20, 2024 · 1 comment
Open

[libusb] build failure on Windows - <assert.h> not found #39414

VioletGiraffe opened this issue Jun 20, 2024 · 1 comment
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@VioletGiraffe
Copy link
Contributor

VioletGiraffe commented Jun 20, 2024

Operating system

Windows

Compiler

MSVC

Steps to reproduce the behavior

vcpkg install --triplet=x64-windows-static-md --x-install-root=3rdparty_vcpkg

Failure logs

vcpkg.log
build-x64-windows-static-md-rel-out.log

Additional context

I have the following vcpkg.json:

{
  "dependencies": [
    { "name": "libusb", "platform": "windows" }
  ]
}

And I build with this command:
vcpkg install --triplet=x64-windows-static-md --x-install-root=3rdparty_vcpkg

CMake configure runs fine, the build starts, and cl.exe complains that <assert.h> is not found. All the relevant logs attached. There is no out-err.log file (there is but it's 0 size).

The same works on 2 other computers, only fails on this one. At first I was sure it's a problem with my Visual Studio installation and I spent hours reinstalling everything. Didn't help. hen I started checking, and realized that other C and C++ libraries compile just fine, and they also include <assert.h>. For example, I checked sqlite3. Also checked raylib (a large C library), exiv2 (a rather large C++ library). I couldn't find any other port that fails in this way, so now reporting this against the libusb port seems justified. But you will have a hard time reproducing the failure as I have no idea what triggers it.

@VioletGiraffe VioletGiraffe added the category:port-bug The issue is with a library, which is something the port should already support label Jun 20, 2024
@VioletGiraffe
Copy link
Contributor Author

VioletGiraffe commented Jul 1, 2024

I managed to fix it by installing the latest Windows 11 SDK, but that still doesn't explain how other C and C++ ports managed to compile. All the necessary files were present, it was only a problem with includepath not being set to what it should be.

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
Projects
None yet
Development

No branches or pull requests

2 participants