From cadcf004ddd870756831abd03fe105ea630891c1 Mon Sep 17 00:00:00 2001 From: "biao716.wang" Date: Tue, 3 Jul 2018 16:59:56 +0800 Subject: [PATCH] Fix a build error 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 --- packaging/armnn.spec | 15 +++++++-------- tests/CMakeLists.txt | 2 +- tests/InferenceTestImage.cpp | 7 ++++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packaging/armnn.spec b/packaging/armnn.spec index 63fdddb..ef72436 100644 --- a/packaging/armnn.spec +++ b/packaging/armnn.spec @@ -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 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3835b42..772436c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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 diff --git a/tests/InferenceTestImage.cpp b/tests/InferenceTestImage.cpp index fb230ce..74ef244 100644 --- a/tests/InferenceTestImage.cpp +++ b/tests/InferenceTestImage.cpp @@ -19,13 +19,14 @@ #pragma GCC diagnostic ignored "-Wfloat-conversion" #define STB_IMAGE_IMPLEMENTATION -#include +#include "stb_image.h" #define STB_IMAGE_RESIZE_IMPLEMENTATION -#include +#include "stb_image_resize.h" #define STB_IMAGE_WRITE_IMPLEMENTATION -#include +#include "stb_image_write.h" + #pragma GCC diagnostic pop namespace -- 2.7.4