With autotools I use --enable-debug=full.
How is this done with cmake ?
I built with -DCMAKE_BUILD_TYPE=Debug but there is no difference in the final package sizes.
Is there anything in the build log that lets me know how I built a package?
Darrell
On Sunday 27 November 2011 04:40:44 Darrell Anderson wrote:
With autotools I use --enable-debug=full.
How is this done with cmake ?
I built with -DCMAKE_BUILD_TYPE=Debug but there is no difference in the final package sizes.
Is there anything in the build log that lets me know how I built a package?
Try -DCMAKE_CXX_FLAGS="-g"
Darrell
With autotools I use --enable-debug=full.
How is this done with cmake ?
I built with -DCMAKE_BUILD_TYPE=Debug but there is no
difference in the
final package sizes.
Is there anything in the build log that lets me know
how I built a package?
Try -DCMAKE_CXX_FLAGS="-g"
I added that flag. Yet the package sizes are the same.
1. How do I know whether or not a package is built with debug support?
2. Does the build log provide a clue?
3. Should the package size be larger?
4. Is there a simple test after installing the package to test for debugging support?
Please be verbose. :)
Darrell
On Sunday 27 November 2011 19:48:03 Darrell Anderson wrote:
With autotools I use --enable-debug=full.
How is this done with cmake ?
I built with -DCMAKE_BUILD_TYPE=Debug but there is no
difference in the
final package sizes.
Is there anything in the build log that lets me know
how I built a package?
Try -DCMAKE_CXX_FLAGS="-g"
I added that flag. Yet the package sizes are the same.
- How do I know whether or not a package is built with debug support?
Run make VERBOSE=1 and check if -g parameter is passed to compiler.
- Does the build log provide a clue?
See previous answer.
- Should the package size be larger?
Yes, much larger. But ensure that binaries are not stripped at install stage (you should not see "-s" parameter passed to linker). Use "file" to check if the binary is stripped or no.
- Is there a simple test after installing the package to test for
debugging support?
Dunno.
Please be verbose. :)
Darrell
With autotools I use --enable-debug=full.
How is this done with cmake ?
I built with -DCMAKE_BUILD_TYPE=Debug but
there is no
difference in the
final package sizes.
Is there anything in the build log that lets
me know
how I built a package?
Try -DCMAKE_CXX_FLAGS="-g"
I added that flag. Yet the package sizes are the
same.
- How do I know whether or not a package is built
with debug support?
Run make VERBOSE=1 and check if -g parameter is passed to compiler.
- Does the build log provide a clue?
See previous answer.
- Should the package size be larger?
Yes, much larger. But ensure that binaries are not stripped at install stage (you should not see "-s" parameter passed to linker). Use "file" to check if the binary is stripped or no.
- Is there a simple test after installing the package
to test for
debugging support?
Dunno.
In all of my build scripts is this:
make VERBOSE=1
I rebuilt kdelibs using this:
-DCMAKE_CXX_FLAGS:STRING="$CPUOPT $DEBUG_CMAKE"
where $DEBUG_CMAKE = -g
When I check the build log I see this many times:
/usr/bin/c++ -fPIC -O2 -march=i486 -mtune=i686 -g
When I run 'gdb attach [PID]' I see many "(no debugging symbols found)" messages. For example:
Reading symbols from /opt/trinity/lib/libkparts.so.2...(no debugging symbols found)...done. Loaded symbols for /opt/trinity/lib/libkparts.so.2 Reading symbols from /opt/trinity/lib/libkio.so.4...(no debugging symbols found)...done. Loaded symbols for /opt/trinity/lib/libkio.so.4 Reading symbols from /opt/trinity/lib/libkdeui.so.4...(no debugging symbols found)...done. Loaded symbols for /opt/trinity/lib/libkdeui.so.4
As I mentioned the package sizes are the same and built times are basically the same. Everything indicates I am not building with debug support.
What else do I need to do?
Darrell
On Sunday 27 November 2011 20:17:04 Darrell Anderson wrote: [...]
As I mentioned the package sizes are the same and built times are basically the same. Everything indicates I am not building with debug support.
What else do I need to do?
Run "file" against a library to check if is stripped. If is stripped, you should check linker flags.
Darrell
As I mentioned the package sizes are the same and
built times are basically
the same. Everything indicates I am not building with
debug support.
What else do I need to do?
Run "file" against a library to check if is stripped. If is stripped, you should check linker flags.
OK, I think I understand better now. I think I have everything working.
Packages sizes are much bigger and gdb produces something.
Thank you!
Darrell