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

Building Speedb fails with Clang 14 #57

Closed
isaac-io opened this issue Jul 14, 2022 · 1 comment · Fixed by #58
Closed

Building Speedb fails with Clang 14 #57

isaac-io opened this issue Jul 14, 2022 · 1 comment · Fixed by #58
Assignees
Labels
bug Something isn't working

Comments

@isaac-io
Copy link
Contributor

isaac-io commented Jul 14, 2022

Building Speedb on my machine using Clang 14 fails with the following errors:

/home/isaac/projects/speedb-io/options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
/home/isaac/projects/speedb-io/db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^

To Reproduce

mkdir build
CC=clang CXX=clang++ cmake .. -GNinja
ninja

Expected behavior

The build completes successfully.

Environment (please complete the following information):

  • OS (e.g. output of uname -omsr and distribution name and version): Arch Linux with Linux 5.18.10-arch1-1 x86_64 GNU/Linux
  • Compiler (e.g. output of gcc --version):
clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
@isaac-io isaac-io added the bug Something isn't working label Jul 14, 2022
@isaac-io isaac-io self-assigned this Jul 14, 2022
isaac-io added a commit that referenced this issue Jul 14, 2022
Clang 14 fails to compile with the following error:

```
options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^
```

Fix it by adding an explicit copy constructor.
@isaac-io isaac-io linked a pull request Jul 14, 2022 that will close this issue
isaac-io added a commit that referenced this issue Jul 14, 2022
Clang 14 fails to compile with the following error:

```
options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^
```

This is caused by the introduction of an assignment operator in #7 due to
a diagnostic emitted by Clang 13 which isn't emitted by Clang 14, so this
was probably a compiler bug, and we just need to remove the assignment
operator.
@isaac-io
Copy link
Contributor Author

Turns out this was caused by a change that I introduced in #7. Simply reverting it fixes the problem.

isaac-io added a commit that referenced this issue Jul 18, 2022
Clang 14 fails to compile with the following error:

```
options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^
```

This is caused by the introduction of an assignment operator in #7 due to
a diagnostic emitted by Clang 13 which isn't emitted by Clang 14, so this
was probably a compiler bug, and we just need to remove the assignment
operator.
isaac-io added a commit that referenced this issue Oct 19, 2022
Clang 14 fails to compile with the following error:

```
options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^
```

This is caused by the introduction of an assignment operator in #7 due to
a diagnostic emitted by Clang 13 which isn't emitted by Clang 14, so this
was probably a compiler bug, and we just need to remove the assignment
operator.
Yuval-Ariel pushed a commit that referenced this issue Nov 23, 2022
Clang 14 fails to compile with the following error:

```
options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^
```

This is caused by the introduction of an assignment operator in #7 due to
a diagnostic emitted by Clang 13 which isn't emitted by Clang 14, so this
was probably a compiler bug, and we just need to remove the assignment
operator.
Yuval-Ariel pushed a commit that referenced this issue Nov 25, 2022
Clang 14 fails to compile with the following error:

```
options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^
```

This is caused by the introduction of an assignment operator in #7 due to
a diagnostic emitted by Clang 13 which isn't emitted by Clang 14, so this
was probably a compiler bug, and we just need to remove the assignment
operator.
Yuval-Ariel pushed a commit that referenced this issue Apr 30, 2023
Clang 14 fails to compile with the following error:

```
options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^
```

This is caused by the introduction of an assignment operator in #7 due to
a diagnostic emitted by Clang 13 which isn't emitted by Clang 14, so this
was probably a compiler bug, and we just need to remove the assignment
operator.
udi-speedb pushed a commit that referenced this issue Oct 31, 2023
Clang 14 fails to compile with the following error:

```
options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^
```

This is caused by the introduction of an assignment operator in #7 due to
a diagnostic emitted by Clang 13 which isn't emitted by Clang 14, so this
was probably a compiler bug, and we just need to remove the assignment
operator.
udi-speedb pushed a commit that referenced this issue Dec 1, 2023
Clang 14 fails to compile with the following error:

```
options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  MutableDBOptions& operator=(const MutableDBOptions&) = default;
                    ^
db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here
      mutable_db_options_copy_(mutable_db_options),
      ^
```

This is caused by the introduction of an assignment operator in #7 due to
a diagnostic emitted by Clang 13 which isn't emitted by Clang 14, so this
was probably a compiler bug, and we just need to remove the assignment
operator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant