-
-
Notifications
You must be signed in to change notification settings - Fork 852
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
Compile failure when DEBUG
is defined
#3670
Comments
Why do you want to define this macro? It doesn't sound like something standard. |
@gzotti please check this report |
Only on weekends, sorry. If I understand correctly, we should be able to just rename this to something like SHADER_DEBUG or S3D_DEBUG, if these symbols don't exist. But carefully, in all affected places. |
This symbol is already inside the context of The C++ standard defines |
OK, even better. I honestly admit I don't know anything about "MacPorts", "cmake portgroup" or why they need to set this popular flag DEBUG and not something like _MP_DEBUG for their own purposes. |
MacPorts is a package manager for installing software on macOS; think like Homebrew or |
While I have a solution for the Scenery3D plugin (not yet committed), a DEBUG is also used in StelFileMgr line 134. @alex-w , CMakeLists.txt sets INSTALL_DATADIR_FOR_DEBUG for a Debug build. Does it also set DEBUG somewhere? |
Trying to "solve" this on our side just lets other tools proliferate bad practice. The |
See the other description from "Macports". Yes, they should probably also fix it for themselves. Just that it is simple to do so for us. The "DEBUG" in StelFileMgr is the only case used, but I don't see where it is set. So I ask @alex-w, this may be some CI workflow I am unaware of, or may have some other reason buried in the mist of undocumented legacy code. DEBUG can be used on demand, to test something small. (Yes, almost any other symbol as well.) It may also be some leftover. |
I don’t remember details, but probably @10110111 right and DEBUG part in StelFileMgr should be reverted or removed |
So then this commit can best be reverted so this code is active in Debug builds only, right? Without any extras. |
DEBUG -> NDEBUG should be enough IMHO |
Hello @cooljeanius! Please check the fresh version (development snapshot) of Stellarium: |
Hello @cooljeanius! Please check the latest stable version of Stellarium: |
In MacPorts, the cmake portgroup adds
-DDEBUG
to its compilation flags when using its default+debug
variant:https://github.com/macports/macports-ports/blob/36ac56e6aa4afeb15cc65b5333f02b3f7bbe22e3/_resources/port1.0/group/cmake-1.1.tcl#L496-L501
This breaks compilation in Stellarium's
plugins/Scenery3d/src/ShaderManager.hpp
, which expects to be able to useDEBUG
as the name of an enumerator:stellarium/plugins/Scenery3d/src/ShaderManager.hpp
Lines 183 to 184 in a9aaa69
Suggest renaming the enumerator to something else.
Expected Behaviour
Stellarium compiles successfully
Actual Behaviour
Compilation fails with the following error:
Steps to reproduce
sudo port -udc install stellarium +RemoteControl+debug+python39
System
Logfile
See downstream bug report with MacPorts here: https://trac.macports.org/ticket/63575 (in which @ryandesign encouraged me to file this upstream bug report)
The text was updated successfully, but these errors were encountered: