Bug 237200 - databases/libzdb: fix build with GCC-based architectures
Summary: databases/libzdb: fix build with GCC-based architectures
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: Sunpoet Po-Chuan Hsieh
Depends on:
Reported: 2019-04-11 12:21 UTC by Piotr Kubaj
Modified: 2020-03-31 15:02 UTC (History)
2 users (show)

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

patch (1.43 KB, patch)
2019-04-11 12:21 UTC, Piotr Kubaj
no flags Details | Diff
v2 (1.43 KB, patch)
2019-04-11 12:24 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2019-04-11 12:21:58 UTC
Created attachment 203584 [details]

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]

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

  Fix build on powerpc

  PR:		237200
  Submitted by:	pkubaj

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

  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

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

  Add comment to avoid future breakage

  PR:		237200