Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YSQL] Fix macos compilation issue #24012

Closed
1 task done
pao214 opened this issue Sep 18, 2024 · 0 comments
Closed
1 task done

[YSQL] Fix macos compilation issue #24012

pao214 opened this issue Sep 18, 2024 · 0 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@pao214
Copy link
Contributor

pao214 commented Sep 18, 2024

Jira Link: DB-12899

Description

First reported by @foucher on slack

/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/debug/long_operation_tracker.cc:119:22: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  119 |       if (!operation.unique()) {
      |            ~~~~~~~~~ ^
../../src/yb/util/debug/long_operation_tracker.cc:124:24: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  124 |         if (!operation.unique()) {
      |              ~~~~~~~~~ ^
2 errors generated.

Input files:
  src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
  /Users/tfoucher/code/yugabyte-db3/src/yb/util/debug/long_operation_tracker.cc
Output file (from -o): src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
\-------------------------------------------------------------------------------

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@pao214 pao214 added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Sep 18, 2024
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Sep 18, 2024
@pao214 pao214 self-assigned this Sep 18, 2024
@yugabyte-ci yugabyte-ci removed the status/awaiting-triage Issue awaiting triage label Sep 18, 2024
@pao214 pao214 closed this as completed in 9feb6e8 Sep 18, 2024
pao214 added a commit that referenced this issue Sep 19, 2024
…:unique to fix macos compiler error

Summary:
Original commit: 9feb6e8 / D38164
An unknown change started causing compilation errors on macos. Fix these compiler errors.

Error 1: deprecated function error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/debug/long_operation_tracker.cc:119:22: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  119 |       if (!operation.unique()) {
      |            ~~~~~~~~~ ^
../../src/yb/util/debug/long_operation_tracker.cc:124:24: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  124 |         if (!operation.unique()) {
      |              ~~~~~~~~~ ^
2 errors generated.

Input files:
  src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
  /Users/tfoucher/code/yugabyte-db3/src/yb/util/debug/long_operation_tracker.cc
Output file (from -o): src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
\-------------------------------------------------------------------------------
```

Error2: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/docdb/docdb_util.cc:46:19: error: unused variable 'kEmptyLogPrefix' [-Werror,-Wunused-const-variable]
   46 | const std::string kEmptyLogPrefix;
      |                   ^~~~~~~~~~~~~~~
1 error generated.

Input files:
  src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
  /Users/pbalivada/code/xcode/src/yb/docdb/docdb_util.cc
Output file (from -o): src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
\-------------------------------------------------------------------------------
```

Error 3: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/metrics-test.cc:64:21: error: unused variable 'kTableId' [-Werror,-Wunused-const-variable]
   64 | static const string kTableId = "table_id";
      |                     ^~~~~~~~
1 error generated.

Input files:
  src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
  /Users/pbalivada/code/xcode/src/yb/util/metrics-test.cc
Output file (from -o): src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
\-------------------------------------------------------------------------------
```

Fixes #24012
Jira: DB-12899

Test Plan:
Jenkins: compile only

Backport-through: 2.20

Reviewers: hsunder

Reviewed By: hsunder

Subscribers: ybase, hsunder

Differential Revision: https://phorge.dev.yugabyte.com/D38181
pao214 added a commit that referenced this issue Sep 19, 2024
…r::unique to fix macos compiler error

Summary:
Original commit: 9feb6e8 / D38164
An unknown change started causing compilation errors on macos. Fix these compiler errors.

Error 1: deprecated function error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/debug/long_operation_tracker.cc:119:22: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  119 |       if (!operation.unique()) {
      |            ~~~~~~~~~ ^
../../src/yb/util/debug/long_operation_tracker.cc:124:24: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  124 |         if (!operation.unique()) {
      |              ~~~~~~~~~ ^
2 errors generated.

Input files:
  src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
  /Users/tfoucher/code/yugabyte-db3/src/yb/util/debug/long_operation_tracker.cc
Output file (from -o): src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
\-------------------------------------------------------------------------------
```

Error2: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/docdb/docdb_util.cc:46:19: error: unused variable 'kEmptyLogPrefix' [-Werror,-Wunused-const-variable]
   46 | const std::string kEmptyLogPrefix;
      |                   ^~~~~~~~~~~~~~~
1 error generated.

Input files:
  src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
  /Users/pbalivada/code/xcode/src/yb/docdb/docdb_util.cc
Output file (from -o): src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
\-------------------------------------------------------------------------------
```

Error 3: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/metrics-test.cc:64:21: error: unused variable 'kTableId' [-Werror,-Wunused-const-variable]
   64 | static const string kTableId = "table_id";
      |                     ^~~~~~~~
1 error generated.

Input files:
  src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
  /Users/pbalivada/code/xcode/src/yb/util/metrics-test.cc
Output file (from -o): src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
\-------------------------------------------------------------------------------
```

Fixes #24012
Jira: DB-12899

Test Plan:
Jenkins: compile only

Backport-through: 2.20

Reviewers: hsunder

Reviewed By: hsunder

Subscribers: hsunder, ybase

Differential Revision: https://phorge.dev.yugabyte.com/D38180
pao214 added a commit that referenced this issue Sep 19, 2024
…r::unique to fix macos compiler error

Summary:
Original commit: 9feb6e8 / D38164
An unknown change started causing compilation errors on macos. Fix these compiler errors.

Error 1: deprecated function error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/debug/long_operation_tracker.cc:119:22: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  119 |       if (!operation.unique()) {
      |            ~~~~~~~~~ ^
../../src/yb/util/debug/long_operation_tracker.cc:124:24: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  124 |         if (!operation.unique()) {
      |              ~~~~~~~~~ ^
2 errors generated.

Input files:
  src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
  /Users/tfoucher/code/yugabyte-db3/src/yb/util/debug/long_operation_tracker.cc
Output file (from -o): src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
\-------------------------------------------------------------------------------
```

Error2: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/docdb/docdb_util.cc:46:19: error: unused variable 'kEmptyLogPrefix' [-Werror,-Wunused-const-variable]
   46 | const std::string kEmptyLogPrefix;
      |                   ^~~~~~~~~~~~~~~
1 error generated.

Input files:
  src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
  /Users/pbalivada/code/xcode/src/yb/docdb/docdb_util.cc
Output file (from -o): src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
\-------------------------------------------------------------------------------
```

Error 3: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/metrics-test.cc:64:21: error: unused variable 'kTableId' [-Werror,-Wunused-const-variable]
   64 | static const string kTableId = "table_id";
      |                     ^~~~~~~~
1 error generated.

Input files:
  src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
  /Users/pbalivada/code/xcode/src/yb/util/metrics-test.cc
Output file (from -o): src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
\-------------------------------------------------------------------------------
```

Fixes #24012
Jira: DB-12899

Test Plan:
Jenkins: compile only

Backport-through: 2.20

Reviewers: hsunder

Reviewed By: hsunder

Subscribers: ybase, hsunder

Differential Revision: https://phorge.dev.yugabyte.com/D38179
foucher added a commit that referenced this issue Sep 20, 2024
Summary:
 6b34652 [doc] Update badge colors (#23985)
 6dcfce6 [PLAT-15297][dr] GET /configs fails with java.lang.IllegalStateException: DrConfig iTest-dr(uuid) does not have any corresponding xCluster config
 7995311 [#23695] docdb: Improve help strings for tablet replica limit flags.
 7659151 [DOC-479] Voyager 1.8.1 updates (#23983)
 56c9cc9 [PLAT-15282]: fix NPE on k8s operator backup/restore status update
 c8776b5 [docs] SSL/TLS configuration with hashicorp vault YSQL plugin (#23979)
 Excluded: d3dd4f7 Bumping version to 2.25.0.0 on branch master
 Excluded: 0dbe7d6 [#23312] YSQL: Fix backup/restore for colocated tables without tablespace information.
 2beb872 [#23786] YSQL: add yb_make_next_ddl_statement_nonincrementing to YbDbAdminVariables
 28d0d8e [#24011] build: fix ./yb_build.sh --gcc13
 9feb6e8 [#24012] YSQL: Replace deprecated function shared_ptr::unique to fix macos compiler error
 2cc1480 [PLAT-15349] Fix update_lb_config automated NLB updates
 af4c46d [#23741] docdb: Add parameter to run PITR tests with clone instead
 0103dfc [PLAT-14459] Continuous backups for s3
 e6bb890 [PLAT-15192] [PLAT-15191] Document node-agent-provision.yaml
 1552321 [PLAT-15205] YBA callhome improvements
 ba6acbd [PLAT-15342] Install Node Agent as root level unit for ynp
 2478a50 [PLAT-13058] Remove references to public key filepath, since we don't need ssh keys for node agent based provisioning
 aa14f76 [#23975] YSQL, ASH: Fix TestYbAsh#testPgAuxInfo
 885b72b [#23960] DocDB: Fix WriteBuffer crash in move ctor
 Excluded: f4a002a [#23314] YSQL: Fix variable name to yb_ for ATPrepSetTableSpace
 29c56ed [PLAT-15369][YBA CLI]Backup list-increments doesn't support pretty/json outputs
 784160c [PLAT-15370][YBA CLI]backup list table output contains base_backup_uuid and backup_uuid
 b32222d [PLAT-15280][PLAT-14753] - Pg parity improvements and other ui fixes
 c6521cf [PLAT-15368][YBA CLI]Backup list print "No more backup present" after printing all the backups in -o pretty/json

- pg_catalog_version-test.cc
   - NonIncrementingDDLMode: YB master commit 2beb872 sets the role to yb_db_admin, which due to new behavior in upstream PG commit b073c3ccd06e4cb845e121387a43faa8c68a7b62 (documented in https://www.postgresql.org/docs/15/ddl-schemas.html#DDL-SCHEMAS-PATTERNS) causes the following unintended test failure: ERROR:  permission denied for schema public. Add a workaround to grant create permission to the role now set.

Test Plan: Jenkins: urgent, rebase: pg15-cherrypicks

Reviewers: jason, jenkins-bot

Differential Revision: https://phorge.dev.yugabyte.com/D38220
foucher pushed a commit that referenced this issue Sep 20, 2024
Summary:
An unknown change started causing compilation errors on macos. Fix these compiler errors.

Error 1: deprecated function error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/debug/long_operation_tracker.cc:119:22: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  119 |       if (!operation.unique()) {
      |            ~~~~~~~~~ ^
../../src/yb/util/debug/long_operation_tracker.cc:124:24: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  124 |         if (!operation.unique()) {
      |              ~~~~~~~~~ ^
2 errors generated.

Input files:
  src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
  /Users/tfoucher/code/yugabyte-db3/src/yb/util/debug/long_operation_tracker.cc
Output file (from -o): src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
\-------------------------------------------------------------------------------
```

Error2: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/docdb/docdb_util.cc:46:19: error: unused variable 'kEmptyLogPrefix' [-Werror,-Wunused-const-variable]
   46 | const std::string kEmptyLogPrefix;
      |                   ^~~~~~~~~~~~~~~
1 error generated.

Input files:
  src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
  /Users/pbalivada/code/xcode/src/yb/docdb/docdb_util.cc
Output file (from -o): src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
\-------------------------------------------------------------------------------
```

Error 3: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/metrics-test.cc:64:21: error: unused variable 'kTableId' [-Werror,-Wunused-const-variable]
   64 | static const string kTableId = "table_id";
      |                     ^~~~~~~~
1 error generated.

Input files:
  src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
  /Users/pbalivada/code/xcode/src/yb/util/metrics-test.cc
Output file (from -o): src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
\-------------------------------------------------------------------------------
```

Fixes #24012
Jira: DB-12899

Original commit 9feb6e8 / D38164

Test Plan:
Jenkins: urgent

On MacOS 14 arm64:
  ./yb_build.sh release --sj

Reviewers: hsunder, jason, fizaa, aagrawal

Reviewed By: jason, aagrawal

Subscribers: ybase

Differential Revision: https://phorge.dev.yugabyte.com/D38187
foucher pushed a commit that referenced this issue Sep 20, 2024
Summary:
An unknown change started causing compilation errors on macos. Fix these compiler errors.

Error 1: deprecated function error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/debug/long_operation_tracker.cc:119:22: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  119 |       if (!operation.unique()) {
      |            ~~~~~~~~~ ^
../../src/yb/util/debug/long_operation_tracker.cc:124:24: error: no member named 'unique' in 'std::shared_ptr<yb::LongOperationTracker::TrackedOperation>'
  124 |         if (!operation.unique()) {
      |              ~~~~~~~~~ ^
2 errors generated.

Input files:
  src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
  /Users/tfoucher/code/yugabyte-db3/src/yb/util/debug/long_operation_tracker.cc
Output file (from -o): src/yb/util/CMakeFiles/yb_util.dir/debug/long_operation_tracker.cc.o
\-------------------------------------------------------------------------------
```

Error2: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/docdb/docdb_util.cc:46:19: error: unused variable 'kEmptyLogPrefix' [-Werror,-Wunused-const-variable]
   46 | const std::string kEmptyLogPrefix;
      |                   ^~~~~~~~~~~~~~~
1 error generated.

Input files:
  src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
  /Users/pbalivada/code/xcode/src/yb/docdb/docdb_util.cc
Output file (from -o): src/yb/docdb/CMakeFiles/yb_docdb.dir/docdb_util.cc.o
\-------------------------------------------------------------------------------
```

Error 3: unused variable error

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../src/yb/util/metrics-test.cc:64:21: error: unused variable 'kTableId' [-Werror,-Wunused-const-variable]
   64 | static const string kTableId = "table_id";
      |                     ^~~~~~~~
1 error generated.

Input files:
  src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
  /Users/pbalivada/code/xcode/src/yb/util/metrics-test.cc
Output file (from -o): src/yb/util/CMakeFiles/metrics-test.dir/metrics-test.cc.o
\-------------------------------------------------------------------------------
```

Fixes #24012
Jira: DB-12899

Original commit 9feb6e8 / D38164

Test Plan:
Jenkins: urgent

On MacOS 14 arm64:
  ./yb_build.sh release --sj

Reviewers: hsunder, jason, fizaa, aagrawal

Reviewed By: jason

Subscribers: ybase

Differential Revision: https://phorge.dev.yugabyte.com/D38189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

2 participants