IVGCVSW-5181 Updating to flatbuffers 1.12.0

* Modify BuildGuideCrossCompilation.md to download flatbuffers 1.12.0
* Add FAQ entry about Flat Buffers on Ubuntu 20.04.

Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: I489bdb11edb32cec28aabab48c8d5af8c929b25e
diff --git a/BuildGuideCrossCompilation.md b/BuildGuideCrossCompilation.md
index 3a89a30..6feb28a 100644
--- a/BuildGuideCrossCompilation.md
+++ b/BuildGuideCrossCompilation.md
@@ -130,11 +130,11 @@
     '''
 
 #### <"a name=buildflatbuffer">Build Flatbuffer</a>
-* Building Flatbuffer version 1.10.0
+* Building Flatbuffer version 1.12.0
     '''bash
-    wget -O flatbuffers-1.10.0.tar.gz https://github.com/google/flatbuffers/archive/v1.10.0.tar.gz
-    tar xf flatbuffers-1.10.0.tar.gz
-    cd flatbuffers-1.10.0
+    wget -O flatbuffers-1.12.0.tar.gz https://github.com/google/flatbuffers/archive/v1.12.0.tar.gz
+    tar xf flatbuffers-1.12.0.tar.gz
+    cd flatbuffers-1.12.0
     rm -f CMakeCache.txt
     mkdir build
     cd build
@@ -147,7 +147,8 @@
     '''bash
     mkdir build-arm64
     cd build-arm64
-    cmake .. -DCMAKE_C_COMPILER=/usr/bin/aarch64-linux-gnu-gcc \
+    # Add -fPIC to allow us to use the libraries in shared objects.
+    CXXFLAGS="-fPIC" cmake .. -DCMAKE_C_COMPILER=/usr/bin/aarch64-linux-gnu-gcc \
 	     -DCMAKE_CXX_COMPILER=/usr/bin/aarch64-linux-gnu-g++ \
 	     -DFLATBUFFERS_BUILD_FLATC=1 \
 	     -DCMAKE_INSTALL_PREFIX:PATH=$<DIRECTORY_PATH> \
@@ -171,7 +172,7 @@
     mkdir tflite
     cd tflite
     cp ../tensorflow/tensorflow/lite/schema/schema.fbs .
-    ../flatbuffers-1.10.0/build/flatc -c --gen-object-api --reflect-types --reflect-names schema.fbs
+    ../flatbuffers-1.12.0/build/flatc -c --gen-object-api --reflect-types --reflect-names schema.fbs
     '''
 
 #### <a name="buildANN">Build ArmNN</a>
@@ -210,7 +211,7 @@
     -DBUILD_TF_LITE_PARSER=1 \
     -DTF_LITE_GENERATED_PATH=$HOME/tflite \
     -DFLATBUFFERS_ROOT=$HOME/flatbuffers-arm64 \
-    -DFLATC_DIR=$HOME/flatbuffers-1.10.0/build \
+    -DFLATC_DIR=$HOME/flatbuffers-1.12.0/build \
     -DPROTOBUF_ROOT=$HOME/google/x86_64_pb_install \
     -DPROTOBUF_ROOT=$HOME/armnn-devenv/google/x86_64_pb_install/ \
     -DPROTOBUF_LIBRARY_DEBUG=$HOME/armnn-devenv/google/arm64_pb_install/lib/libprotobuf.so.15.0.1 \
diff --git a/docs/FAQ.md b/docs/FAQ.md
index d1be0b0..ef39440 100644
--- a/docs/FAQ.md
+++ b/docs/FAQ.md
@@ -42,3 +42,7 @@
 warning: ranlib: warning for library: libboost_atomic.a the table of contents is empty (no object file members in the library define global symbols)
 
 This problem has previously been reported to the boostorg GitHub project. The solution is to manually execute the correct ranlib on each static library. https://github.com/boostorg/build/issues/160
+
+ArmNN fails to build on Ubuntu 20.04
+---------------------------------------------------------
+The compiler version update on Ubuntu 20.04 resulted in build errors in Flat buffers 1.10.0. Update to Flatbuffers 1.12.0 to resolve this problem. In addition when building flatbuffers specify -fPIC CXX flag to allow the libraries to be used in our shared objects. Without this the the ArmNN build can fail with libflatbuffers.a(util.cpp.o): relocation R_X86_64_PC32 against symbol `_ZN11flatbuffers9DirExistsEPKc' can not be used when making a shared object; recompile with -fPIC