ERROR: something wrong with flag 'folly_hazptr_use_executor' in file 'Hazptr.cpp'. One possibility: file 'Hazptr.cpp' is being linked both statically and dynamically into this executable.
- Dominant language
- C++
- Stars
- 30.5k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Description
I installed folly version 2025.02.24.00 via vcpkg and attempted to link it statically into my library. However, I encountered the following runtime error:
`ERROR: Something is wrong with the flag 'folly_hazptr_use_executor' in the file 'Hazptr.cpp'. One possibility is that 'Hazptr.cpp' is being linked both statically and dynamically into this executable.`
Based on https://github.com/facebook/folly/issues/1495, it seems the problem might be related to gflags. Unfortunately, I haven’t been able to successfully link folly statically to gflags.
Does anyone have any suggestions or solutions?
Thanks in advance!
Contributor guide
Research direction
Start with the reported runtime error in Hazptr.cpp and compare the setup with facebook/folly#1495. Reproduce the vcpkg static-linking configuration, then inspect how folly and gflags are linked. Done means identifying a supported configuration or a clearly reproducible linking defect, but the issue does not name a test or expected code change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100