Bug 226099 - databases/pgpool 3.4.16 no longer builds under FBSD11.1S and libressl
Summary: databases/pgpool 3.4.16 no longer builds under FBSD11.1S and libressl
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-21 22:35 UTC by dewayne
Modified: 2018-05-17 09:33 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (tz)


Attachments
svn-diff-pgpool_libressl (2.53 KB, patch)
2018-02-22 00:31 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-pqpool-II-33 (3.56 KB, patch)
2018-02-22 11:41 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2018-02-21 22:35:08 UTC
Upgrading from pgpool 3.4.11 to 3.4.16 results in the following build messages:
main/main.o: In function `main':
main.c:(.text.startup+0x2df): undefined reference to `OPENSSL_init_ssl'
watchdog/lib-watchdog.a(wd_packet.o): In function `wd_calc_hash':
wd_packet.c:(.text+0x1a33): undefined reference to `HMAC_CTX_new'
wd_packet.c:(.text+0x1a40): undefined reference to `HMAC_CTX_reset'
wd_packet.c:(.text+0x1a90): undefined reference to `HMAC_CTX_reset'
wd_packet.c:(.text+0x1a9a): undefined reference to `HMAC_CTX_free'
collect2: error: ld returned 1 exit status
gmake[3]: *** [Makefile:826: pgpool] Error 1
gmake[3]: Leaving directory '/var/ports/usr/ports/databases/pgpool/work/pgpool-II-3.4.16/src'
gmake[2]: *** [Makefile:980: all-recursive] Error 1
gmake[2]: Leaving directory '/var/ports/usr/ports/databases/pgpool/work/pgpool-II-3.4.16/src'
gmake[1]: *** [Makefile:388: all-recursive] Error 1
gmake[1]: Leaving directory '/var/ports/usr/ports/databases/pgpool/work/pgpool-II-3.4.16'

Suspect the changes arising from 3.4.14 see http://www.pgpool.net/docs/latest/en/html/release-3-4-14.html

Platform: FreeBSD 11.1-STABLE  r328914M      amd64 1101509 1101509
SSL: libressl 2.6.4 (build is successful using openssl 1.0.2.n)
Build options: the defaults.

CFLAGS: -O2 -pipe -Wl,-m,elf_x86_64_fbsd -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 -g0 -ggdb0 -DSTRIP_FBSDID -UDEBUGGING -UEBUGGING -UDEBUG -fno-math-errno -Wl,--hash-style=sysv -fPIE -fPIC -fomit-frame-pointer -march=core2  -fstack-protector -fno-strict-aliasing  (please note binutils 2.30 is used)
Both compilers failed to build: clang 5.0.1 and gcc7
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-02-22 00:31:35 UTC
Created attachment 190879 [details]
svn-diff-pgpool_libressl
Comment 2 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2018-02-22 10:55:50 UTC
The patch builds fine for me. Can you please check if its fixes your problem?

@Walter:
Can you please provide some patch for databases/pgpool-II-33. There is the same problem when using LibreSSL.
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-02-22 11:41:10 UTC
Created attachment 190889 [details]
svn-diff-pqpool-II-33
Comment 4 dewayne 2018-02-22 12:28:13 UTC
(In reply to w.schwarzenfeld from comment #1)
Thank-you Walter, your patches enable the build to succeed on FreeBSD 11.1 amd64 with libressl 2.6.4.  Unfortunately it will be a few days before a window for function testing.  :/

As another matter arose, I won't close. But I'm very pleased with your quick turnaround. :)
Kind regards.
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-02-22 12:32:25 UTC
Ok, I will remind you ... if you forget ;-))
Comment 6 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2018-03-23 10:19:52 UTC
Aloha,

did you find some time for testing the patch?

Greetings,
Torsten
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-05-17 09:32:47 UTC
A commit references this bug:

Author: tz
Date: Thu May 17 09:32:05 UTC 2018
New revision: 470211
URL: https://svnweb.freebsd.org/changeset/ports/470211

Log:
  databases/pgpool-II-33: Fix build with LibreSSL

  The build was broken after the latest update of the port,
  but only on amd64, not i386.

  PR:		226099
  Submitted by:	w.schwarzenfeld@utanet.at
  Reported by:	dewayne@heuristicsystems.com.au

Changes:
  head/databases/pgpool-II-33/Makefile
  head/databases/pgpool-II-33/files/patch-main.c
  head/databases/pgpool-II-33/files/patch-pool__config.l
  head/databases/pgpool-II-33/files/patch-wd__packet.c
Comment 8 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2018-05-17 09:33:42 UTC
Since opening the PR only databases/pgpool-II-33 still fails to build. And it only fails on amd64, not i386.

I just committed the patch to fix the issue. 

Thanks for your work! :)

Greetings,
Torsten