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

Cannot compile with visual studio 17.10 #3579

Closed
t-mizheng opened this issue May 24, 2024 · 1 comment · Fixed by #3589
Closed

Cannot compile with visual studio 17.10 #3579

t-mizheng opened this issue May 24, 2024 · 1 comment · Fixed by #3589
Assignees
Labels
bug Something isn't working triaged Discussed in a triage meeting

Comments

@t-mizheng
Copy link

Describe the bug

Compilation errors with visual studio 17.10 but works with visual studio 17.9.

OS information

Windows 11

Steps taken to reproduce bug

I followed the guidelines to build ebpf-for-windows. I first downloaded the lastest version of the visual studio (version 17.10 with MSVC 14.40) but cannot compile the project. After I downgraded the visual studio version into 17.9(with MSVC 14.39), I got no compile error.

Expected behavior

No error message.

Actual outcome

I got compilation errors:

58>C:\Users\t-mizheng\Desktop\ebpf-for-windows\tools\bpf2c\bpf_code_generator.cpp(1309,25): error C2664: 'auto std:
   :make_format_args<std::format_context,std::string>(std::string &)': cannot convert argument 1 from 'std::string'
    to 'std::string &' [C:\Users\t-mizheng\Desktop\ebpf-for-windows\tests\bpf2c_plugin\bpf2c_plugin.vcxproj]
         C:\Users\t-mizheng\Desktop\ebpf-for-windows\tools\bpf2c\bpf_code_generator.cpp(1309,56):
         A non-const reference may only be bound to an lvalue
         C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\format(3713,17):
         see declaration of 'std::make_format_args'
         C:\Users\t-mizheng\Desktop\ebpf-for-windows\tools\bpf2c\bpf_code_generator.cpp(1309,25):
                or       'std::wstring std::vformat(const std::wstring_view,const std::wformat_args)'
             C:\Users\t-mizheng\Desktop\ebpf-for-windows\tools\bpf2c\bpf_code_generator.cpp(1307,42):
             'std::wstring std::vformat(const std::wstring_view,const std::wformat_args)': expects 2 arguments - 1
     provided
         C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\format(3816,19):
         or       'std::string std::vformat(const std::string_view,const std::format_args)'
             C:\Users\t-mizheng\Desktop\ebpf-for-windows\tools\bpf2c\bpf_code_generator.cpp(1307,42):
             'std::string std::vformat(const std::string_view,const std::format_args)': expects 2 arguments - 1 pro
     vided    while trying to match the argument list '(std::string)'

58>C:\Users\t-mizheng\Desktop\ebpf-for-windows\tools\bpf2c\bpf_code_generator.cpp(1307,42): error C2672: 'std::vfor
   mat': no matching overloaded function found [C:\Users\t-mizheng\Desktop\ebpf-for-windows\tests\bpf2c_plugin\bpf2
   c_plugin.vcxproj]
         C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\format(3840,20):
         could be 'std::wstring std::vformat(const std::locale &,const std::wstring_view,const std::wformat_args)'
             C:\Users\t-mizheng\Desktop\ebpf-for-windows\tools\bpf2c\bpf_code_generator.cpp(1307,42):
             'std::wstring std::vformat(const std::locale &,const std::wstring_view,const std::wformat_args)': expe
     cts 3 arguments - 1 provided
         C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\format(3832,19):
         or       'std::string std::vformat(const std::locale &,const std::string_view,const std::format_args)'
             C:\Users\t-mizheng\Desktop\ebpf-for-windows\tools\bpf2c\bpf_code_generator.cpp(1307,42):
             'std::string std::vformat(const std::locale &,const std::string_view,const std::format_args)': expects
      3 arguments - 1 provided
         C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\format(3824,20):

Additional details

No response

@t-mizheng t-mizheng added the bug Something isn't working label May 24, 2024
@dahavey dahavey added the triaged Discussed in a triage meeting label May 28, 2024
@dahavey dahavey added this to the 2406 milestone May 28, 2024
@Alan-Jowett
Copy link
Member

This was broken by microsoft/STL#4184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged Discussed in a triage meeting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants