Bug 237200

Summary: databases/libzdb: fix build with GCC-based architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Sunpoet Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Only Me CC: linimon, pkubaj
Priority: --- Flags: bugzilla: maintainer-feedback? (sunpoet)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
v2 none

Description Piotr Kubaj freebsd_committer 2019-04-11 12:21:58 UTC
Created attachment 203584 [details]
patch

This port requires C11 and C++17 compatible compiler, so add USES=compiler:c11 to fix build on GCC architectures.

Additionally, passing --with-openssl=/usr (with base OpenSSL) adds -L/usr/lib to LDFLAGS, which causes GCC to try to link to base libstdc++, instead of the new one from ports, so don't pass the directory to OpenSSL when using base SSL library.

Also, add include cassert to test/zdbpp.cpp.

Tested on powerpc64 and amd64.
Comment 1 Piotr Kubaj freebsd_committer 2019-04-11 12:24:09 UTC
Created attachment 203585 [details]
v2

Correct --with to --enable.
Comment 2 Sunpoet Po-Chuan Hsieh freebsd_committer 2019-04-20 23:08:51 UTC
Committed. Thanks!
Comment 3 commit-hook freebsd_committer 2019-04-20 23:09:31 UTC
A commit references this bug:

Author: sunpoet
Date: Sat Apr 20 23:08:34 UTC 2019
New revision: 499489
URL: https://svnweb.freebsd.org/changeset/ports/499489

Log:
  Fix build on powerpc

  PR:		237200
  Submitted by:	pkubaj

Changes:
  head/databases/libzdb/Makefile
  head/databases/libzdb/files/
  head/databases/libzdb/files/patch-test-zdbpp.cpp
Comment 4 commit-hook freebsd_committer 2020-03-31 13:59:25 UTC
A commit references this bug:

Author: pkubaj
Date: Tue Mar 31 13:58:02 UTC 2020
New revision: 529975
URL: https://svnweb.freebsd.org/changeset/ports/529975

Log:
  databases/libzdb: fix build on GCC architectures

  r529335 partially reverted r499489, which caused another breakage on GCC architectures by passing -L/usr/lib while using GCC from ports and making it link to base libstdc++:
  /usr/local/bin/ld: zdbpp.cpp:(.text.startup+0x1f0): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)'

  Apply changes to Makefile from r499489 to fix it.

  PR:		237200

Changes:
  head/databases/libzdb/Makefile
Comment 5 commit-hook freebsd_committer 2020-03-31 15:02:32 UTC
A commit references this bug:

Author: sunpoet
Date: Tue Mar 31 15:01:10 UTC 2020
New revision: 529978
URL: https://svnweb.freebsd.org/changeset/ports/529978

Log:
  Add comment to avoid future breakage

  PR:		237200

Changes:
  head/databases/libzdb/Makefile