Bug 249428 - databases/rocksdb: compile error on 11.4 (clang 10 related?)
Summary: databases/rocksdb: compile error on 11.4 (clang 10 related?)
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: 2020-09-18 09:33 UTC by Bengt Ahlgren
Modified: 2020-09-25 11:27 UTC (History)
1 user (show)

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

poudriere log (19.86 KB, text/plain)
2020-09-18 09:33 UTC, Bengt Ahlgren
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bengt Ahlgren 2020-09-18 09:33:01 UTC
Created attachment 218048 [details]
poudriere log

databases/rocksdb 6.11.4 does not compile on FreeBSD 11.4. The errors are:

  CC       shared-objects/options/options_helper.o
options/options_helper.cc:659:19: error: loop variable 'iter' of type 'const std::__1::pair<const std::__1::basic_string<char>, rocksdb::OptionTypeInfo>' creates a copy from type 'const std::__1::pair<const std::__1::basic_string<char>, rocksdb::OptionTypeInfo>' [-Werror,-Wrange-loop-construct]
  for (const auto iter : type_info) {
options/options_helper.cc:659:8: note: use reference type 'const std::__1::pair<const std::__1::basic_string<char>, rocksdb::OptionTypeInfo> &' to prevent copying
  for (const auto iter : type_info) {
1 error generated.
gmake[1]: *** [Makefile:834: shared-objects/options/options_helper.o] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/databases/rocksdb/work/rocksdb-6.11.4'
*** Error code 1

make: stopped in /usr/ports/databases/rocksdb

Since there are no previous reports about this, perhaps the error is clang 10 specific?
Comment 1 Bengt Ahlgren 2020-09-18 09:59:48 UTC
There seems to be an upstream fix (will test shortly):

Comment 2 Hiroyuki Une 2020-09-24 12:41:44 UTC
(In reply to Bengt Ahlgren from comment #1)
Pull request #7025 has not been merged into 6.11.fb branch yet, but has already been merged into 6.12.fb and 6.13.fb branch.  Is 6.11.fb branch (and also 6.11.4) maintained yet?  

[6.11.fb branch]

[6.12.fb branch]

[6.13.fb branch]
Comment 3 Sunpoet Po-Chuan Hsieh freebsd_committer 2020-09-25 11:27:06 UTC
It should be fixed in r549685. Thanks!