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

Fix a race condition with ninja 1.12.0 #599

Closed
wants to merge 1 commit into from

Conversation

BSDKaffee
Copy link
Contributor

Fix a race condition that exists when building with ninja 1.12.0 where any_rep_types.h is not generated before attempting to compile Any.cpp.

[ 57% 214/369] /usr/local/libexec/ccache/c++ -DFMT_SHARED -DGFLAGS_IS_A_DLL=0 -DTHRIFT_HAVE_LIBSNAPPY=0 -Dthrifttype_EXPORTS -I/wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/. -I/wrkdirs/usr/ports/devel/fbthrift/work/.build -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -DGLOG_USE_GLOG_EXPORT -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -DGLOG_USE_GLOG_EXPORT -DNDEBUG -std=c++17 -fPIC -pthread -fsized-deallocation -MD -MT thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o -MF thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o.d -o thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o -c /wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/thrift/lib/cpp2/type/Any.cpp
FAILED: thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o
/usr/local/libexec/ccache/c++ -DFMT_SHARED -DGFLAGS_IS_A_DLL=0 -DTHRIFT_HAVE_LIBSNAPPY=0 -Dthrifttype_EXPORTS -I/wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/. -I/wrkdirs/usr/ports/devel/fbthrift/work/.build -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -DGLOG_USE_GLOG_EXPORT -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -DGLOG_USE_GLOG_EXPORT -DNDEBUG -std=c++17 -fPIC -pthread -fsized-deallocation -MD -MT thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o -MF thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o.d -o thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o -c /wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/thrift/lib/cpp2/type/Any.cpp In file included from /wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/thrift/lib/cpp2/type/Any.cpp:17: /wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/./thrift/lib/cpp2/type/Any.h:23:10: fatal error: 'thrift/lib/thrift/gen-cpp2/any_rep_types.h' file not found
#include <thrift/lib/thrift/gen-cpp2/any_rep_types.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
*** Error code 1

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request May 8, 2024
Address a potential race condition where generated headers not created
before they used in the build.

facebook/fbthrift#599

PR:		278693
Approved by:	portmgr (blanket)
@facebook-github-bot
Copy link
Contributor

@Orvid has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Orvid merged this pull request in 99417c6.

facebook-github-bot pushed a commit to facebook/hhvm that referenced this pull request May 13, 2024
Summary:
Fix a race condition that exists when building with ninja 1.12.0 where any_rep_types.h is not generated before attempting to compile Any.cpp.

`[ 57% 214/369] /usr/local/libexec/ccache/c++ -DFMT_SHARED -DGFLAGS_IS_A_DLL=0 -DTHRIFT_HAVE_LIBSNAPPY=0 -Dthrifttype_EXPORTS -I/wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/. -I/wrkdirs/usr/ports/devel/fbthrift/work/.build -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -fPIC -DGLOG_USE_GLOG_EXPORT -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -fPIC -DGLOG_USE_GLOG_EXPORT  -DNDEBUG -std=c++17 -fPIC -pthread -fsized-deallocation -MD -MT thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o -MF thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o.d -o thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o -c /wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/thrift/lib/cpp2/type/Any.cpp`
`FAILED: thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o`
`/usr/local/libexec/ccache/c++ -DFMT_SHARED -DGFLAGS_IS_A_DLL=0 -DTHRIFT_HAVE_LIBSNAPPY=0 -Dthrifttype_EXPORTS -I/wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/. -I/wrkdirs/usr/ports/devel/fbthrift/work/.build -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -fPIC -DGLOG_USE_GLOG_EXPORT -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -fPIC -DGLOG_USE_GLOG_EXPORT  -DNDEBUG -std=c++17 -fPIC -pthread -fsized-deallocation -MD -MT thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o -MF thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o.d -o thrift/lib/cpp2/CMakeFiles/thrifttype.dir/type/Any.cpp.o -c /wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/thrift/lib/cpp2/type/Any.cpp
In file included from /wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/thrift/lib/cpp2/type/Any.cpp:17:
/wrkdirs/usr/ports/devel/fbthrift/work/fbthrift-2024.05.02.00/./thrift/lib/cpp2/type/Any.h:23:10: fatal error: 'thrift/lib/thrift/gen-cpp2/any_rep_types.h' file not found`
`#include <thrift/lib/thrift/gen-cpp2/any_rep_types.h>`
`         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
`1 error generated.`
`ninja: build stopped: subcommand failed.`
`*** Error code 1`

X-link: facebook/fbthrift#599

Reviewed By: vitaut

Differential Revision: D57138546

Pulled By: Orvid

fbshipit-source-id: 7c59885e927c22f58c92a7f2a0a5f84331a67b9c
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.

None yet

2 participants