)]}'
{
  "commit": "0de92b02f77188ee2f0f5132f4cecd0be680bb81",
  "tree": "1bc4fbae598be0989204f8d3539d5d7312c02fc3",
  "parents": [
    "4c28ed52f41c5ec9943a3ddb36faedcdfcf3178e"
  ],
  "author": {
    "name": "Yunze Xu",
    "email": "xyzinfernity@163.com",
    "time": "Fri Aug 11 23:50:24 2023 +0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Aug 11 23:50:24 2023 +0800"
  },
  "message": "Fix the OpenSSL 3.x symbols not found on macOS build (#145)\n\n### Motivation\r\n\r\nRecently after the runner image was upgraded, the macOS build failed\r\nwith `symbol not found in flat namespace (_EVP_PKEY_get_bn_param)`.\r\n\r\nSee https://github.com/apache/pulsar-client-python/actions/runs/5805986979/job/15740588663?pr\u003d134\r\n\r\nThere are actually two issues.\r\n\r\nOne is that when building the C++ client on macOS,\r\n`/usr/local/opt/openssl/` will be firstly searched if `OPENSSL_ROOT_DIR`\r\nis not defined.\r\n\r\nhttps://github.com/apache/pulsar-client-cpp/blob/1e7d259bb94379ef6e4618fdac283912d0be6861/CMakeLists.txt#L136\r\n\r\nIt should be fixed at the C++ client side but we can also have a\r\nworkaround here by defining the `OPENSSL_ROOT_DIR` variable.\r\n\r\nThe other is that when building the libcurl, the headers from\r\n`/usr/local/include/openssl/` were included, see the logs:\r\n\r\n```\r\n/usr/local/include/openssl/macros.h:193:49: note: expanded from macro \u0027OSSL_DEPRECATEDIN_3_0\u0027\r\n#   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)\r\n```\r\n\r\nIt\u0027s a strange error because we have already configured the `--with-ssl`\r\noption to specify the OpenSSL directory. I tried adding\r\n`-I/path/to/my/openssl` to the `CFLAGS` env variable but it didn\u0027t work.\r\n\r\n### Modifications\r\n\r\nTo resolve the 1st issue, specifying `OPENSSL_ROOT_DIR` to the\r\n`DEPS_PREFIX` path when building the C++ client.\r\n\r\nTo resolve the 2nd issue, since I cannot find an elegant way to do that,\r\nI just copied the OpenSSL headers from the dependency header directory\r\nto the libcurl include directory.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "84f48dc0247b86e05c9ec24b7ad55c5bd532567f",
      "old_mode": 33261,
      "old_path": "pkg/mac/build-dependencies.sh",
      "new_id": "c85b186ed05fcf9b1a5c6d5e0bde114851db2aee",
      "new_mode": 33261,
      "new_path": "pkg/mac/build-dependencies.sh"
    },
    {
      "type": "modify",
      "old_id": "a6849e240e0e29239dc3e6cc7a90c00f0bb12c6e",
      "old_mode": 33261,
      "old_path": "pkg/mac/build-pulsar-cpp.sh",
      "new_id": "51f1ef36a9558e86bb9b7baa40ce52257521ecdd",
      "new_mode": 33261,
      "new_path": "pkg/mac/build-pulsar-cpp.sh"
    }
  ]
}
