Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


At 3:11am -0500 Mon, 07 Mar 2011, Francois Tigeot wrote:
Something has been bothering me for a while: ever since I succeeded
in building a LibreOffice binary for DragonFly BSD, I haven't been
able to save OpenDocument format files.

The dialog box just closes itself and reopens half a second later.
No  file is written to disk.

Saving .fods and .fodt files works fine.

How can I know what exactly is going wrong ?

Are you asking about inserting debugging statements? If so, then you may appreciate the OSL_TRACE macro, which has a signature exactly like printf. (And if not, please allow me to hijack this thread to explain what I recently figured out for anyone else who may find this useful.)

OSL_TRACE( "%d: %s = %s\n", __LINE__, "myvar", myvar );

To enable that in a module output (for example sc), build with the debug flags:

$ . LinuxX86-64Env.Set.sh
$ cd sc
$ build  debug=true  dbglevel=2

I haven't yet messed with other dbglevels, but you could start from 1 and see if any other levels better fit your needs. And clearly update the LinuxX... bit to whatever's pertinent for you.

Then, the code-build cycle could be as simple as adding an OSL_TRACE and executing that build command again.

*Note that for debugging like this, after you've run "make dev-install" in the root directory, you don't need to execute it again after building a follow-up. So, a build, code, and debug run on my machine might look like:

$ make clean
$ make  # wait for 2+ hours on my machine
$ make dev-install
$ LODEV_PROG="$(pwd)/install/program/soffice"

$ . LinuxX86-64Env.Set.sh
$ cd sc
$ $LODEV_PROG   # run the program
  # make a code change
$ build debug=true dbglevel=2
$ $LODEV_PROG   # run the program
  # make a code change
$ build debug=true dbglevel=2
$ $LODEV_PROG   # run the program
 # etc ...

Hope this helps,

Kevin

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.