[nnpkg_run] Use HDF5 shared library for both x86_64 and arm (#6910)
author이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>
Mon, 26 Aug 2019 05:38:49 +0000 (01:38 -0400)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 26 Aug 2019 05:38:49 +0000 (14:38 +0900)
Let's use same type of hdf5 library for `nnpackage_run`.
Currently arm uses hdf5 static linking, x86_64 uses shared one.

I've found that `aec` linking bug exists in shared library also.
Thus, if condition is removed from HDF5Config.cmake.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
infra/nnfw/cmake/packages/HDF5Config.cmake
tests/tools/nnpackage_run/CMakeLists.txt

index 45eedb4..1f90dea 100644 (file)
@@ -27,7 +27,5 @@ if (NOT HDF5_FOUND)
   set(HDF5_FOUND TRUE)
 endif()
 
-if (HDF5_USE_STATIC_LIBRARIES)
-  # Append missing libaec which is required by libsz, which is required by libhdf5
-  list(APPEND HDF5_LIBRARIES "aec")
-endif(HDF5_USE_STATIC_LIBRARIES)
+# Append missing libaec which is required by libsz, which is required by libhdf5
+list(APPEND HDF5_LIBRARIES "aec")
index 00b8938..5fd7136 100644 (file)
@@ -6,10 +6,6 @@ if(NOT BUILD_NEURUN)
   return()
 endif(NOT BUILD_NEURUN)
 
-if (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
-  # use static linking to avoid installing hdf5 library on existing arm CI slaves.
-  set(HDF5_USE_STATIC_LIBRARIES ON)
-endif (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
 nnfw_find_package(HDF5 QUIET)
 if(NOT HDF5_FOUND)
   message(WARNING "HDF5 NOT found. Install libhdf5-dev to build nnpackage_run.")