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

Latest version does not build on Windows #908

Closed
gerald-lee opened this issue Jul 14, 2020 · 13 comments
Closed

Latest version does not build on Windows #908

gerald-lee opened this issue Jul 14, 2020 · 13 comments
Assignees

Comments

@gerald-lee
Copy link

gerald-lee commented Jul 14, 2020

When I run below command
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C://Python//Python37//python.exe" mediapipe/examples/desktop/hello_world

it generates the error:

ERROR: D:/git/mediapipe/mediapipe/framework/BUILD:824:1: C++ compilation of rule '//mediapipe/framework:packet' failed (Exit 2)
.\mediapipe/framework/packet.h(448): error C2672: 'absl::lts_2020_02_25::make_unique': no matching overloaded function found
.\mediapipe/framework/packet.h(448): error C2783: 'void std::make_unique(_Types &&...)': could not deduce template argument for '__formal'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include\memory(2078): note: see declaration of 'std::make_unique'
Target //mediapipe/examples/desktop/hello_world:hello_world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 71.407s, Critical Path: 68.40s
INFO: 152 processes: 152 local.
FAILED: Build did NOT complete successfully

I am using C++ BuildTools version 14.26.28801

If I rollback to mediapipe May version, it builds successfully.

@gerald-lee
Copy link
Author

Also, at step 9 of windows installation guideline, I believe double slash should be used for the PYTHON_BIN_PATH. Otherwise, it will reproduce the issue 724.

i.e.
Note: For building MediaPipe on Windows, please add --action_env PYTHON_BIN_PATH="C://path//to//python.exe" to the build command
C:\Users\Username\mediapipe_repo>bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C://python_36//python.exe" mediapipe/examples/desktop/hello_world

@rohabimbesat
Copy link

i have the exact same issue

@jiuqiant jiuqiant self-assigned this Jul 15, 2020
@tonywang531
Copy link

tonywang531 commented Jul 16, 2020

My C++ BuildTools version is 14.26.28808 and I have the same issue

@jiuqiant
Copy link
Contributor

The issue occurs at https://github.com/google/mediapipe/blob/e9fbe868e55fa23aaabc31f9f847c22287062850/mediapipe/framework/packet.h#L448

GCC and clang are ok with the syntax [] { return absl::make_unique<Holder<T>>(new T); }) on Linux and macos. However, MSVC is not. It's unclear to me what't the right fix for MSVC on Windows. Any suggestions are welcome.

Please note that MediaPipe Windows support is experimental since we have limited resources and mainly focus on Linux and mobile platforms.

@rahulvenkat
Copy link

When I run below command
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C://Python//Python37//python.exe" mediapipe/examples/desktop/hello_world

it generates the error:

ERROR: D:/git/mediapipe/mediapipe/framework/BUILD:824:1: C++ compilation of rule '//mediapipe/framework:packet' failed (Exit 2)
.\mediapipe/framework/packet.h(448): error C2672: 'absl::lts_2020_02_25::make_unique': no matching overloaded function found
.\mediapipe/framework/packet.h(448): error C2783: 'void std::make_unique(_Types &&...)': could not deduce template argument for '__formal'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include\memory(2078): note: see declaration of 'std::make_unique'
Target //mediapipe/examples/desktop/hello_world:hello_world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 71.407s, Critical Path: 68.40s
INFO: 152 processes: 152 local.
FAILED: Build did NOT complete successfully

I am using C++ BuildTools version 14.26.28801

If I rollback to May version, it builds successfully.

How do you rollback to May version? Do you have a link?

@rahulvenkat
Copy link

I rolledback to BUildTools version 14.25.28610 and I still see the issue:

ERROR: C:/mediapipe_repo/mediapipe/mediapipe/framework/BUILD:824:11: C++ compilation of rule '//mediapipe/framework:packet' failed (Exit 2)
.\mediapipe/framework/packet.h(448): error C2672: 'absl::lts_2020_02_25::make_unique': no matching overloaded function found
.\mediapipe/framework/packet.h(448): error C2783: 'void std::make_unique(_Types &&...)': could not deduce template argument for '__formal'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include\memory(2074): note: see declaration of 'std::make_unique'
Target //mediapipe/examples/desktop/hello_world:hello_world failed to build

@tonywang531
Copy link

When I run below command
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C://Python//Python37//python.exe" mediapipe/examples/desktop/hello_world
it generates the error:

ERROR: D:/git/mediapipe/mediapipe/framework/BUILD:824:1: C++ compilation of rule '//mediapipe/framework:packet' failed (Exit 2)
.\mediapipe/framework/packet.h(448): error C2672: 'absl::lts_2020_02_25::make_unique': no matching overloaded function found
.\mediapipe/framework/packet.h(448): error C2783: 'void std::make_unique(_Types &&...)': could not deduce template argument for '__formal'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include\memory(2078): note: see declaration of 'std::make_unique'
Target //mediapipe/examples/desktop/hello_world:hello_world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 71.407s, Critical Path: 68.40s
INFO: 152 processes: 152 local.
FAILED: Build did NOT complete successfully

I am using C++ BuildTools version 14.26.28801
If I rollback to May version, it builds successfully.

How do you rollback to May version? Do you have a link?

https://github.com/google/mediapipe/releases/tag/v0.7.5
You can download the older version as zip here

@jiuqiant
Copy link
Contributor

When I run below command
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C://Python//Python37//python.exe" mediapipe/examples/desktop/hello_world
it generates the error:

ERROR: D:/git/mediapipe/mediapipe/framework/BUILD:824:1: C++ compilation of rule '//mediapipe/framework:packet' failed (Exit 2)
.\mediapipe/framework/packet.h(448): error C2672: 'absl::lts_2020_02_25::make_unique': no matching overloaded function found
.\mediapipe/framework/packet.h(448): error C2783: 'void std::make_unique(_Types &&...)': could not deduce template argument for '__formal'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include\memory(2078): note: see declaration of 'std::make_unique'
Target //mediapipe/examples/desktop/hello_world:hello_world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 71.407s, Critical Path: 68.40s
INFO: 152 processes: 152 local.
FAILED: Build did NOT complete successfully

I am using C++ BuildTools version 14.26.28801
If I rollback to May version, it builds successfully.

How do you rollback to May version? Do you have a link?

https://github.com/google/mediapipe/releases/tag/v0.7.5
You can download the older version as zip here

Or just do mediapipe> git checkout v0.7.5.

@Jayant-Jeet
Copy link

When I run below command
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C://Python//Python37//python.exe" mediapipe/examples/desktop/hello_world
it generates the error:

ERROR: D:/git/mediapipe/mediapipe/framework/BUILD:824:1: C++ compilation of rule '//mediapipe/framework:packet' failed (Exit 2)
.\mediapipe/framework/packet.h(448): error C2672: 'absl::lts_2020_02_25::make_unique': no matching overloaded function found
.\mediapipe/framework/packet.h(448): error C2783: 'void std::make_unique(_Types &&...)': could not deduce template argument for '__formal'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include\memory(2078): note: see declaration of 'std::make_unique'
Target //mediapipe/examples/desktop/hello_world:hello_world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 71.407s, Critical Path: 68.40s
INFO: 152 processes: 152 local.
FAILED: Build did NOT complete successfully

I am using C++ BuildTools version 14.26.28801
If I rollback to May version, it builds successfully.

How do you rollback to May version? Do you have a link?

https://github.com/google/mediapipe/releases/tag/v0.7.5
You can download the older version as zip here

Or just do mediapipe> git checkout v0.7.5.

Same issue. Rolling back to v0.7.5 works

@JERMYH
Copy link

JERMYH commented Sep 12, 2020

I have exactly the same issue. I wonder know if there is a new way to fix it now instead rollback the version

@Max3LakaJUMP
Copy link

Max3LakaJUMP commented Oct 3, 2020

It seems like:
https://stackoverflow.com/questions/49117293/templated-variables-bug-with-lambdas-in-visual-studio

This without lambda compiles:

template <typename T>
std::unique_ptr<Holder<T>> GetPointer() {
    return absl::make_unique<Holder<T>>(new T);
}
template <typename T>
NoDestructor<mediapipe::RegistrationToken>
    MessageRegistrationImpl<T>::registration(MessageHolderRegistry::Register(
        T{}.GetTypeName(), GetPointer<T>));

@jiuqiant
Copy link
Contributor

See the fix at #975 (comment).

@jiuqiant
Copy link
Contributor

Fixed in c828392.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants