Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error compiling berkeleydb on Ubuntu 18.04

3762889Aug 15 2018 — edited Aug 17 2018

I've encountered an error compiling berkeleydb on Ubuntu 18.04. The error is:

../src/repmgr/repmgr_net.c: In function '__repmgr_set_ssl_ctx':
../src/repmgr/repmgr_net.c:2897:6: error: 'repmgr_ssl_mutex_arr' undeclared (first use in this function); did you mean '__repmgr_ssl_readv'?
  if (repmgr_ssl_mutex_arr != NULL) {
  ^~~~~~~~~~~~~~~~~~~~
  __repmgr_ssl_readv
../src/repmgr/repmgr_net.c:2897:6: note: each undeclared identifier is reported only once for each function it appears in
Makefile:2795: recipe for target 'repmgr_net.lo' failed
make: *** [repmgr_net.lo] Error 1

Here is a diff of the fix I've added to my own version of the code to get it building:

--- orig_repmgr_net.c 2018-07-17 18:38:14.071591439 -0500
+++ repmgr_net.c 2018-07-17 18:36:40.302562092 -0500
@@ -2894,6 +2894,7 @@
  if (ssl_ctx)
  SSL_CTX_free(ssl_ctx);

+#if OPENSSL_VERSION_NUMBER < 0x10100000L
  if (repmgr_ssl_mutex_arr != NULL) {
  for (i = 0; i < CRYPTO_num_locks(); i++) {
  if (repmgr_ssl_mutex_arr[i] != NULL)
@@ -2902,6 +2903,7 @@

  repmgr_ssl_mutex_arr = NULL;
  }
+#endif

  return (1);
}

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2018
Added on Aug 15 2018
1 comment
1,065 views