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_helper.sh won't build on Ubuntu 20.04.1 LTS #200

Open
Vincent535 opened this issue Jan 4, 2021 · 1 comment
Open

build_helper.sh won't build on Ubuntu 20.04.1 LTS #200

Vincent535 opened this issue Jan 4, 2021 · 1 comment

Comments

@Vincent535
Copy link

I've a Ubuntu 20.04,1 LTS installation on a Windows 10 WSL system.
I cloned the repository into a folder and ran the ./build_helper.sh afterwards. It builds the fizz/folly etc. fine but gives an error building MVFST at the following point:

[ 42%] Building CXX object quic/api/CMakeFiles/mvfst_transport.dir/QuicTransportFunctions.cpp.o
[ 43%] Linking CXX static library libmvfst_transport.a
[ 43%] Built target mvfst_transport
Scanning dependencies of target mvfst_client
Scanning dependencies of target mvfst_server
[ 45%] Building CXX object quic/client/CMakeFiles/mvfst_client.dir/state/ClientStateMachine.cpp.o
[ 45%] Building CXX object quic/client/CMakeFiles/mvfst_client.dir/QuicClientAsyncTransport.cpp.o
[ 45%] Building CXX object quic/client/CMakeFiles/mvfst_client.dir/handshake/ClientHandshake.cpp.o
[ 45%] Building CXX object quic/client/CMakeFiles/mvfst_client.dir/QuicClientTransport.cpp.o
[ 45%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/QuicServerBackend.cpp.o
[ 45%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/QuicServer.cpp.o
[ 46%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/QuicServerTransport.cpp.o
[ 46%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/QuicServerPacketRouter.cpp.o
[ 47%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/CCPReader.cpp.o
[ 47%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/handshake/ServerHandshake.cpp.o
[ 47%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/QuicServerWorker.cpp.o
[ 47%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/SlidingWindowRateLimiter.cpp.o
[ 48%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/handshake/AppToken.cpp.o
In file included from /home/desk/mvfst/quic/server/QuicServerWorker.cpp:19:
/usr/include/linux/net_tstamp.h:149:36: error: ‘SOF_TXTIME_DEADLINE_MODE’ conflicts with a previous declaration
149 | SOF_TXTIME_DEADLINE_MODE = (1 << 0),
| ^
In file included from /home/desk/mvfst/_build/deps/include/folly/portability/Sockets.h:19,
from /home/desk/mvfst/_build/deps/include/folly/io/SocketOptionMap.h:22,
from /home/desk/mvfst/quic/server/QuicServerWorker.cpp:12:
/home/desk/mvfst/_build/deps/include/folly/net/NetOps.h:64:3: note: previous declaration ‘net_txtime_flags SOF_TXTIME_DEADLINE_MODE’
64 | SOF_TXTIME_DEADLINE_MODE = (1 << 0),
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/desk/mvfst/quic/server/QuicServerWorker.cpp:19:
/usr/include/linux/net_tstamp.h:150:36: error: ‘SOF_TXTIME_REPORT_ERRORS’ conflicts with a previous declaration
150 | SOF_TXTIME_REPORT_ERRORS = (1 << 1),
| ^
In file included from /home/desk/mvfst/_build/deps/include/folly/portability/Sockets.h:19,
from /home/desk/mvfst/_build/deps/include/folly/io/SocketOptionMap.h:22,
from /home/desk/mvfst/quic/server/QuicServerWorker.cpp:12:
/home/desk/mvfst/_build/deps/include/folly/net/NetOps.h:65:3: note: previous declaration ‘net_txtime_flags SOF_TXTIME_REPORT_ERRORS’
65 | SOF_TXTIME_REPORT_ERRORS = (1 << 1),
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/desk/mvfst/quic/server/QuicServerWorker.cpp:19:
/usr/include/linux/net_tstamp.h:152:2: error: redefinition of ‘net_txtime_flags SOF_TXTIME_FLAGS_LAST’
152 | SOF_TXTIME_FLAGS_LAST = SOF_TXTIME_REPORT_ERRORS,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/desk/mvfst/_build/deps/include/folly/portability/Sockets.h:19,
from /home/desk/mvfst/_build/deps/include/folly/io/SocketOptionMap.h:22,
from /home/desk/mvfst/quic/server/QuicServerWorker.cpp:12:
/home/desk/mvfst/_build/deps/include/folly/net/NetOps.h:67:3: note: ‘net_txtime_flags SOF_TXTIME_FLAGS_LAST’ previously defined here
67 | SOF_TXTIME_FLAGS_LAST = SOF_TXTIME_REPORT_ERRORS,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/desk/mvfst/quic/server/QuicServerWorker.cpp:19:
/usr/include/linux/net_tstamp.h:154:6: error: ‘SOF_TXTIME_FLAGS_MASK’ conflicts with a previous declaration
154 | SOF_TXTIME_FLAGS_LAST
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/desk/mvfst/_build/deps/include/folly/portability/Sockets.h:19,
from /home/desk/mvfst/_build/deps/include/folly/io/SocketOptionMap.h:22,
from /home/desk/mvfst/quic/server/QuicServerWorker.cpp:12:
/home/desk/mvfst/_build/deps/include/folly/net/NetOps.h:68:3: note: previous declaration ‘net_txtime_flags SOF_TXTIME_FLAGS_MASK’
68 | SOF_TXTIME_FLAGS_MASK = (SOF_TXTIME_FLAGS_LAST - 1) | SOF_TXTIME_FLAGS_LAST
| ^~~~~~~~~~~~~~~~~~~~~
[ 48%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/handshake/DefaultAppTokenValidator.cpp.o
[ 49%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/handshake/RetryTokenGenerator.cpp.o
[ 49%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/__/fizz/server/handshake/AppToken.cpp.o
[ 49%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/handshake/StatelessResetGenerator.cpp.o
[ 49%] Building CXX object quic/server/CMakeFiles/mvfst_server.dir/state/ServerStateMachine.cpp.o
make[2]: *** [quic/server/CMakeFiles/mvfst_server.dir/build.make:115: quic/server/CMakeFiles/mvfst_server.dir/QuicServerWorker.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 49%] Linking CXX static library libmvfst_client.a
[ 49%] Built target mvfst_client
Scanning dependencies of target mvfst_fizz_client
[ 49%] Building CXX object quic/fizz/client/CMakeFiles/mvfst_fizz_client.dir/handshake/FizzClientQuicHandshakeContext.cpp.o
[ 50%] Building CXX object quic/fizz/client/CMakeFiles/mvfst_fizz_client.dir/handshake/FizzClientHandshake.cpp.o
make[1]: *** [CMakeFiles/Makefile2:4159: quic/server/CMakeFiles/mvfst_server.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 50%] Linking CXX static library libmvfst_fizz_client.a
[ 50%] Built target mvfst_fizz_client
make: *** [Makefile:141: all] Error 2

To circumvent the double declaration, I duplicated /usr/include/linux/net_tstamp.h to net_tstamp2.h and in there commented this part out:

enum txtime_flags {
SOF_TXTIME_DEADLINE_MODE = (1 << 0),
SOF_TXTIME_REPORT_ERRORS = (1 << 1),
SOF_TXTIME_FLAGS_LAST = SOF_TXTIME_REPORT_ERRORS,
SOF_TXTIME_FLAGS_MASK = (SOF_TXTIME_FLAGS_LAST - 1) |
SOF_TXTIME_FLAGS_LAST
};

I changed #include <linux/net_tstamp.h> to #include <linux/net_tstamp2.h> in the QuicServerWorker.cpp and ran ./build_helper.sh again, but now it gets stuck at the following error:

[ 85%] Building CXX object quic/state/test/CMakeFiles/QuicStreamManagerTest.dir/__/__/common/test/TestMain.cpp.o
[ 85%] Building CXX object quic/congestion_control/test/CMakeFiles/CongestionControllerTests.dir/NewRenoTest.cpp.o
[ 85%] Building CXX object quic/congestion_control/test/CMakeFiles/CongestionControllerTests.dir/PacerTest.cpp.o
[ 86%] Building CXX object quic/congestion_control/test/CMakeFiles/CongestionControllerTests.dir/__/__/common/test/TestMain.cpp.o
[ 86%] Building CXX object quic/server/handshake/test/CMakeFiles/ServerHandshakeTest.dir/RetryTokenGeneratorTest.cpp.o
In file included from /home/desk/mvfst/_build/deps/include/gtest/gtest.h:58,
from /home/desk/mvfst/_build/deps/include/gmock/internal/gmock-internal-utils.h:47,
from /home/desk/mvfst/_build/deps/include/gmock/gmock-actions.h:46,
from /home/desk/mvfst/_build/deps/include/gmock/gmock.h:58,
from /home/desk/mvfst/quic/state/test/QuicStreamManagerTest.cpp:9:
/home/desk/mvfst/quic/state/test/QuicStreamManagerTest.cpp: In member function ‘virtual void quic::test::QuicStreamManagerTest_SkipRedundantPriorityUpdate_Test::TestBody()’:
/home/desk/mvfst/quic/state/test/QuicStreamManagerTest.cpp:57:24: warning: ‘~’ on an expression of type bool [-Wbool-operation]
57 | ~currentPriority.incremental));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/desk/mvfst/quic/state/test/QuicStreamManagerTest.cpp:57:24: note: did you mean to use logical not (‘!’)?
/home/desk/mvfst/quic/state/test/QuicStreamManagerTest.cpp:61:24: warning: ‘~’ on an expression of type bool [-Wbool-operation]
61 | ~currentPriority.incremental));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/desk/mvfst/quic/state/test/QuicStreamManagerTest.cpp:61:24: note: did you mean to use logical not (‘!’)?
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [quic/api/test/CMakeFiles/QuicTransportBaseTest.dir/build.make:63: quic/api/test/CMakeFiles/QuicTransportBaseTest.dir/QuicTransportBaseTest.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1848: quic/api/test/CMakeFiles/QuicTransportBaseTest.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 87%] Building CXX object quic/server/handshake/test/CMakeFiles/ServerHandshakeTest.dir/ServerHandshakeTest.cpp.o
[ 87%] Building CXX object quic/server/handshake/test/CMakeFiles/ServerHandshakeTest.dir/ServerTransportParametersTest.cpp.o
[ 87%] Building CXX object quic/server/handshake/test/CMakeFiles/ServerHandshakeTest.dir/StatelessResetGeneratorTest.cpp.o
[ 88%] Building CXX object quic/server/handshake/test/CMakeFiles/ServerHandshakeTest.dir/__/__/__/common/test/TestMain.cpp.o
[ 88%] Building CXX object quic/state/test/CMakeFiles/QuicStreamFunctionsTest.dir/__/__/common/test/TestMain.cpp.o
[ 88%] Linking CXX executable CongestionControllerTests
/home/desk/mvfst/quic/server/handshake/test/ServerHandshakeTest.cpp: In member function ‘void quic::test::ServerHandshakeTest::clientServerRound()’:
/home/desk/mvfst/quic/server/handshake/test/ServerHandshakeTest.cpp:197:29: warning: ‘bool folly::EventBase::loopIgnoreKeepAlive()’ is deprecated: This should only be used in legacy unit tests [-Wdeprecated-declarations]
197 | evb.loopIgnoreKeepAlive();
| ^
In file included from /home/desk/mvfst/_build/deps/include/folly/io/async/AsyncSocketBase.h:20,
from /home/desk/mvfst/_build/deps/include/folly/io/async/AsyncTransport.h:22,
from /home/desk/mvfst/_build/deps/include/fizz/protocol/Params.h:18,
from /home/desk/mvfst/_build/deps/include/fizz/record/RecordLayer.h:11,
from /home/desk/mvfst/_build/deps/include/fizz/protocol/Actions.h:13,
from /home/desk/mvfst/_build/deps/include/fizz/client/Actions.h:12,
from /home/desk/mvfst/_build/deps/include/fizz/client/ClientProtocol.h:11,
from /home/desk/mvfst/_build/deps/include/fizz/client/AsyncFizzClient.h:12,
from /home/desk/mvfst/_build/deps/include/fizz/client/test/Mocks.h:11,
from /home/desk/mvfst/quic/server/handshake/test/ServerHandshakeTest.cpp:15:
/home/desk/mvfst/_build/deps/include/folly/io/async/EventBase.h:390:3: note: declared here
390 | loopIgnoreKeepAlive();
| ^~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’
[ 88%] Linking CXX executable QuicStreamManagerTest
[ 88%] Built target QuicStreamManagerTest
[ 88%] Built target CongestionControllerTests
[ 89%] Linking CXX executable QuicStreamFunctionsTest
[ 89%] Built target QuicStreamFunctionsTest
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’
[ 90%] Linking CXX executable QuicServerTest
[ 90%] Linking CXX executable ServerHandshakeTest
[ 90%] Built target ServerHandshakeTest
[ 90%] Built target QuicServerTest
[ 91%] Linking CXX executable QuicServerTransportTest
[ 91%] Built target QuicServerTransportTest
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’
[ 92%] Linking CXX executable QuicLossFunctionsTest
[ 92%] Built target QuicLossFunctionsTest
[ 92%] Linking CXX executable QuicClientTransportTest
[ 92%] Built target QuicClientTransportTest
make: *** [Makefile:141: all] Error 2

Is it a bug, or are these errors caused by my setup using Ubuntu on WSL? What can I do to have a smooth build of MVFST and run the sample client and server like described in the readme.md?

@lnicco
Copy link
Contributor

lnicco commented Jan 4, 2021

thanks for reporting. this is a known issue and we are working on a resolution
I'll leave this issue open for tracking on Github as well.

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