diff --git a/paddle/fluid/platform/macros.h b/paddle/fluid/platform/macros.h index 82b20a53ce770757c08d1c9d2ce28a084861147c..410fbdec586658807e7a7092a337bbde64b1487c 100644 --- a/paddle/fluid/platform/macros.h +++ b/paddle/fluid/platform/macros.h @@ -26,7 +26,7 @@ limitations under the License. */ #endif #ifndef PADDLE_WITH_MUSL - #if defined(__FLT_MAX__) - #define FLT_MAX __FLT_MAX__ - #endif // __FLT_MAX__ +#if defined(__FLT_MAX__) +#define FLT_MAX __FLT_MAX__ +#endif // __FLT_MAX__ #endif diff --git a/paddle/fluid/platform/port.h b/paddle/fluid/platform/port.h index 5c346537ccad8e69c0d426f35d43f531d4190e2e..b484da152d5df27c54f511af394da56fd6697614 100644 --- a/paddle/fluid/platform/port.h +++ b/paddle/fluid/platform/port.h @@ -25,7 +25,7 @@ #include "glog/logging.h" #if !defined(_WIN32) -#include // dladdr +#include // dladdr #include #include #include // std::accumulate diff --git a/paddle/scripts/musl_build/Dockerfile b/paddle/scripts/musl_build/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6b1002b4d3e19825434a0850fff1ca1e16c0b213 --- /dev/null +++ b/paddle/scripts/musl_build/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.7-alpine3.10 + +RUN apk add --no-cache --force-overwrite\ + g++ gfortran make cmake patchelf\ + git \ + linux-headers \ + libjpeg-turbo-dev \ + lapack-dev openblas-dev + +#RUN pip3 install scikit-build\ +# numpy pandas scipy \ +# opencv \ No newline at end of file diff --git a/python/paddle/fluid/core.py b/python/paddle/fluid/core.py index 0fbdea2dbcac678fe446f7ae0a2918a13aea29e3..c292ad48e367d641108a6959abbd81a5b85120c3 100644 --- a/python/paddle/fluid/core.py +++ b/python/paddle/fluid/core.py @@ -208,9 +208,9 @@ def get_libc_ver(): ldd_musl = run_shell_command("ldd 2>&1 | awk '/Version/{print $NF}'") if ldd_musl is not None: return ("musl", ldd_musl) - return (None, None) + def less_than_ver(a, b): if a is None or b is None: return False