<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#CCCCCC">
    <p>pgpool-II 3.7.1 fails compiling against libressl 6.3. <br>
    </p>
    <p>This patch makes pgpool-II 3.7.1 compile with no errors.</p>
    <p>libtool: link: gcc -g -O2 -Wall -Wmissing-prototypes
      -Wmissing-declarations -fno-strict-aliasing -o pgpool main/main.o
      main/pool_globals.o main/pgpool_main.o main/health_check.o
      config/pool_config.o config/pool_config_variables.o
      pcp_con/pcp_child.o pcp_con/pcp_worker.o pcp_con/recovery.o
      auth/md5.o auth/pool_auth.o auth/pool_passwd.o auth/pool_hba.o
      protocol/pool_proto2.o protocol/child.o
      protocol/pool_process_query.o protocol/pool_connection_pool.o
      protocol/pool_proto_modules.o query_cache/pool_memqcache.o
      protocol/CommandComplete.o context/pool_session_context.o
      context/pool_process_context.o context/pool_query_context.o
      streaming_replication/pool_worker_child.o rewrite/pool_timestamp.o
      rewrite/pool_lobj.o utils/pool_select_walker.o utils/strlcpy.o
      utils/psprintf.o utils/pool_params.o utils/ps_status.o
      utils/pool_shmem.o utils/pool_sema.o utils/pool_signal.o
      utils/pool_path.o utils/pool_ip.o utils/pool_relcache.o
      utils/pool_process_reporting.o utils/pool_ssl.o
      utils/pool_stream.o utils/getopt_long.o utils/mmgr/mcxt.o
      utils/mmgr/aset.o utils/error/elog.o utils/error/assert.o
      utils/pcp/pcp_stream.o utils/regex_array.o utils/json_writer.o
      utils/json.o utils/statistics.o parser/nodes.o 
      -L/usr/lib64/postgresql-9.5/lib64 -lpq parser/libsql-parser.a
      watchdog/lib-watchdog.a -lpthread -lssl -lcrypto -lcrypt -lresolv
      -lnsl -lm -Wl,-rpath -Wl,/usr/lib64/postgresql-9.5/lib64
      -Wl,-rpath -Wl,/usr/local/lib<br>
      main/main.o: In function `main':<br>
      /usr/src/pgpool-II-3.7.1/src/main/main.c:190: undefined reference
      to `OPENSSL_init_ssl'<br>
      watchdog/lib-watchdog.a(wd_utils.o): In function
      `calculate_hmac_sha256':<br>
      /usr/src/pgpool-II-3.7.1/src/watchdog/wd_utils.c:158: undefined
      reference to `HMAC_CTX_new'<br>
      /usr/src/pgpool-II-3.7.1/src/watchdog/wd_utils.c:159: undefined
      reference to `HMAC_CTX_reset'<br>
      /usr/src/pgpool-II-3.7.1/src/watchdog/wd_utils.c:169: undefined
      reference to `HMAC_CTX_reset'<br>
      /usr/src/pgpool-II-3.7.1/src/watchdog/wd_utils.c:170: undefined
      reference to `HMAC_CTX_free'<br>
      collect2: error: ld returned 1 exit status<br>
      make[2]: *** [Makefile:748: pgpool] Error 1<br>
      make[2]: Leaving directory '/usr/src/pgpool-II-3.7.1/src'<br>
      make[1]: *** [Makefile:836: all-recursive] Error 1<br>
      make[1]: Leaving directory '/usr/src/pgpool-II-3.7.1/src'<br>
      make: *** [Makefile:413: all-recursive] Error 1<br>
    </p>
    <p>I have also submited this patch to Gentoo's bugzilla
      <a class="moz-txt-link-freetext" href="https://bugs.gentoo.org/show_bug.cgi?id=646888">https://bugs.gentoo.org/show_bug.cgi?id=646888</a></p>
    <pre class="moz-signature" cols="72">-- 
Sandino Araico Sánchez 
<a class="moz-txt-link-freetext" href="http://sandino.net">http://sandino.net</a>
</pre>
  </body>
</html>