-
Notifications
You must be signed in to change notification settings - Fork 72
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
Including instrumented_mutex.h leads to compilation errors #279
Comments
happened while trying to include in write_controller.h as well.
|
This is not a fix. It shouldn't happen and should be fixed in RocksDB / SpeeDB |
thats why we have this ticket...... |
in rocksdb v7.7.8, also adding in write_buffer_manager.h |
@Yuval-Ariel @udi-speedb Does it make any difference what you are compiling with? I mean Makefile vs cmake? |
i havent tried with cmake |
@AmnonHanuhov - I forgot to answer. I apologize. |
@udi-speedb Yes |
The circular dependency is as follows: in @Yuval-Ariel 's case when he tries to include |
In that case, it seems that forward declaring WriteBufferManager in options.h instead of including write_buffer_manager.h, and including write_buffer_manager.h in options.cc should do the trick (assuming it does solve it) |
Including |
A source file should include any header it needs. Therefore, if db_options.cc needs to use WriteBufferManager, then it should include its header, as it should any other header it relies on for its operation |
Fixes #279 There is a circular dependency between options.h and write_buffer_manager.h. In order to fix that, I forward declare the WriteBufferManager class in options.h and include it in options.cc and in other .cc files which use WriteBufferManager.
There is a circular dependency between options.h and write_buffer_manager.h. In order to fix that, I forward declare the WriteBufferManager class in options.h and include it in options.cc and in other .cc files which use WriteBufferManager.
There is a circular dependency between options.h and write_buffer_manager.h. In order to fix that, I forward declare the WriteBufferManager class in options.h and include it in options.cc and in other .cc files which use WriteBufferManager.
There is a circular dependency between options.h and write_buffer_manager.h. In order to fix that, I forward declare the WriteBufferManager class in options.h and include it in options.cc and in other .cc files which use WriteBufferManager.
There is a circular dependency between options.h and write_buffer_manager.h. In order to fix that, I forward declare the WriteBufferManager class in options.h and include it in options.cc and in other .cc files which use WriteBufferManager.
There is a circular dependency between options.h and write_buffer_manager.h. In order to fix that, I forward declare the WriteBufferManager class in options.h and include it in options.cc and in other .cc files which use WriteBufferManager.
There is a circular dependency between options.h and write_buffer_manager.h. In order to fix that, I forward declare the WriteBufferManager class in options.h and include it in options.cc and in other .cc files which use WriteBufferManager.
There is a circular dependency between options.h and write_buffer_manager.h. In order to fix that, I forward declare the WriteBufferManager class in options.h and include it in options.cc and in other .cc files which use WriteBufferManager.
When adding an include of instrumented_mutex.h in write_buffer_manager.h compilation fails:
When adding the same to the write_buffer_manager.cpp compilation passes. This will probably happen with other header files, I just stumbled on this while modifying write_buffer_manager.h.
This implies some issue somewhere in the include chain:
As a workaround/patch, I managed to resolve the compilation issue of write_buffer_manager file by forward declaring WriteBufferManager:
However, that causes failure of multiple other files including write_buffer_manager.h
The text was updated successfully, but these errors were encountered: