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

The error when building the project is that the data type cannot be converted #4297

Open
1 of 4 tasks
HowToSaveMyLife opened this issue May 13, 2024 · 2 comments
Open
1 of 4 tasks
Labels
Milestone

Comments

@HowToSaveMyLife
Copy link

HowToSaveMyLife commented May 13, 2024

Describe the bug

I want to build the project through PowerShell. And I made sure all dependencies were installed. But after I ran the build command multiple times, I got some errors.

Affected OS

  • Windows
  • Linux
  • macOS
  • Other (specify below)

Additional OS information

Ubuntu 18.04.6 LTS

MsQuic version

main

Steps taken to reproduce bug

  1. I made sure all dependencies were installed with the following command.
./scripts/prepare-machine.ps1
  1. I ran the build command multiple times, I got the following error while building.
[ 99%] Built target msquiccoretest
In file included from /home/wzr/msquic/msquic/src/perf/lib/PerfClient.cpp:12:0:
/home/wzr/msquic/msquic/src/perf/lib/PerfClient.h:176:28: error: could not convert ‘0’ from ‘int’ to ‘sockaddr’
     QUIC_ADDR RemoteAddr {0};
                            ^
In file included from /home/wzr/msquic/msquic/src/perf/lib/SecNetPerfMain.cpp:14:0:
/home/wzr/msquic/msquic/src/perf/lib/PerfClient.h:176:28: error: could not convert ‘0’ from ‘int’ to ‘sockaddr’
     QUIC_ADDR RemoteAddr {0};
                            ^
src/perf/lib/CMakeFiles/perflib.dir/build.make:88: recipe for target 'src/perf/lib/CMakeFiles/perflib.dir/SecNetPerfMain.cpp.o' failed
make[2]: *** [src/perf/lib/CMakeFiles/perflib.dir/SecNetPerfMain.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
src/perf/lib/CMakeFiles/perflib.dir/build.make:62: recipe for target 'src/perf/lib/CMakeFiles/perflib.dir/PerfClient.cpp.o' failed
make[2]: *** [src/perf/lib/CMakeFiles/perflib.dir/PerfClient.cpp.o] Error 1
make[2]: Leaving directory '/home/wzr/msquic/msquic/build/linux/x64_openssl'
CMakeFiles/Makefile2:1163: recipe for target 'src/perf/lib/CMakeFiles/perflib.dir/all' failed
make[1]: *** [src/perf/lib/CMakeFiles/perflib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /home/wzr/msquic/msquic/src/tools/ip/client/quicipclient.cpp:14:0:
/home/wzr/msquic/msquic/src/tools/ip/quicip.h: In function ‘unsigned int ClientConnectionCallback(HQUIC, void*, QUIC_CONNECTION_EVENT*)’:
/home/wzr/msquic/msquic/src/tools/ip/quicip.h:119:29: error: missing template arguments before ‘Lock’
             std::lock_guard Lock{Context->DoneMutex};
                             ^
In file included from /home/wzr/msquic/msquic/src/tools/ip/client/quicipclient.cpp:14:0:
/home/wzr/msquic/msquic/src/tools/ip/quicip.h: In function ‘unsigned int MsQuicGetPublicIPEx(const QUIC_API_TABLE*, HQUIC, const char*, BOOLEAN, QUIC_ADDR*, QUIC_ADDR*)’:
/home/wzr/msquic/msquic/src/tools/ip/quicip.h:198:26: error: missing template arguments before ‘Lock’
         std::unique_lock Lock{Context.DoneMutex};
                          ^
/home/wzr/msquic/msquic/src/tools/ip/quicip.h:199:32: error: ‘Lock’ was not declared in this scope
         Context.DoneEvent.wait(Lock, [&]{return Context.IsDone;});
                                ^
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:100:35: error: could not convert ‘0’ from ‘int’ to ‘sockaddr’
     const QUIC_ADDR PeerAddress {0};
                                   ^
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp: In member function ‘LbInterface* LbPublicInterface::GetPrivateInterface(const QUIC_ADDR*, const QUIC_ADDR*)’:
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:162:50: error: missing template arguments before ‘{’ token
         auto& Entry = PrivateInterfaces[std::pair{*Local, *Remote}];
                                                  ^
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:162:50: error: expected ‘]’ before ‘{’ token
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:162:67: error: expected ‘,’ or ‘;’ before ‘]’ token
         auto& Entry = PrivateInterfaces[std::pair{*Local, *Remote}];
                                                                   ^
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp: At global scope:
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:160:60: error: unused parameter ‘Local’ [-Werror=unused-parameter]
     LbInterface* GetPrivateInterface(_In_ const QUIC_ADDR* Local, _In_ const QUIC_ADDR* Remote) {
                                                            ^
src/tools/ip/client/CMakeFiles/quicipclient.dir/build.make:62: recipe for target 'src/tools/ip/client/CMakeFiles/quicipclient.dir/quicipclient.cpp.o' failed
make[2]: *** [src/tools/ip/client/CMakeFiles/quicipclient.dir/quicipclient.cpp.o] Error 1
make[2]: Leaving directory '/home/wzr/msquic/msquic/build/linux/x64_openssl'
CMakeFiles/Makefile2:925: recipe for target 'src/tools/ip/client/CMakeFiles/quicipclient.dir/all' failed
make[1]: *** [src/tools/ip/client/CMakeFiles/quicipclient.dir/all] Error 2
cc1plus: all warnings being treated as errors
src/tools/lb/CMakeFiles/quiclb.dir/build.make:62: recipe for target 'src/tools/lb/CMakeFiles/quiclb.dir/loadbalancer.cpp.o' failed
make[2]: *** [src/tools/lb/CMakeFiles/quiclb.dir/loadbalancer.cpp.o] Error 1
make[2]: Leaving directory '/home/wzr/msquic/msquic/build/linux/x64_openssl'
CMakeFiles/Makefile2:985: recipe for target 'src/tools/lb/CMakeFiles/quiclb.dir/all' failed
make[1]: *** [src/tools/lb/CMakeFiles/quiclb.dir/all] Error 2
make[1]: Leaving directory '/home/wzr/msquic/msquic/build/linux/x64_openssl'
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Write-Error: /home/wzr/msquic/msquic/scripts/build.ps1:525:5
Line |
 525 |      CMake-Execute $Arguments
     |      ~~~~~~~~~~~~~~~~~~~~~~~~
     | [05/13/2024 11:56:50] CMake exited with status code 2
  1. I tried to build on each of these project versions and got the same error
commit ba022a38314145c2e9678eb0f206304f9272a137 (HEAD -> ba022a38314145c2e9678eb0f206304f9272a137)
release/2.3
release/2.0

Expected behavior

The build should succeed

Actual outcome

The build fail saying data type conversion error occurred

Additional details

No response

@nibanks
Copy link
Member

nibanks commented May 13, 2024

Could you please share the entire command and console output for build.ps1?

@nibanks nibanks added this to the Future milestone May 13, 2024
@HowToSaveMyLife
Copy link
Author

HowToSaveMyLife commented May 18, 2024

The command is

PS /home/wzr/msquic/msquic> ./scripts/build.ps1 -Tls openssl

and the console output is

[ 99%] Built target msquiccoretest
In file included from /home/wzr/msquic/msquic/src/perf/lib/PerfClient.cpp:12:0:
/home/wzr/msquic/msquic/src/perf/lib/PerfClient.h:176:28: error: could not convert ‘0’ from ‘int’ to ‘sockaddr’
     QUIC_ADDR RemoteAddr {0};
                            ^
src/perf/lib/CMakeFiles/perflib.dir/build.make:62: recipe for target 'src/perf/lib/CMakeFiles/perflib.dir/PerfClient.cpp.o' failed
make[2]: *** [src/perf/lib/CMakeFiles/perflib.dir/PerfClient.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/wzr/msquic/msquic/src/perf/lib/SecNetPerfMain.cpp:14:0:
/home/wzr/msquic/msquic/src/perf/lib/PerfClient.h:176:28: error: could not convert ‘0’ from ‘int’ to ‘sockaddr’
     QUIC_ADDR RemoteAddr {0};
                            ^
src/perf/lib/CMakeFiles/perflib.dir/build.make:88: recipe for target 'src/perf/lib/CMakeFiles/perflib.dir/SecNetPerfMain.cpp.o' failed
make[2]: *** [src/perf/lib/CMakeFiles/perflib.dir/SecNetPerfMain.cpp.o] Error 1
make[2]: Leaving directory '/home/wzr/msquic/msquic/build/linux/x64_openssl'
CMakeFiles/Makefile2:1163: recipe for target 'src/perf/lib/CMakeFiles/perflib.dir/all' failed
make[1]: *** [src/perf/lib/CMakeFiles/perflib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /home/wzr/msquic/msquic/src/tools/ip/client/quicipclient.cpp:14:0:
/home/wzr/msquic/msquic/src/tools/ip/quicip.h: In function ‘unsigned int ClientConnectionCallback(HQUIC, void*, QUIC_CONNECTION_EVENT*)’:
/home/wzr/msquic/msquic/src/tools/ip/quicip.h:119:29: error: missing template arguments before ‘Lock’
             std::lock_guard Lock{Context->DoneMutex};
                             ^
In file included from /home/wzr/msquic/msquic/src/tools/ip/client/quicipclient.cpp:14:0:
/home/wzr/msquic/msquic/src/tools/ip/quicip.h: In function ‘unsigned int MsQuicGetPublicIPEx(const QUIC_API_TABLE*, HQUIC, const char*, BOOLEAN, QUIC_ADDR*, QUIC_ADDR*)’:
/home/wzr/msquic/msquic/src/tools/ip/quicip.h:198:26: error: missing template arguments before ‘Lock’
         std::unique_lock Lock{Context.DoneMutex};
                          ^
/home/wzr/msquic/msquic/src/tools/ip/quicip.h:199:32: error: ‘Lock’ was not declared in this scope
         Context.DoneEvent.wait(Lock, [&]{return Context.IsDone;});
                                ^
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:100:35: error: could not convert ‘0’ from ‘int’ to ‘sockaddr’
     const QUIC_ADDR PeerAddress {0};
                                   ^
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp: In member function ‘LbInterface* LbPublicInterface::GetPrivateInterface(const QUIC_ADDR*, const QUIC_ADDR*)’:
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:162:50: error: missing template arguments before ‘{’ token
         auto& Entry = PrivateInterfaces[std::pair{*Local, *Remote}];
                                                  ^
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:162:50: error: expected ‘]’ before ‘{’ token
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:162:67: error: expected ‘,’ or ‘;’ before ‘]’ token
         auto& Entry = PrivateInterfaces[std::pair{*Local, *Remote}];
                                                                   ^
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp: At global scope:
/home/wzr/msquic/msquic/src/tools/lb/loadbalancer.cpp:160:60: error: unused parameter ‘Local’ [-Werror=unused-parameter]
     LbInterface* GetPrivateInterface(_In_ const QUIC_ADDR* Local, _In_ const QUIC_ADDR* Remote) {
                                                            ^
src/tools/ip/client/CMakeFiles/quicipclient.dir/build.make:62: recipe for target 'src/tools/ip/client/CMakeFiles/quicipclient.dir/quicipclient.cpp.o' failed
make[2]: *** [src/tools/ip/client/CMakeFiles/quicipclient.dir/quicipclient.cpp.o] Error 1
make[2]: Leaving directory '/home/wzr/msquic/msquic/build/linux/x64_openssl'
CMakeFiles/Makefile2:925: recipe for target 'src/tools/ip/client/CMakeFiles/quicipclient.dir/all' failed
make[1]: *** [src/tools/ip/client/CMakeFiles/quicipclient.dir/all] Error 2
cc1plus: all warnings being treated as errors
src/tools/lb/CMakeFiles/quiclb.dir/build.make:62: recipe for target 'src/tools/lb/CMakeFiles/quiclb.dir/loadbalancer.cpp.o' failed
make[2]: *** [src/tools/lb/CMakeFiles/quiclb.dir/loadbalancer.cpp.o] Error 1
make[2]: Leaving directory '/home/wzr/msquic/msquic/build/linux/x64_openssl'
CMakeFiles/Makefile2:985: recipe for target 'src/tools/lb/CMakeFiles/quiclb.dir/all' failed
make[1]: *** [src/tools/lb/CMakeFiles/quiclb.dir/all] Error 2
make[1]: Leaving directory '/home/wzr/msquic/msquic/build/linux/x64_openssl'
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Write-Error: /home/wzr/msquic/msquic/scripts/build.ps1:525:5
Line |
 525 |      CMake-Execute $Arguments
     |      ~~~~~~~~~~~~~~~~~~~~~~~~
     | [05/18/2024 21:18:07] CMake exited with status code 2

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

No branches or pull requests

2 participants