-
Notifications
You must be signed in to change notification settings - Fork 162
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
Error compiling #12
Comments
Can you make sure your checkout of folly is up to date? |
You were right, I updated folly and error is gone |
facebook-github-bot
pushed a commit
that referenced
this issue
Sep 26, 2020
Summary: Pull Request resolved: facebookexperimental/rust-shed#12 The OpenSSL version on Mac doesn't work well with EdenSCM and Mononoke integration, just use the one from getdeps/brew. Also remove the now redundant "DEVELOPER_DIR" since the modern XCode version works. Pull Request resolved: facebook/sapling#63 Reviewed By: StanislavGlebik Differential Revision: D23927022 Pulled By: lukaspiatkowski fbshipit-source-id: 6b6b3baa33d49b567b9aa6178cbd20b7ae9edc89
facebook-github-bot
pushed a commit
that referenced
this issue
Jun 6, 2024
Summary: Unfortunately, the current state machine instantiates every (state, event) for for all states and events. Specifically, this means that `EventHandler::handle` is O(s*e). The state-event-action table in reality is sparse w.r.t to actual event handlers -- most of these instantiations are invalid, so the default EventHandler::handle(...) -> SM::InvalidEventHandler is duplicated quite a bit (264 times for the client) The StateMachine API takes the `param` by value. This means that each instantiation prior to this diff emits code that: 1. Invokes the move constructor (to call into InvalidEventHandler) 2. Makes the call 3. Invokes the destructor for the local `param`. 4. Sets up a catch site to destroy the non-trivial local `param` and continue exception unwinding in case `InvalidEventHandler` throws. Before: ``` <_ZN4fizz2sm12EventHandlerINS_6client11ClientTypesELNS2_9StateEnumE3ELNS_5EventE12EE6handleERKNS2_5StateENS_5ParamE>: 46d70: d10543ff sub sp, sp, #0x150 46d74: f9009bfd str x29, [sp, #304] 46d78: a9144ffe stp x30, x19, [sp, #320] 46d7c: aa0003f3 mov x19, x0 46d80: 910023e0 add x0, sp, #0x8 46d84: 97ffa475 bl 2ff58 <_ZN4fizz5ParamC2EOS0_> 46d88: 910023e2 add x2, sp, #0x8 46d8c: aa1303e0 mov x0, x19 46d90: 52800181 mov w1, #0xc 46d94: 97ffa6a8 bl 30834 <_ZN4fizz6client6detail18handleInvalidEventERKNS0_5StateENS_5EventENS_5ParamE> 46d98: aa0003f3 mov x19, x0 46d9c: 910023e0 add x0, sp, #0x8 46da0: 97ffd8f7 bl 3d17c <_ZN4fizz5Param14destroyVariantEv> 46da4: aa1303e0 mov x0, x19 46da8: 940059de bl 5d520 <__wrap__Unwind_Resume@plt> ``` After: ``` <_ZN4fizz2sm12EventHandlerINS_6client11ClientTypesELNS2_9StateEnumE3ELNS_5EventE12EE6handleERKNS2_5StateERNS_5ParamE>: 45594: f81f0ffe str x30, [sp, #-16]! 45598: aa0103e2 mov x2, x1 4559c: 52800181 mov w1, #0xc // #12 455a0: 97ffa9dc bl 2fd10 <_ZN4fizz6client6detail18handleInvalidEventERKNS0_5StateENS_5EventERNS_5ParamE> ``` By taking the `param` by reference, we put the onus of the object destruction on the *caller* (i.e. all of the callers to `detail::processEvent`, of which there are a finite amount) and eliminate the unnecessary move constructor invocation. This saves ~10KB of .text size uncompressed (-4.62%), and ~11KB of stripped DSO size: (-2.8%) Ideally, we will not need these instantiations at all! This requires some changes in `getHandler(...)` and how the event dispatching mechanism is implemented, and will be done in a future diff. Reviewed By: zalecodez Differential Revision: D58111190 fbshipit-source-id: c237a7522bfb76a7ad0e4cb9e582549c62b12115
facebook-github-bot
pushed a commit
that referenced
this issue
Jun 6, 2024
Summary: This brings two benefits: 1. The unspecialized EventHandler that calls `SM::InvalidEventHandler` can now simply tail call `InvalidEventHandler`. Prior to this diff, the call to `InvalidEventHandler` depended on the `event` non-type template parameter, which meant that _every_ invalid transition would result in a separate instantiation with distinct code in order to set up the event argument. 2. In a future diff, we can leave the default EventHandler unimplemented and SFIANE the instantiation in `getEventHandler`. Before: ``` 45594: f81f0ffe str x30, [sp, #-16]! 45598: aa0103e2 mov x2, x1 4559c: 52800181 mov w1, #0xc // #12 455a0: 97ffa9dc bl 2fd10 <_ZN4fizz6client6detail18handleInvalidEventERKNS0_5StateENS_5EventERNS_5ParamE> ``` After: ``` 0000000000045374 <_ZN4fizz2sm12EventHandlerINS_6client11ClientTypesELNS2_9StateEnumE3ELNS_5EventE12EE6handleERKNS2_5StateES5_RNS_5ParamE>: 45374: f81f0ffe str x30, [sp, #-16]! 45378: 97ffaa68 bl 2fd18 <_ZN4fizz6client6detail18handleInvalidEventERKNS0_5StateENS_5EventERNS_5ParamE> ``` Reviewed By: zalecodez, knekritz Differential Revision: D58147022 fbshipit-source-id: aa7075ad03528234ef0cd1090d5e9e3629076135
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cmake3 ../fizz/
-- The CXX compiler identification is GNU 7.3.1
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find folly (missing: folly_DIR)
-- Found Folly: /usr/include
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- system
-- thread
-- filesystem
-- regex
-- context
-- chrono
-- date_time
-- atomic
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.2k")
-- Found glog: /usr/lib64/libglog.so
-- Found gflags: /usr/lib64/libgflags.so
-- Found libevent: /usr/lib64/libevent.so
-- Found double_conversion: /usr/lib64/libdouble-conversion.so
-- Found librt: /usr/lib64/librt.so
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Found Sodium: /usr/lib64/libsodium.so
-- Could NOT find LIBGMOCK (missing: LIBGMOCK_MAIN_LIBRARY LIBGMOCK_LIBRARY LIBGTEST_LIBRARY LIBGMOCK_LIBRARIES LIBGTEST_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dieu/rpmbuild/SOURCES/fizz-master/_build
[dieu@pilar _build]$ make
Scanning dependencies of target fizz
[ 0%] Building CXX object CMakeFiles/fizz.dir/crypto/Utils.cpp.o
[ 1%] Building CXX object CMakeFiles/fizz.dir/crypto/exchange/X25519.cpp.o
[ 1%] Building CXX object CMakeFiles/fizz.dir/crypto/aead/OpenSSLEVPCipher.cpp.o
[ 2%] Building CXX object CMakeFiles/fizz.dir/crypto/aead/IOBufUtil.cpp.o
[ 2%] Building CXX object CMakeFiles/fizz.dir/crypto/signature/Signature.cpp.o
[ 3%] Building CXX object CMakeFiles/fizz.dir/crypto/Sha256.cpp.o
[ 3%] Building CXX object CMakeFiles/fizz.dir/crypto/Sha384.cpp.o
[ 4%] Building CXX object CMakeFiles/fizz.dir/crypto/openssl/OpenSSLKeyUtils.cpp.o
[ 5%] Building CXX object CMakeFiles/fizz.dir/record/Types.cpp.o
[ 5%] Building CXX object CMakeFiles/fizz.dir/record/RecordLayer.cpp.o
[ 6%] Building CXX object CMakeFiles/fizz.dir/record/EncryptedRecordLayer.cpp.o
[ 6%] Building CXX object CMakeFiles/fizz.dir/record/PlaintextRecordLayer.cpp.o
[ 7%] Building CXX object CMakeFiles/fizz.dir/server/ServerProtocol.cpp.o
[ 7%] Building CXX object CMakeFiles/fizz.dir/server/CertManager.cpp.o
[ 8%] Building CXX object CMakeFiles/fizz.dir/server/State.cpp.o
[ 8%] Building CXX object CMakeFiles/fizz.dir/server/FizzServer.cpp.o
[ 9%] Building CXX object CMakeFiles/fizz.dir/server/TicketCodec.cpp.o
[ 9%] Building CXX object CMakeFiles/fizz.dir/server/CookieCipher.cpp.o
[ 10%] Building CXX object CMakeFiles/fizz.dir/server/ReplayCache.cpp.o
[ 10%] Building CXX object CMakeFiles/fizz.dir/protocol/AsyncFizzBase.cpp.o
In file included from /home/dieu/rpmbuild/SOURCES/fizz-master/fizz/protocol/AsyncFizzBase.cpp:9:0:
/home/dieu/rpmbuild/SOURCES/fizz-master/fizz/protocol/AsyncFizzBase.h:93:15: error: ‘std::string fizz::AsyncFizzBase::getApplicationProtocol() const’ marked ‘override’, but does not override
std::string getApplicationProtocol() const noexcept override = 0;
^~~~~~~~~~~~~~~~~~~~~~
/home/dieu/rpmbuild/SOURCES/fizz-master/fizz/protocol/AsyncFizzBase.h:93:15: error: initializer specified for non-virtual method ‘std::string fizz::AsyncFizzBase::getApplicationProtocol() const’
make[2]: *** [CMakeFiles/fizz.dir/protocol/AsyncFizzBase.cpp.o] Error 1
make[1]: *** [CMakeFiles/fizz.dir/all] Error 2
make: *** [all] Error 2
Any comment how to fix this?
The text was updated successfully, but these errors were encountered: