Bug 273673 - databases/cockroach: Fails to build with GCC 13: error: 'int64_t' does not name a type
Summary: databases/cockroach: Fails to build with GCC 13: error: 'int64_t' does not na...
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: Charlie Li
URL:
Keywords:
Depends on:
Blocks: 273397
  Show dependency treegraph
 
Reported: 2023-09-10 07:12 UTC by Lorenzo Salvadore
Modified: 2024-01-09 02:19 UTC (History)
0 users

See Also:
vishwin: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2023-09-10 07:12:10 UTC
This bug report blocks the update of GCC_DEFAULT to 13. This webpage can help finding ta fix: https://gcc.gnu.org/gcc-13/porting_to.html

In file included from /wrkdirs/usr/ports/databases/cockroach/work/cockroach-v19.1.11/src/github.com/cockroachdb/cockroach/c-deps/rocksdb/db/range_del_aggregator.h:14,
                 from /wrkdirs/usr/ports/databases/cockroach/work/cockroach-v19.1.11/src/github.com/cockroachdb/cockroach/c-deps/rocksdb/db/range_del_aggregator.cc:6:
/wrkdirs/usr/ports/databases/cockroach/work/cockroach-v19.1.11/src/github.com/cockroachdb/cockroach/c-deps/rocksdb/db/compaction_iteration_stats.h:13:3: error: 'int64_t' does not name a type
   13 |   int64_t num_record_drop_user = 0;
      |   ^~~~~~~

Full log: https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/cockroach-19.1.11_14.log
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2024-01-08 12:14:30 UTC
Charlie: I see cockroach has new versions available at https://github.com/cockroachdb/cockroach/tags . Do you want to try to update the port at a higher version and see if it builds fine with GCC 13 or, even better, if it builds fine with clang (in base version)? If for some reasons you believe that it is better to not update it yet, please consider setting USE_GCC=12 so that this port does not block the GCC_DEFAULT version update. Thanks.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-01-09 02:13:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=56706caf7412b675300389e594303bb26b35a907

commit 56706caf7412b675300389e594303bb26b35a907
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2024-01-09 02:10:03 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2024-01-09 02:10:03 +0000

    databases/cockroach: fix build with GCC 13

    Add #include <cstdint> where needed to fix building the bundled
    RocksDB. This is a stopgap measure until this port can be updated.

    Reported by: salvadore
    PR: 273673

 ...oach_c-deps_rocksdb_db_compaction__iteration__stats.h (new) |  8 ++++++++
 ...c-deps_rocksdb_include_rocksdb_utilities_checkpoint.h (new) | 10 ++++++++++
 ...roach_c-deps_rocksdb_table_data__block__hash__index.h (new) | 10 ++++++++++
 3 files changed, 28 insertions(+)
Comment 4 Charlie Li freebsd_committer freebsd_triage 2024-01-09 02:19:34 UTC
(In reply to Lorenzo Salvadore from comment #2)
Thanks for the reminder. The bundled RocksDB in this version still fails with clang but differently than the failure mode as noted in the comment referencing bug 236213.

Unfortunately newer CockroachDB versions use bazel as the build system, and the bazel port{,s} themselves are fragile, complicated and need more work, not to mention needing to grow some framework support as usage in the wild grows.