diff --git a/WORKSPACE b/WORKSPACE index 097817bd9..04a0297f9 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,6 +8,7 @@ http_archive( build_file = "//ml_metadata:postgresql.BUILD", workspace_file_content = "//ml_metadata:postgresql.WORKSPACE", sha256 = "1cb8e3a59861be5175878159fc3a41240c379e9aabaabba8288e6cfd6980fff0", + patches = ["//ml_metadata/third_party:postgresql.patch"], strip_prefix = "postgresql-12.17", urls = [ "https://ftp.postgresql.org/pub/source/v12.17/postgresql-12.17.tar.gz", @@ -52,10 +53,10 @@ http_archive( http_archive( name = "boringssl", - sha256 = "f69738ca17f1dd30ae3ddb1fa7519245044737d27c8a3defa7a94718d9dfd724", - strip_prefix = "boringssl-68dcc7f7b816e199c8f373ea0a2d6a4e1f526e2d", + sha256 = "579cb415458e9f3642da0a39a72f79fdfe6dc9c1713b3a823f1e276681b9703e", + strip_prefix = "boringssl-648cbaf033401b7fe7acdce02f275b06a88aab5c", urls = [ - "https://github.com/google/boringssl/archive/68dcc7f7b816e199c8f373ea0a2d6a4e1f526e2d.tar.gz", + "https://github.com/google/boringssl/archive/648cbaf033401b7fe7acdce02f275b06a88aab5c.tar.gz", ], ) diff --git a/ml_metadata/metadata_store/metadata_store.py b/ml_metadata/metadata_store/metadata_store.py index 359d30b9e..a97b0b305 100644 --- a/ml_metadata/metadata_store/metadata_store.py +++ b/ml_metadata/metadata_store/metadata_store.py @@ -17,6 +17,8 @@ types can be created on the fly. """ +from absl import flags +flags.FLAGS(['pytest']) import enum import random import time diff --git a/ml_metadata/third_party/postgresql.patch b/ml_metadata/third_party/postgresql.patch new file mode 100644 index 000000000..80785cec2 --- /dev/null +++ b/ml_metadata/third_party/postgresql.patch @@ -0,0 +1,37 @@ +diff --git src/port/pg_bitutils.c src/port/pg_bitutils.c +index 7847e8a..17714af 100644 +--- src/port/pg_bitutils.c ++++ src/port/pg_bitutils.c +@@ -12,12 +12,14 @@ + */ + #include "c.h" + ++#if !defined(__ppc__) && !defined(__PPC__) && !defined(__ppc64__) && !defined(__PPC64__) + #ifdef HAVE__GET_CPUID + #include + #endif + #ifdef HAVE__CPUID + #include + #endif ++#endif + + #include "port/pg_bitutils.h" + +@@ -141,6 +143,7 @@ int (*pg_popcount64) (uint64 word) = pg_popcount64_slow; + static bool + pg_popcount_available(void) + { ++#if !defined(__ppc__) && !defined(__PPC__) && !defined(__ppc64__) && !defined(__PPC64__) + unsigned int exx[4] = {0, 0, 0, 0}; + + #if defined(HAVE__GET_CPUID) +@@ -152,6 +155,9 @@ pg_popcount_available(void) + #endif + + return (exx[2] & (1 << 23)) != 0; /* POPCNT */ ++#else ++ return false; ++#endif + } + + /* diff --git a/ml_metadata/tools/docker_server/Dockerfile.redhat b/ml_metadata/tools/docker_server/Dockerfile.redhat index 4cc184f11..24d051fb3 100644 --- a/ml_metadata/tools/docker_server/Dockerfile.redhat +++ b/ml_metadata/tools/docker_server/Dockerfile.redhat @@ -37,6 +37,7 @@ WORKDIR /mlmd-src # "-std=c++17" is needed in order to build with ZetaSQL. RUN bazel build -c opt --action_env=PATH \ --define=grpc_no_ares=true \ + --copt="-Wno-maybe-uninitialized" \ //ml_metadata/metadata_store:metadata_store_server \ --cxxopt="-std=c++17" --host_cxxopt="-std=c++17"