-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The Visibility bug from issue 242's back #372
Comments
Hm, I looked at that but the fix from back then was only to make the warning as error go away on Linux. Can you give a bit more info on what platform you are on, and which compiler version you are using? We have builds that work on Ubuntu 22 and Ubuntu 24, but other platforms might differ. I recall this was about the gcc version, what are you seeing? |
My gcc version is 14.2, on Ubuntu 24.10. |
These warnings come from pybind11, this is a currently open question in pybind11 about this topic: The suggested solution is to set a global compiler parameter |
Fixed with release 2.5.0 |
Hi,
While compiling, cmake throws a cog with these messages :
[ 70%] Building CXX object adaptations/CMakeFiles/knobkraft-generic-adaptation.dir/CreateNewAdaptationDialog.cpp.o In file included from /home/philippe/git/KnobKraft-orm/adaptations/CreateNewAdaptationDialog.cpp:9: /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:50:65: warning: ‘visibility’ attribute ignored [-Wattributes] 50 | #define DEFAULT_VISIBILITY __attribute__((visibility("default"))) | ^ /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:189:52: note: in expansion of macro ‘DEFAULT_VISIBILITY’ 189 | pybind11::module adaptation_module DEFAULT_VISIBILITY; | ^~~~~~~~~~~~~~~~~~ /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:56:15: warning: ‘knobkraft::GenericAdaptation’ declared with greater visibility than the type of its field ‘knobkraft::GenericAdaptation::adaptation_module’ [-Wattributes] 56 | class GenericAdaptation : public midikraft::Synth, public midikraft::SimpleDiscoverableDevice, | ^~~~~~~~~~~~~~~~~ [ 70%] Building CXX object adaptations/CMakeFiles/knobkraft-generic-adaptation.dir/GenericAdaptation.cpp.o In file included from /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.cpp:7: /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:50:65: warning: ‘visibility’ attribute ignored [-Wattributes] 50 | #define DEFAULT_VISIBILITY __attribute__((visibility("default"))) | ^ /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:189:52: note: in expansion of macro ‘DEFAULT_VISIBILITY’ 189 | pybind11::module adaptation_module DEFAULT_VISIBILITY; | ^~~~~~~~~~~~~~~~~~ /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:56:15: warning: ‘knobkraft::GenericAdaptation’ declared with greater visibility than the type of its field ‘knobkraft::GenericAdaptation::adaptation_module’ [-Wattributes] 56 | class GenericAdaptation : public midikraft::Synth, public midikraft::SimpleDiscoverableDevice, | ^~~~~~~~~~~~~~~~~ /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:50:65: warning: ‘visibility’ attribute ignored [-Wattributes] 50 | #define DEFAULT_VISIBILITY __attribute__((visibility("default"))) | ^ /home/philippe/git/KnobKraft-orm/adaptations/PythonUtils.h:32:34: note: in expansion of macro ‘DEFAULT_VISIBILITY’ 32 | pybind11::object _stdout DEFAULT_VISIBILITY; | ^~~~~~~~~~~~~~~~~~ /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:50:65: warning: ‘visibility’ attribute ignored [-Wattributes] 50 | #define DEFAULT_VISIBILITY __attribute__((visibility("default"))) | ^ /home/philippe/git/KnobKraft-orm/adaptations/PythonUtils.h:33:34: note: in expansion of macro ‘DEFAULT_VISIBILITY’ 33 | pybind11::object _stderr DEFAULT_VISIBILITY; | ^~~~~~~~~~~~~~~~~~ /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:50:65: warning: ‘visibility’ attribute ignored [-Wattributes] 50 | #define DEFAULT_VISIBILITY __attribute__((visibility("default"))) | ^ /home/philippe/git/KnobKraft-orm/adaptations/PythonUtils.h:34:41: note: in expansion of macro ‘DEFAULT_VISIBILITY’ 34 | pybind11::object _stdout_buffer DEFAULT_VISIBILITY; | ^~~~~~~~~~~~~~~~~~ /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.h:50:65: warning: ‘visibility’ attribute ignored [-Wattributes] 50 | #define DEFAULT_VISIBILITY __attribute__((visibility("default"))) | ^ /home/philippe/git/KnobKraft-orm/adaptations/PythonUtils.h:35:41: note: in expansion of macro ‘DEFAULT_VISIBILITY’ 35 | pybind11::object _stderr_buffer DEFAULT_VISIBILITY; | ^~~~~~~~~~~~~~~~~~ In file included from /home/philippe/git/KnobKraft-orm/adaptations/GenericAdaptation.cpp:13: /home/philippe/git/KnobKraft-orm/adaptations/PythonUtils.h:20:7: warning: ‘PyStdErrOutStreamRedirect’ declared with greater visibility than the type of its field ‘PyStdErrOutStreamRedirect::_stdout’ [-Wattributes] 20 | class PyStdErrOutStreamRedirect { | ^~~~~~~~~~~~~~~~~~~~~~~~~
I searched the issues and saw it had been solved with issue 242.
Seems it's back, unfortunately.
Any ideas on how to kill it for good ?
TIA
Philippe
The text was updated successfully, but these errors were encountered: