diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2020-03-27 09:52:34 +0900 |
---|---|---|
committer | Yongjoo Ahn <yongjoo1.ahn@samsung.com> | 2022-12-02 16:37:24 +0900 |
commit | 44a29f3bba44b96038d6c133b99d64940ea16628 (patch) | |
tree | 652c8c02bbb2c164de57238363eb0799364329e2 | |
parent | 8f5f4c2aaa9110ec1d51d731beecef26a6890132 (diff) | |
download | flatbuffers-44a29f3bba44b96038d6c133b99d64940ea16628.tar.gz flatbuffers-44a29f3bba44b96038d6c133b99d64940ea16628.tar.bz2 flatbuffers-44a29f3bba44b96038d6c133b99d64940ea16628.zip |
Re-ported build-error workaround from 1.6.0
There was a build-error fix in flatbuffers-1.6.0, which
was in bash build script. They appear to lose it when
they abandoned the bash build script.
The following is the commit message of the workaround
of flatbuffers 1.6.0 mainline:
Work around flatbuffers flaky build
The flatbuffers build ocasionally fails with the following error:
/flatbuffers/flatbuffers-1.6.0/src/idl_parser.cpp
/mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:19:17:
error: 'MyGame' has not been declared
using namespace MyGame::Sample;
^
/mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:19:25:
error: 'Sample' is not a namespace-name
using namespace MyGame::Sample;
^
/mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:19:31:
error: expected namespace-name before ';' token
using namespace MyGame::Sample;
^
/mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp: In
function 'int main(int, const char**)':
/mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:25:3:
error: 'flatbuffers' has not been declared
flatbuffers::FlatBufferBuilder builder;
^
/mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:28:26:
error: 'builder' was not declared in this scope
auto weapon_one_name = builder.CreateString("Sword");
^
...
Disabling the BUILD_TESTS target removes the flakiness and makes the
compilation faster.
Reviewed-on: http://gerrit.cloudera.org:8080/12886
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Tim Armstrong <tarmstrong@cloudera.com>
Change-Id: Ica8300d7edad7d10adad311cc22c18b8987b1f9b
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r-- | packaging/flatbuffers.spec | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packaging/flatbuffers.spec b/packaging/flatbuffers.spec index 609e67db..36debb7d 100644 --- a/packaging/flatbuffers.spec +++ b/packaging/flatbuffers.spec @@ -29,10 +29,16 @@ This package provides headers and other miscellaneous files required to use flat cp %{SOURCE1} . %build +# flatbuffers build occasionally fails when using -j${BUILD_THREADS} with an error similar to: +# /mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:19:17: error: 'MyGame' has not been declared +# /mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:19:25: error: 'Sample' is not a namespace-name +# ... +# Disabling build tests gets rid of this flakiness and makes the compilation faster. %{cmake} \ -DFLATBUFFERS_INSTALL=ON \ -DFLATBUFFERS_BUILD_SHAREDLIB=ON \ -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ + -DFLATBUFFERS_BUILD_TESTS=OFF \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_INSTALL_BINDIR=%{_bindir} \ @@ -40,9 +46,6 @@ cp %{SOURCE1} . -DCMAKE_BUILD_TYPE=Release . %{__make} %{?_smp_mflags} -%check -make test - %install %{__make} DESTDIR=%{?buildroot:%{buildroot}} install |