Fix a build error
authorbiao716.wang <biao716.wang@samsung.com>
Tue, 3 Jul 2018 08:59:56 +0000 (16:59 +0800)
committerInki Dae <inki.dae@samsung.com>
Thu, 4 Mar 2021 05:19:31 +0000 (14:19 +0900)
Fixed build error: Found '/home/abuild/rpmbuild/BUILDROOT/armnn-18.05-0.arm' in installed files; aborting
refined this patch
Change-Id: I91534256de2144d86b37d42f85bb367643348bce
Signed-off-by : biao716.wang <biao716.wang@samsung.com>

packaging/armnn.spec
tests/CMakeLists.txt
tests/InferenceTestImage.cpp

index 63fdddb..ef72436 100644 (file)
@@ -12,6 +12,8 @@ BuildRequires: curl
 BuildRequires: cmake
 BuildRequires: libarmcl-devel
 BuildRequires: protobuf-devel
+BuildRequires: boost-devel
+BuildRequires:libcaffeonacl-devel
 
 %description
 Arm Neural Networks Library
@@ -63,9 +65,6 @@ Summary:      Sample application and benchmark binaries to test ARM Neural Network Li
 cp %{SOURCE1001} .
 
 %build
-#prepare stb
-mkdir -p %{buildroot}%{_includedir}
-cp -ar external/stb %{buildroot}%{_includedir}
 
 #build ArmNN
 cmake -DARMCOMPUTENEON=1        \
@@ -74,17 +73,21 @@ cmake -DARMCOMPUTENEON=1        \
       -DBUILD_CAFFE_PARSER=1 \
       -DBUILD_TESTS=1 \
       -DCAFFE_GENERATED_SOURCES=/usr/include \
-      -DTHIRD_PARTY_INCLUDE_DIRS=%{buildroot}%{_includedir}/stb
 
 make
 
 %install
+
 mkdir -p %{buildroot}%{_libdir}
 mkdir -p %{buildroot}%{_bindir}/armnn
 mkdir -p %{buildroot}%{_includedir}/armnn
 mkdir -p %{buildroot}%{_includedir}/armnnCaffeParser
 mkdir -p %{buildroot}%{_includedir}/armnnTfParser
 
+#prepare stb
+mkdir -p %{buildroot}%{_includedir}
+cp -ar external/stb %{buildroot}%{_includedir}
+
 install -m 0755 bin/*-Armnn %{buildroot}%{_bindir}/armnn/
 install -m 0755 bin/ExecuteNetwork %{buildroot}%{_bindir}/armnn/
 install -m 0755 bin/MultipleNetworksCifar10 %{buildroot}%{_bindir}/armnn/
@@ -94,10 +97,6 @@ install -m 0644 include/armnn/* %{buildroot}%{_includedir}/armnn/
 install -m 0644 include/armnnCaffeParser/* %{buildroot}%{_includedir}/armnnCaffeParser/
 install -m 0644 include/armnnTfParser/* %{buildroot}%{_includedir}/armnnTfParser/
 
-%clean
-echo "in clean"
-rm -rf $RPM_BUILD_ROOT
-
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
index 316a58e..8545187 100644 (file)
@@ -1,7 +1,7 @@
 # UnitTests
 include(CheckIncludeFiles)
 
-include_directories("${THIRD_PARTY_INCLUDE_DIRS}")
+include_directories(${CMAKE_SOURCE_DIR}/external/stb)
 
 # Setup the inference test framework
 set(inference_test_sources
index 14f2042..91bc2e0 100644 (file)
 #pragma GCC diagnostic ignored "-Wfloat-conversion"
 
 #define STB_IMAGE_IMPLEMENTATION
-#include <stb/stb_image.h>
+#include "stb_image.h"
 
 #define STB_IMAGE_RESIZE_IMPLEMENTATION
-#include <stb/stb_image_resize.h>
+#include "stb_image_resize.h"
 
 #define STB_IMAGE_WRITE_IMPLEMENTATION
-#include <stb_image_write.h>
+#include "stb_image_write.h"
+
 #pragma GCC diagnostic pop
 
 namespace