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

Unset -fno-operator-names for Folly/boost compat #9586

Closed

Conversation

mszabo-wikia
Copy link
Contributor

folly/hash/Checksum.cpp includes boost/crc.hpp, which contains alternative operator representations on Boost < 1.84.0. This causes compilation failures when superproject CXXFLAGS are forwarded to Folly, since we set -fno-operator-names:

In file included from /hhvm/third-party/folly/src/folly/hash/Checksum.cpp:22:
/hhvm/_build/third-party/boost/bundled_boost-prefix/include/boost/crc.hpp:678:68: error: use of undeclared identifier 'not'
  678 |         new_dividend_bits = reflect_optionally( new_dividend_bits, not reflect,
      |                                                                    ^
/hhvm/_build/third-party/boost/bundled_boost-prefix/include/boost/crc.hpp:670:24: warning: unused parameter 'reflect' [-Wunused-parameter]
  670 |      word_length, bool reflect )

As a fix, unset this compiler flag, since we have no control over the operator representations that third-party headers might choose to use.

folly/hash/Checksum.cpp includes boost/crc.hpp, which contains
alternative operator representations on Boost < 1.84.0.
This causes compilation failures when superproject CXXFLAGS are
forwarded to Folly, since we set -fno-operator-names:

```
In file included from /hhvm/third-party/folly/src/folly/hash/Checksum.cpp:22:
/hhvm/_build/third-party/boost/bundled_boost-prefix/include/boost/crc.hpp:678:68: error: use of undeclared identifier 'not'
  678 |         new_dividend_bits = reflect_optionally( new_dividend_bits, not reflect,
      |                                                                    ^
/hhvm/_build/third-party/boost/bundled_boost-prefix/include/boost/crc.hpp:670:24: warning: unused parameter 'reflect' [-Wunused-parameter]
  670 |      word_length, bool reflect )
```

As a fix, unset this compiler flag, since we have no control over the
operator representations that third-party headers might choose to use.
@facebook-github-bot
Copy link
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. (Because this pull request was imported automatically, there will not be any future comments.)

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in de57a5c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants