facebook / folly

An open-source C++ library developed and used at Facebook.

Home Page:https://groups.google.com/forum/?fromgroups#!forum/facebook-folly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2024.06.10.00: error: use of undeclared identifier 'cxxabi_with_cxa_exception'

yurivict opened this issue · comments

Build fails:

/usr/ports/devel/folly/work/folly-2024.06.10.00/folly/lang/Exception.cpp:584:20: error: use of undeclared identifier 'cxxabi_with_cxa_exception'
  584 |     auto handler = cxxabi_with_cxa_exception(
      |                    ^
1 error generated.

Could you please point out where is the symbol cxxabi_with_cxa_exception defined in the project or in the C++ standard?

Version: 2024.06.10.00
Clang-18
FreeBSD 14.1

cxxabi_with_cxa_exception is part of the internals of the libc++ standard library that handles some specific details of exception management. It looks like our detection is slightly off.

Do you know which version of libc++ or libstdc++ you're building against?

$ printf "#include <ciso646>\nint main () {}" | clang -E -stdlib=libc++ -x c++ -dM - | grep _LIBCPP_VERSION
#define _LIBCPP_ODR_SIGNATURE _LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_HARDENING_SIG, _LIBCPP_EXCEPTIONS_SIG), _LIBCPP_VERSION)
#define _LIBCPP_VERSION 180100

@Orvid Any chance to fix this?

cxxabi_with_cxa_exception is our folly internals for libc++ with libc++'s cxxabi, but not for libc++ with libcxxrt which is what FreeBSD uses.

Would you be able to check whether #2236 addresses this?