diff --git a/paddle/fluid/inference/CMakeLists.txt b/paddle/fluid/inference/CMakeLists.txt index 9dc96fdfe8622e3e78673664637ab50970fe93c6..33c22ca01ec701f463a6664196a5318c343355fe 100644 --- a/paddle/fluid/inference/CMakeLists.txt +++ b/paddle/fluid/inference/CMakeLists.txt @@ -92,7 +92,7 @@ if(NOT APPLE AND NOT WIN32) set_target_properties(paddle_fluid_shared PROPERTIES LINK_FLAGS "${LINK_FLAGS}") # check symbol hidden FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/check_symbol.cmake - "execute_process(COMMAND bash -c \"${CMAKE_CURRENT_SOURCE_DIR}/check_symbol.sh" + "execute_process(COMMAND sh -c \"${CMAKE_CURRENT_SOURCE_DIR}/check_symbol.sh" " ${CMAKE_CURRENT_BINARY_DIR}/libpaddle_fluid.so\" RESULT_VARIABLE symbol_res)\n" "if(NOT \"\${symbol_res}\" STREQUAL \"0\")\n" " message(FATAL_ERROR \"Check symbol failed.\")\n" diff --git a/paddle/fluid/inference/check_symbol.sh b/paddle/fluid/inference/check_symbol.sh index b6b7d1f20baf77c89ecbc149668da2ff2d2e3b5e..a0f64796576c85bfa4bf3a3af6c1f4489f09b84e 100755 --- a/paddle/fluid/inference/check_symbol.sh +++ b/paddle/fluid/inference/check_symbol.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh lib=$1 if [ $# -ne 1 ]; then echo "No input library"; exit -1 ; fi diff --git a/paddle/fluid/platform/enforce.h b/paddle/fluid/platform/enforce.h index ce1ec507307a2721e641ac15425c6a2321e514c7..784760a65a42a8027c407f52c6d421d451c17e5b 100644 --- a/paddle/fluid/platform/enforce.h +++ b/paddle/fluid/platform/enforce.h @@ -230,13 +230,13 @@ inline std::string SimplifyDemangleStr(std::string str) { } inline std::string GetCurrentTraceBackString() { - static constexpr int TRACE_STACK_LIMIT = 100; + //static constexpr int TRACE_STACK_LIMIT = 100; std::ostringstream sout; sout << "\n\n--------------------------------------\n"; sout << "C++ Traceback (most recent call last):"; sout << "\n--------------------------------------\n"; -#if !defined(_WIN32) +#if !defined(_WIN32) && 0 void* call_stack[TRACE_STACK_LIMIT]; auto size = backtrace(call_stack, TRACE_STACK_LIMIT); auto symbols = backtrace_symbols(call_stack, size); diff --git a/paddle/fluid/platform/macros.h b/paddle/fluid/platform/macros.h index 32b7efc04c1f2ecc22f93c08387aec69ded4930a..7ab63cc10c143a7aaabfb828c9d69814a04997a4 100644 --- a/paddle/fluid/platform/macros.h +++ b/paddle/fluid/platform/macros.h @@ -25,6 +25,6 @@ limitations under the License. */ classname& operator=(classname&&) = delete #endif -#if defined(__FLT_MAX__) -#define FLT_MAX __FLT_MAX__ -#endif // __FLT_MAX__ +//#if defined(__FLT_MAX__) +//#define FLT_MAX __FLT_MAX__ +//#endif // __FLT_MAX__ diff --git a/paddle/fluid/platform/port.h b/paddle/fluid/platform/port.h index c1b81159aca979efe4b46777a1cef49e44b95e27..0c4d41a7835f6127c56da35c280a90ebb77d2a34 100644 --- a/paddle/fluid/platform/port.h +++ b/paddle/fluid/platform/port.h @@ -26,7 +26,7 @@ #if !defined(_WIN32) #include // dladdr -#include // backtrace +//#include // backtrace #include #include #include // std::accumulate