Skip to content

"Cannot find file libprotobuf-lite.lib -- file exists / no error" #3581

@stephengtuggy

Description

@stephengtuggy

Describe your environment

Hi. I'm running into a weird and frustrating error message when I run cmake --install .... I'm on Windows 11 Pro (running in a virtual machine, if that matters). I'm using Visual Studio 2022 and CMake 4.0. I did a git clone of opentelemetry-cpp onto my machine under the V:\ drive, then ran the cmake configure, build, and install commands as listed here. I believe this is opentelemetry-cpp version 1.22.0, from the main branch.

Steps to reproduce

To reproduce, run the following in PowerShell for Visual Studio 2022:

mkdir build && cd build
cmake -DBUILD_TESTING=OFF -DWITH_OTLP_FILE=ON -DWITH_STL=OFF -DWITH_EXAMPLES=ON -DWITH_ABSEIL=ON -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .
cmake --install . --prefix ..\..\Vega-Strike-Engine-Source\

What is the expected behavior?

The CMake configuration, generation, build and install steps should all succeed without errors.

What is the actual behavior?

The CMake install command at the end gives me the following:

-- Install configuration: "Release"
CMake Error at _deps/protobuf-build/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "V:/opentelemetry-cpp/build/_deps/protobuf-build/Release/libprotobuf-lite.lib":
  No error.
Call Stack (most recent call first):
  cmake_install.cmake:37 (include)

Sometimes there are build errors as well. And depending on the parameters I pass to CMake, the error might say "File exists" in place of "No error." Then it gets really confusing! Does the file exist, or not?

Additional context

I have confirmed that the file mentioned in the error message does NOT exist. There is no Release folder under protobuf-build.

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage/needs-informationIndicates an issue needs more information in order to work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions