Error with macros when building folly
- Dominant language
- C++
- Stars
- 30.5k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Description
When building folly I get many errors of the following flavour:
```
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:74:29: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 74 | #define FOLLY_HAVE_LIBLZ4 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:19:5: note: in expansion of macro ‘FOLLY_HAVE_LIBLZ4’
[2025-09-04T05:02:33.774Z] #27 73.52 19 | #if FOLLY_HAVE_LIBLZ4
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:76:32: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 76 | #define FOLLY_HAVE_LIBSNAPPY 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:29:5: note: in expansion of macro ‘FOLLY_HAVE_LIBSNAPPY’
[2025-09-04T05:02:33.774Z] #27 73.52 29 | #if FOLLY_HAVE_LIBSNAPPY
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:77:27: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 77 | #define FOLLY_HAVE_LIBZ 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:34:5: note: in expansion of macro ‘FOLLY_HAVE_LIBZ’
[2025-09-04T05:02:33.774Z] #27 73.52 34 | #if FOLLY_HAVE_LIBZ
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:75:30: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 75 | #define FOLLY_HAVE_LIBLZMA 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:38:5: note: in expansion of macro ‘FOLLY_HAVE_LIBLZMA’
[2025-09-04T05:02:33.774Z] #27 73.52 38 | #if FOLLY_HAVE_LIBLZMA
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:74:29: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 74 | #define FOLLY_HAVE_LIBLZ4 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:489:6: note: in expansion of macro ‘FOLLY_HAVE_LIBLZ4’
[2025-09-04T05:02:33.774Z] #27 73.52 489 | #if (FOLLY_HAVE_LIBLZ4 || FOLLY_HAVE_LIBLZMA)
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:74:29: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 74 | #define FOLLY_HAVE_LIBLZ4 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:514:5: note: in expansion of macro ‘FOLLY_HAVE_LIBLZ4’
[2025-09-04T05:02:33.774Z] #27 73.52 514 | #if FOLLY_HAVE_LIBLZ4
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:76:32: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 76 | #define FOLLY_HAVE_LIBSNAPPY 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:908:5: note: in expansion of macro ‘FOLLY_HAVE_LIBSNAPPY’
[2025-09-04T05:02:33.774Z] #27 73.52 908 | #if FOLLY_HAVE_LIBSNAPPY
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:75:30: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 75 | #define FOLLY_HAVE_LIBLZMA 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:1050:5: note: in expansion of macro ‘FOLLY_HAVE_LIBLZMA’
[2025-09-04T05:02:33.774Z] #27 73.52 1050 | #if FOLLY_HAVE_LIBLZMA
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:77:27: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 77 | #define FOLLY_HAVE_LIBZ 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:1692:5: note: in expansion of macro ‘FOLLY_HAVE_LIBZ’
[2025-09-04T05:02:33.774Z] #27 73.52 1692 | #if FOLLY_HAVE_LIBZ
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:74:29: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 74 | #define FOLLY_HAVE_LIBLZ4 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:1936:5: note: in expansion of macro ‘FOLLY_HAVE_LIBLZ4’
[2025-09-04T05:02:33.774Z] #27 73.52 1936 | #if FOLLY_HAVE_LIBLZ4
[2025-09-04T05:02:33.774Z] #27 73.52 | ^~~~~~~~~~~~~~~~~
[2025-09-04T05:02:33.774Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:76:32: error: missing binary operator before token "1"
[2025-09-04T05:02:33.774Z] #27 73.52 76 | #define FOLLY_HAVE_LIBSNAPPY 1 1
[2025-09-04T05:02:33.774Z] #27 73.52 | ^
[2025-09-04T05:02:36.325Z] #27 73.52 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:1942:Command '['/usr/bin/cmake', '--build', '/tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly', '--target', 'install', '--config', 'RelWithDebInfo', '-j', '4']' returned non-zero exit status 1.
[2025-09-04T05:02:36.325Z] #27 76.82 !! Failed
[2025-09-04T05:02:36.325Z] #27 76.82 5: note: in expansion of macro ‘FOLLY_HAVE_LIBSNAPPY’
[2025-09-04T05:02:36.325Z] #27 76.82 1942 | #if FOLLY_HAVE_LIBSNAPPY
[2025-09-04T05:02:36.325Z] #27 76.82 | ^~~~~~~~~~~~~~~~~~~~
[2025-09-04T05:02:36.325Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:77:27: error: missing binary operator before token "1"
[2025-09-04T05:02:36.325Z] #27 76.82 77 | #define FOLLY_HAVE_LIBZ 1 1
[2025-09-04T05:02:36.325Z] #27 76.82 | ^
[2025-09-04T05:02:36.325Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:1948:5: note: in expansion of macro ‘FOLLY_HAVE_LIBZ’
[2025-09-04T05:02:36.325Z] #27 76.82 1948 | #if FOLLY_HAVE_LIBZ
[2025-09-04T05:02:36.325Z] #27 76.82 | ^~~~~~~~~~~~~~~
[2025-09-04T05:02:36.325Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:74:29: error: missing binary operator before token "1"
[2025-09-04T05:02:36.325Z] #27 76.82 74 | #define FOLLY_HAVE_LIBLZ4 1 1
[2025-09-04T05:02:36.325Z] #27 76.82 | ^
[2025-09-04T05:02:36.325Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:1954:5: note: in expansion of macro ‘FOLLY_HAVE_LIBLZ4’
[2025-09-04T05:02:36.325Z] #27 76.82 1954 | #if FOLLY_HAVE_LIBLZ4
[2025-09-04T05:02:36.325Z] #27 76.82 | ^~~~~~~~~~~~~~~~~
[2025-09-04T05:02:36.325Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:75:30: error: missing binary operator before token "1"
[2025-09-04T05:02:36.325Z] #27 76.82 75 | #define FOLLY_HAVE_LIBLZMA 1 1
[2025-09-04T05:02:36.325Z] #27 76.82 | ^
[2025-09-04T05:02:36.325Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:1960:5: note: in expansion of macro ‘FOLLY_HAVE_LIBLZMA’
[2025-09-04T05:02:36.325Z] #27 76.82 1960 | #if FOLLY_HAVE_LIBLZMA
[2025-09-04T05:02:36.325Z] #27 76.82 | ^~~~~~~~~~~~~~~~~~
[2025-09-04T05:02:36.326Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:77:27: error: missing binary operator before token "1"
[2025-09-04T05:02:36.326Z] #27 76.82 77 | #define FOLLY_HAVE_LIBZ 1 1
[2025-09-04T05:02:36.326Z] #27 76.82 | ^
[2025-09-04T05:02:36.326Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:1974:5: note: in expansion of macro ‘FOLLY_HAVE_LIBZ’
[2025-09-04T05:02:36.326Z] #27 76.82 1974 | #if FOLLY_HAVE_LIBZ
[2025-09-04T05:02:36.326Z] #27 76.82 | ^~~~~~~~~~~~~~~
[2025-09-04T05:02:36.326Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/build/folly/folly/folly-config.h:74:29: error: missing binary operator before token "1"
[2025-09-04T05:02:36.326Z] #27 76.82 74 | #define FOLLY_HAVE_LIBLZ4 1 1
[2025-09-04T05:02:36.326Z] #27 76.82 | ^
[2025-09-04T05:02:36.326Z] #27 76.82 /tmp/fbcode_builder_getdeps-ZcodeZGleanZhsthriftZbuildZfbcode_builder-root/repos/github.com-facebook-folly.git/folly/compression/Compression.cpp:1980:6: note: in expansion of macro ‘FOLLY_HAVE_LIBLZ4’
[2025-09-04T05:02:36.326Z] #27 76.82 1980 | #if (FOLLY_HAVE_LIBLZ4 && LZ4_VERSION_NUMBER >= 10301)
[2025-09-04T05:02:36.326Z] #27 76.82 | ^~~~~~~
```
Have you come across this issue before and if so is there any indication about why this error arises?
Contributor guide
Assessment
This issue has not been assessed yet.