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

Building on windows? #90

Open
antithing opened this issue Apr 10, 2020 · 3 comments
Open

Building on windows? #90

antithing opened this issue Apr 10, 2020 · 3 comments

Comments

@antithing
Copy link

Hi, I am attempting to build this code on Windows / visual studio.

I am seeing this error:

Severity	Code	Description	Project	File	Line	Suppression State
Error	C2248	'ttl::internal::raw_tensor_mixin<Encoder,ttl::internal::basic_flat_shape<uint32_t>,D,ttl::internal::owner>::Dim': cannot access private typedef declared in class 'ttl::internal::raw_tensor_mixin<Encoder,ttl::internal::basic_flat_shape<uint32_t>,D,ttl::internal::owner>' [D:\\Deep\OPP\openpose-plus-master\3rdparty\src\stdtensor-repo-build\stdtensor.vcxproj]	stdtensor-repo	d:\deep\opp\openpose-plus-master\3rdparty\src\stdtensor-repo\include\ttl\bits\raw_tensor.hpp	16	

It seems to be this line:

using S = basic_flat_shape<Dim>;

Is there anything I can do to get this building on windows?

Thanks!

@antithing
Copy link
Author

This is what i have done so far:

remove these lines from the cMakeLists.

ADD_DEFINITIONS(-Wall)
ADD_DEFINITIONS(-Werror)
ADD_DEFINITIONS(-Wfatal-errors)

commented out the <unistd.h> in

openpose-plus-master\3rdparty\src\stdtracer-repo-build\stdtracer.vcxproj] stdtracer-repo d:\deep\opp\openpose-plus-master\3rdparty\src\stdtracer-repo\include\bits\stdtracer_log_ctx

Then you get an error about isatty.

change the isatty to _isatty, and add #include <io.h> to fix that one.

That leaves errors:

#include <cxxabi.h> //can't find this file

and 'illegal indirection' in std_shape.hpp

A little more googling tells me that we can just comment out //#include <cxxabi.h>

and adjust the function below to:

template <typename T>
std::string demangled_type_info_name()
{
    int status = 0;
   // return abi::__cxa_demangle(typeid(T).name(), 0, 0, &status);
    return name;
}

ref: https://en-mlog.blogspot.com/2012/01/using-cmdlineh-in-visual-c.html

Now we have the illegal indirection error, and this new one:

Severity	Code	Description	Project	File	Line	Suppression State
Error	C2248	'ttl::internal::raw_tensor_mixin<Encoder,ttl::internal::basic_flat_shape<uint32_t>,D,ttl::internal::owner>::Dim': cannot access private typedef declared in class 'ttl::internal::raw_tensor_mixin<Encoder,ttl::internal::basic_flat_shape<uint32_t>,D,ttl::internal::owner>' [D:\Deep\OPP\openpose-plus-master\3rdparty\src\stdtensor-repo-build\stdtensor.vcxproj]	stdtensor-repo	d:\deep\opp\openpose-plus-master\3rdparty\src\stdtensor-repo\include\ttl\bits\raw_tensor.hpp	16	

Which has me stumped.

Thanks!

@lgarithm
Copy link
Collaborator

@antithing thanks for your valuable debug information. I will have a deep look into this.
But since I don't have a windows computer at the moment, it may take long.

As a quick look, the last error suggests the following is private

using Dim = typename S::dimension_type;

so you may try moving it to public section after

using shape_type = S;

I'm also wondering how this error gets triggered, because in openpose-plus, raw_tensor is not used at all.

@lgarithm
Copy link
Collaborator

note: the error is triggered at

using S = basic_flat_shape<Dim>;

@lgarithm lgarithm mentioned this issue Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants