Hi all,
Please forgive the somewhat newbie question (although I've been doing
compiles since SysV days in the early 80s), but I cannot for the life of me
get the debug trace log mode to compile in correctly using the latest
Debian Stretch installation on a Raspberry Pi. Hopefully someone can point
out what I'm doing wrong. I'm having some CAT problems and wanted to get
debug traces.
I first installed the prerequisites with "apt-get install" following this
page:
https://www.kk5jy.net/wsjtx-build/
I downloaded v2.0.1 and executed:
tar -zxvf wsjtx-2.0.1.tgz
mkdir build
cd build
I then executed "cmake-gui" and set the following switches on:
WSJT_TRACE_CAT=ON
WSJT_HAMLIB_TRACE=ON
WSJT_HAMLIB_VERBOSE_TRACE=ON
WSJT_QDEBUG_TO_FILE=ON
WSJT_QDEBUG_IN_RELEASE=ON
That generated the "CMakeCache.txt" file attached below, except that I
further edited it after "cmake-gui" to set the build to
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
After that, I made the application as usual:
make
sudo make install
It made a new executable in /usr/local/bin as expected, but when I ran
it, there is no sign of the "..trace.log" file in /tmp. Furthermore,
examining the binary shows I think that the needed debugging flags were
never set on compile based on the following:
cd /usr/local/bin
strings wsjtx | grep trace.log (returns no output)
I expected the above command to return a match since if
WSJT_QDEBUG_TO_FILE were really on at compile time, the following code from
"main.cpp" ought to have been included:
#if WSJT_QDEBUG_TO_FILE
// Open a trace file
TraceFile trace_file {temp_dir.absoluteFilePath (a.applicationName ()
+ "_trace.log")};
qSetMessagePattern ("[%{time MMdd HH:mm:ss.zzz t}
%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}]
%{file}:%{line} - %{message}");
qDebug () << program_title (revision ()) + " - Program startup";
#endif
The first statement after the "#if" means I should have been able to find
"trace.log" in a string within the compiled program somewhere. But I
didn't.
Any suggestions? Where did I mess up? I've spent a long time on this
one and I'm pretty stumped. By the way, I also tried a "Debug" build type
and that didn't work either.
73
Phil W1PJE
# This is the CMakeCache file.
# For build in directory: /home/pi/src/wsjtx/build_debug
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
# EXTERNAL cache entries
//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=-O2 -march=native -mtune=native
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release builds for minimum
// size.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during release builds with debug info.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//C compiler
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=-O2 -march=native -mtune=native
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release builds for minimum
// size.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during release builds with debug info.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
//Install path prefix, prepended onto install