Summary: | games/wxlauncher: fails to build with WX3=on JOYSTICK=off | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Jan Beich <jbeich> | ||||||||||
Component: | Individual Port(s) | Assignee: | Jan Beich <jbeich> | ||||||||||
Status: | Closed FIXED | ||||||||||||
Severity: | Affects Only Me | CC: | lightside | ||||||||||
Priority: | --- | Flags: | lightside:
maintainer-feedback+
|
||||||||||
Version: | Latest | ||||||||||||
Hardware: | Any | ||||||||||||
OS: | Any | ||||||||||||
Attachments: |
|
Description
Jan Beich
2015-05-04 09:06:52 UTC
wxLogDebug() is no longer a nop in non-debug build according to c++ -E output: // wxgtk-2.8 bool JoyMan::Initialize() { if ( JoyMan::IsInitialized() ) { wxLogNop(); return true; } ... // wxgtk-3.0 JoyMan::Initialize() { if ( JoyMan::IsInitialized() ) { for ( bool wxlogcheck68 = false; !wxlogcheck68 && wxLog::IsLevelEnabled(wxLOG_Debug, wxLOG_COMPONENT); wxlogcheck68 = true ) wxLogger(wxLOG_Debug, "/wrkdirs/usr/ports/games/wxlauncher/work/wxLauncher-wxlauncher-7ee46df/code/apis/JoystickManager.cpp", 68, __FUNCTION__, wxLOG_COMPONENT).Log(L"JoyMan already initialized with %d joysticks", joysticks.Count()); return true; } ... Created attachment 156329 [details] v0 Maybe disable debug logging after https://github.com/wxWidgets/wxWidgets/commit/7d9550df507d5522ac76887e5876b314b729ed50 Created attachment 156348 [details] Proposed patch (since 385396 revision) (In reply to comment #2) > Maybe disable debug logging I think, that the check of USE_JOYSTICK define will be enough, in this case. The proposed patch attached. Created attachment 156353 [details] Proposed patch (since 385396 revision) I found discussion of related issue: https://github.com/wxLauncher/wxlauncher/issues/117 The topic starter suggested to use "-DNDEBUG" compiler flag. This disables debugging info (e.g. inside of wxlauncher.log). The new proposed patch attached. The consequence is: now the program shows splash screen on startup. Comment on attachment 156353 [details] Proposed patch (since 385396 revision) >diff -ruN wxlauncher.orig/Makefile wxlauncher/Makefile >--- wxlauncher.orig/Makefile 2015-05-04 15:18:03.000000000 +0400 >+++ wxlauncher/Makefile 2015-05-05 01:08:32.000000000 +0400 >@@ -43,6 +43,10 @@ > WX3_USE= WX=3.0+ > WX3_USE_OFF= WX=2.8 > >+.if !defined(WITH_DEBUG) >+CXXFLAGS= -DNDEBUG CFLAGS would be more correct but wxlauncher doesn't have any *.c files. Also, convert to a proper option instead of relying on current (fragile) implementation. >+.endif >+ > .include <bsd.port.options.mk> A commit references this bug: Author: jbeich Date: Tue May 5 00:09:52 UTC 2015 New revision: 385433 URL: https://svnweb.freebsd.org/changeset/ports/385433 Log: games/wxlauncher: unbreak build when WX3=on JOYSTICK=off wxgtk30 enables debug logging by default. This led to breakage because the calls within wxLogDebug() are no longer eliminated. PR: 199919 Submitted by: lightside <lightside@gmx.com> (maintainer) Changes: head/games/wxlauncher/files/ head/games/wxlauncher/files/patch-code_apis_JoystickManager.cpp Thanks. Committed earlier version. Waiting for feedback about WITH_DEBUG. Created attachment 156359 [details] Additional proposed patch (since 385435 revision) (In reply to comment #5) > CFLAGS would be more correct but wxlauncher doesn't have any *.c files. > > Also, convert to a proper option instead of relying on current (fragile) implementation. The DEBUG_CFLAGS_OFF works, but more correct DEBUG_CPPFLAGS_OFF doesn't (for some reason). It may be DEBUG_CXXFLAGS_OFF also. (In reply to comment #7) > Thanks. Committed earlier version. Waiting for feedback about WITH_DEBUG. Thank you too. Well, the earlier version is ok (at least the port is buildable now). Even with debugging info, it just logs it to ~/wxlauncher/wxLauncher.log file (e.g. no obtrusive windows with errors). The splash screen, which was enabled by NDEBUG define, is interesting, but I didn't find an option to disable it. The mentioned 117 issue on GitHub wxlauncher site is still open. On the other hand, the wxWidgets documentation about debugging contains information about using NDEBUG define on release builds (but also possible to use wxDEBUG_LEVEL=0, as you mentioned): http://docs.wxwidgets.org/3.0.2/overview_debugging.html I attached the new proposed patch, but now it will require to bump PORTREVISION. A commit references this bug: Author: jbeich Date: Tue May 5 04:07:02 UTC 2015 New revision: 385443 URL: https://svnweb.freebsd.org/changeset/ports/385443 Log: games/wxlauncher: add DEBUG option and put verbose logging behind it DEBUG=off (default) now shows splash screen on startup due to being on the same #if NDEBUG bandwagon used to turn off verbose logging. GitHub: wxLauncher/wxlauncher#117 PR: 199919 Submitted by: lightside <lightside@gmx.com> (maintainer) Changes: head/games/wxlauncher/Makefile Done, with upstream ping via commit. |