From: Xie Ligang Date: Thu, 6 Sep 2018 08:54:57 +0000 (+0800) Subject: Fix the issue which the service can't be loaded at first time. X-Git-Tag: submit/tizen/20180907.090507~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a6a6f0534aee5e4c2d00bee563ab6698f7777ad;p=platform%2Fcore%2Fuifw%2Fnlp.git Fix the issue which the service can't be loaded at first time. Change-Id: I74adad76c103cbc368638e88c3ae1ae32fa69f01 Signed-off-by: Xie Ligang --- diff --git a/packaging/nlp.spec b/packaging/nlp.spec index c27f57e..4e1c3ea 100755 --- a/packaging/nlp.spec +++ b/packaging/nlp.spec @@ -59,14 +59,15 @@ rm -rf %{buildroot} #%post #/sbin/ldconfig -%post -n org.tizen.nlp.service -/usr/bin/signing-client/hash-signer-client.sh -a -d -p platform org.tizen.nlp.service +%post %postun -p /sbin/ldconfig +tpk-backend -d %{name} --preload --force-remove %files %manifest service/org.tizen.nlp.service.manifest %defattr(-,root,root,-) +%attr(755,root,root) %{_app_bin_dir}/org.tizen.nlp.service %{_app_bin_dir}/* %{TZ_SYS_RO_PACKAGES}/org.tizen.nlp.service.xml %{_libdir}/python2.7/site-packages/langdetect/* diff --git a/service/CMakeLists.txt b/service/CMakeLists.txt index 63ce547..013e471 100755 --- a/service/CMakeLists.txt +++ b/service/CMakeLists.txt @@ -4,9 +4,6 @@ PROJECT(${fw_name} C) INCLUDE(FindPkgConfig) -EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_VERSION) -message("Building by ${CMAKE_SYSTEM_VERSION} machine") - SET(SERVICE_SRC src/service.c src/message.c @@ -34,16 +31,13 @@ pkg_check_modules(pkgs REQUIRED rpc-port ) FOREACH(flag ${pkgs_CFLAGS}) - SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -fpie") ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wl,--unresolved-symbols=ignore-in-shared-libs -Wl,-zdefs") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") -SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") -SET(CMAKE_C_FLAGS_RELEASE "-O2") ADD_EXECUTABLE(${fw_name} ${SERVICE_SRC}) -TARGET_LINK_LIBRARIES(${fw_name} ${pkgs_LDFLAGS} -lm) +TARGET_LINK_LIBRARIES(${fw_name} ${pkgs_LDFLAGS} "-pie") INSTALL(TARGETS ${fw_name} DESTINATION /usr/apps/org.tizen.nlp.service/bin/) INSTALL(FILES org.tizen.nlp.service.xml DESTINATION /usr/share/packages) diff --git a/service/org.tizen.nlp.service.xml b/service/org.tizen.nlp.service.xml index 3b046c7..b852bba 100644 --- a/service/org.tizen.nlp.service.xml +++ b/service/org.tizen.nlp.service.xml @@ -1,7 +1,7 @@ - + - + service.png