-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Statically linking it with libstdc ++ and folly broken because of experimental/exception_tracer #1623
Comments
It won't work with static linking :( folly/folly/experimental/exception_tracer/ExceptionTracerLib.cpp Lines 116 to 117 in 8140959
|
Something like https://stackoverflow.com/a/3053921/15239223 should be used to handle static linking |
I haven't seen a rationale/context in #1524 for why exactly I also just found out that static builds for one of my projects are broken because of this. @yfeldblum, is it really intentional to break static builds linking against folly? |
ping |
1 similar comment
ping |
Summary: When Exception Tracer was added to Folly, it broke statically linking with libstdc++ (see #1623 for more details). While this isn't a common requirement, it's needed in order to have OpenCV and Airstore link correctly for the Avator Research Supercluster project. This change just allows one to disable building the exception tracer code. Other solutions (wrapper/real functions or alternative linker arguments) would possibly be better, but would increase the scope & risk of this change without offering us any benefit. Reviewed By: yfeldblum Differential Revision: D35791075 fbshipit-source-id: db845e035b453e55e61b9b969e7216e041ed4766
change the way to overwrite __cxa_throw:
folly/folly/experimental/exception_tracer/ExceptionTracerLib.cpp |
FYI, folly's CMake now has an option to disable exception_tracer |
…246) * deps: bump tbb to 2021.8.0 and fix tsan config * deps: bump ninja to 1.11.1 * deps: bump folly to 2023.02.20.00 and fmtlib to 9.1.0 Disable folly exception tracer to fix static linking. See facebook/folly#1623 * deps: bump centos openssl to 1.1.1m * deps: bump blosc to 1.21.2 Signed-off-by: Misiu Godfrey <[email protected]>
…246) * deps: bump tbb to 2021.8.0 and fix tsan config * deps: bump ninja to 1.11.1 * deps: bump folly to 2023.02.20.00 and fmtlib to 9.1.0 Disable folly exception tracer to fix static linking. See facebook/folly#1623 * deps: bump centos openssl to 1.1.1m * deps: bump blosc to 1.21.2 Signed-off-by: Misiu Godfrey <[email protected]>
In commit: 8140959#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
experimental/exception_tracer
library became a part of mainCMakeList.txt
file and now a part of mainfolly.a
library. But...This make broken logic described in library annotation:
In principle, it is incorrect because the file
ExceptionTracerLib.cpp
ignoresFOLLY_HAVE_ELF
&FOLLY_HAVE_DWARF
definitions, although relevant libraries may not be available on the build platform.And most dramatically, it made it impossible to build an application by statically linking it with libstdc ++ and folly.
It would be nice to rollback these changes or still make it cleaner by providing the necessary compilation options.
The text was updated successfully, but these errors were encountered: