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

Build failure using ms-gsl #159

Closed
JackBoosY opened this issue Apr 27, 2020 · 7 comments
Closed

Build failure using ms-gsl #159

JackBoosY opened this issue Apr 27, 2020 · 7 comments

Comments

@JackBoosY
Copy link

Hi gus,
Recently, I received a issue <seal fails to install if ms-gsl 3.0.0 is installed>, after digging deeper, I found that if I use ms-gsl, I will get the following error:

F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(235): error C2039: 'index_type': is not a member of 'gsl::span<const unsigned __int64,4294967295>'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal/intarray.h(265): note: see declaration of 'gsl::span<const unsigned __int64,4294967295>'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(235): error C2146: syntax error: missing ';' before identifier 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(235): warning C4091: '': ignored on left of 'gsl::span<const unsigned __int64,4294967295>' when no variable is declared
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(239): error C2440: 'static_cast': cannot convert from 'size_t' to 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(239): note: No constructor could take the source type, or constructor overload resolution was ambiguous
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(280): error C2039: 'index_type': is not a member of 'gsl::span<const int64_t,4294967295>'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal/batchencoder.h(139): note: see declaration of 'gsl::span<const int64_t,4294967295>'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(280): error C2146: syntax error: missing ';' before identifier 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(280): warning C4091: '': ignored on left of 'gsl::span<const int64_t,4294967295>' when no variable is declared
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(284): error C2440: 'static_cast': cannot convert from 'size_t' to 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(284): note: No constructor could take the source type, or constructor overload resolution was ambiguous
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(285): error C2440: 'static_cast': cannot convert from 'size_t' to 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(285): note: No constructor could take the source type, or constructor overload resolution was ambiguous
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(286): error C2440: 'static_cast': cannot convert from 'size_t' to 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(286): note: No constructor could take the source type, or constructor overload resolution was ambiguous
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(452): error C2039: 'index_type': is not a member of 'gsl::span<unsigned __int64,4294967295>'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal/intarray.h(256): note: see declaration of 'gsl::span<unsigned __int64,4294967295>'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(452): error C2146: syntax error: missing ';' before identifier 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(452): warning C4091: '': ignored on left of 'gsl::span<unsigned __int64,4294967295>' when no variable is declared
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(474): error C2440: 'static_cast': cannot convert from 'size_t' to 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(474): note: No constructor could take the source type, or constructor overload resolution was ambiguous
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(497): error C2039: 'index_type': is not a member of 'gsl::span<int64_t,4294967295>'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal/batchencoder.h(231): note: see declaration of 'gsl::span<int64_t,4294967295>'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(497): error C2146: syntax error: missing ';' before identifier 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(497): warning C4091: '': ignored on left of 'gsl::span<int64_t,4294967295>' when no variable is declared
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(521): error C2440: 'static_cast': cannot convert from 'size_t' to 'index_type'
F:\vcpkg\buildtrees\seal\src\9754f4b2c2-e171b3c220\native\src\seal\batchencoder.cpp(521): note: No constructor could take the source type, or constructor overload resolution was ambiguous

Can someone help me?

Thanks.

@WeiDaiWD
Copy link
Contributor

Thanks for pointing that out. We have just released a new version of SEAL today. The new version uses MSGSL v2.1.0 and manages its building and installing. Please check it out. Meanwhile, we'll look at changes needed to use newer versions of MSGSL.

@JackBoosY
Copy link
Author

@WeiDaiWD No, that's not resolved in 3.5.0, I confirmed that.

@WeiDaiWD
Copy link
Contributor

Could you please show me the new error messages? Do make a fresh clone of SEAL v3.5.1.

@WeiDaiWD WeiDaiWD reopened this May 26, 2020
@JackBoosY
Copy link
Author

Same with my first comment, I use ms-gsl version 3.0.1.

And when I update seal in vcpkg, after configuration, the compilation process was skipped. I don't know the reason. Use cmake to build manually or directly open sln build are successful.

@WeiDaiWD
Copy link
Contributor

And when I update seal in vcpkg

I only see SEAL 3.4.5 in vcpkg. How did you manage to install SEAL 3.5.0 or update SEAL vcpkg?

Same with my first comment

The errors that you had are caused by API changes in ms-gsl from 2.1.0 to 3.0.0. You will see those errors if you use either:

  • SEAL 3.4.5 or before with ms-gsl 3.0.0 or later, or
  • SEAL 3.5.0 or later with ms-gsl 2.1.0 or before.

SEAL 3.4.5 and before first tries to find and use an existing ms-gsl on the system. If that fails, the use of ms-gsl is disabled.
SEAL 3.5.0 does not try to find or use any existing ms-gsl on the system, instead it downloads and compiles ms-gsl as a CMake external project.
Therefore, using CMake to build SEAL 3.5.0 manually definitely works. Building with Visual Studio or MSBuild also works since the SEAL.csxproj file includes pre-build commands that configures and compiles CMake external projects.

Hope vcpkg can later include SEAL 3.5.0.

@JackBoosY
Copy link
Author

Just unzip this and replace it to VCPKG_PATH/ports, then use command ./vcpkg install seal.

@WeiDaiWD
Copy link
Contributor

@JackBoosY This issue is caused by vcpkg/ports/seal. I'm debugging a PR to vcpkg to fix this. I'm closing this issue and moving further discussion to seal fails to install if ms-gsl 3.0.0 is installed.

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

2 participants