<p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04.5 LTS - docker images tensorflow/tensorflow:latest and tensorflow/devel</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: -</li>
<li>TensorFlow installed from (source or binary): source</li>
<li>TensorFlow version: commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/a2bb5db1bf7931b0dc2cd08e53b8798489568198/hovercard" href="https://github.com/tensorflow/tensorflow/commit/a2bb5db1bf7931b0dc2cd08e53b8798489568198"><tt>a2bb5db</tt></a></li>
<li>Python version: Python 2.7.12</li>
<li>Installed using virtualenv? pip? conda?: sources</li>
<li>Bazel version (if compiling from source): 0.19.2</li>
<li>GCC/Compiler version (if compiling from source): gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609</li>
<li>CUDA/cuDNN version: -</li>
<li>GPU model and memory: -</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong><br>
Some of the tests don't compile because of the incorrect order of parameters and cause the following error:<br>
<code class="notranslate">sorry, unimplemented: non-trivial designated initializers not supported</code></p>
<p dir="auto">Problem is caused by the order in designated initializer which is different from the order in struct.</p>
<p dir="auto">How should be tensorflow tested so that this test passes? It even doesn't pass on official Google tensorflow images.<br>
<strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong><br>
bazel test --config=opt --test_size_filters=small,medium -- tensorflow/lite/toco/tflite:operator_test</p>
<p dir="auto"><strong>Any other info / logs</strong></p>
<p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04.1 LTS</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:</li>
<li>TensorFlow installed from (source or binary): source</li>
<li>TensorFlow version: commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/a2bb5db1bf7931b0dc2cd08e53b8798489568198/hovercard" href="https://github.com/tensorflow/tensorflow/commit/a2bb5db1bf7931b0dc2cd08e53b8798489568198"><tt>a2bb5db</tt></a></li>
<li>Python version: 2.7.15rc1</li>
<li>Installed using virtualenv? pip? conda?: sources</li>
<li>Bazel version (if compiling from source): 0.20.0</li>
<li>GCC/Compiler version (if compiling from source): gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0</li>
<li>CUDA/cuDNN version: -</li>
<li>GPU model and memory: -</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong><br>
During compilation I get an error: sorry, unimplemented: non-trivial designated initializers not supported.<br>
It can be solved by setting all function pointers to null and applying initialization in order as in the struct defintion.<br>
<strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong><br>
bazel test --verbose_failures tensorflow/lite/delegates/nnapi:nnapi_delegate</p>
<p dir="auto"><strong>Any other info / logs</strong><br>
I attach diff which fixes this error for me.<br>
<a href="https://github.com/tensorflow/tensorflow/files/2901455/diff.txt">diff.txt</a></p>