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

any_executor.hpp does not compile with -fno-rtti under gcc #533

Closed
edtanous opened this issue Aug 17, 2020 · 4 comments
Closed

any_executor.hpp does not compile with -fno-rtti under gcc #533

edtanous opened this issue Aug 17, 2020 · 4 comments

Comments

@edtanous
Copy link

I found this behavior when upgrading from boost 1.73.0 to boost 1.74.0. The newly created any_executor function relies on typeid explicitly, here

And does not seem to obey the BOOST_NO_TYPEID config flag or the ASIO_NO_TYPEID flag. The specific error when compiling with gcc-10 is:

| ../recipe-sysroot/usr/include/boost/asio/execution/any_executor.hpp: In static member function 'static const std::type_info& boost::asio::execution::detail::any_executor_base::target_type_void()':
| ../recipe-sysroot/usr/include/boost/asio/execution/any_executor.hpp:811:23: error: cannot use 'typeid' with '-fno-rtti'
|   811 |     return typeid(void);

I have very little context about what any_executor does, this just showed up in a #include <asio.hpp> include in a project I was trying to upgrade.

@brunoabinader
Copy link

@edtanous I made a patch fix in #541: could you please verify if that works for you?

@edtanous
Copy link
Author

edtanous commented Sep 9, 2020

Just applied it to my local tree, and seems to resolve the issue. Thanks for the quick turnaround!

bradbishop pushed a commit to openbmc/x86-power-control that referenced this issue Oct 5, 2020
There is a bug in the latest version of boost that upstream yocto is
pulling in which causes x86-power-control to not build.

See chriskohlhoff/asio#533 for more
information.

Similar to what OpenBMC did with bmcweb, disable this for now in
x86-power-control.

Resolves #7

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I836a513d86662f06eb146355ba1b0aac92a840b7
bradbishop pushed a commit to openbmc/ipmbbridge that referenced this issue Oct 5, 2020
There is a bug in the latest version of boost that upstream yocto is
pulling in which causes ipmbbridge to not build.

See chriskohlhoff/asio#533 for more
information.

Similar to what OpenBMC did with bmcweb, disable this for now in
ipmbbridge.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ib324bcc920363cae2fa94511de297ce052293955
bradbishop pushed a commit to openbmc/phosphor-sel-logger that referenced this issue Oct 5, 2020
There is a bug in the latest version of boost that upstream yocto is
pulling in which causes sel-logger to not build.

See chriskohlhoff/asio#533 for more
information.

Similar to what OpenBMC did with bmcweb, disable this for now in
sel-logger.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I5fdb36e852e2fadce770bcb5d5b4859284e64cec
@jmog1994
Copy link

jmog1994 commented Oct 8, 2020

Hey I just found the same issue trying to import boost 1.74 in a legacy project which uses -fno-rtti I am a bit new here how this patch may be applied to the library it is downloaded...

bradbishop pushed a commit to openbmc/telemetry that referenced this issue Oct 22, 2020
There is a bug in the latest version of boost that upstream yocto is
pulling in which causes sel-telemetry to not build.
Ref: chriskohlhoff/asio#533

Change-Id: I26573688c9b6fe6c77492e2473994050f558d24e
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
bradbishop pushed a commit to openbmc/smbios-mdr that referenced this issue Nov 25, 2020
See chriskohlhoff/asio#533 for more information.
Remove the compiler flag -fno-rtti.

Similar change is made in bmcweb, ipmibridge
openbmc/ipmbbridge@1f0b833

Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: I36aad9bebf19ca0364f4f8249b2e985f38b902d4
bradbishop pushed a commit to openbmc/s2600wf-misc that referenced this issue Dec 10, 2020
Hitting a build issue with -fno-rtti that appears to be caused
by a Boost bug:
See chriskohlhoff/asio#533

Disabling it for now.

Change-Id: I57ac7b35c20d9846713adcef4ce514ef40036063
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
@chriskohlhoff
Copy link
Owner

This was fixed in asio 1.18.1 / boost 1.75.

bradbishop pushed a commit to openbmc/pfr-manager that referenced this issue Feb 5, 2021
Remove the compiler flag -fno-rtti as a temp workaround for Boost asio
defect. Refer chriskohlhoff/asio#533 for info.

Tested:
Build is successful in gerrit with this fix.

Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: Ie07980263fd4abe33ec8110a6946e03e6f3666cc
Chilledheart pushed a commit to Chilledheart/yass that referenced this issue Mar 24, 2021
It is fixed in asio 1.18.1 release. Refer chriskohlhoff/asio#533 for info.
bradbishop pushed a commit to openbmc/bmcweb that referenced this issue Feb 8, 2022
Now that chriskohlhoff/asio#533 is resolved
and boostorg/beast#2331
and boostorg/beast#2337

Are merged and updated into yocto, we can get rid of this ugliness, and
do as the author intends.

Tested: Unit tests pass, code compiles.  Header changes only.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ifa61053c5a7e7fe9b5b0232614e8daa9741b1d6c
gtmills pushed a commit to gtmills/bmcweb that referenced this issue Dec 12, 2022
Now that chriskohlhoff/asio#533 is resolved
and boostorg/beast#2331
and boostorg/beast#2337

Are merged and updated into yocto, we can get rid of this ugliness, and
do as the author intends.

Tested: Unit tests pass, code compiles.  Header changes only.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ifa61053c5a7e7fe9b5b0232614e8daa9741b1d6c
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

Successfully merging a pull request may close this issue.

4 participants