[cctbxbb] problem in "space_group_type"

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed Apr 16 06:23:10 PDT 2008

Hi Koen,

> The error only occurs when running in Debug mode. In Release mode, 
> everything works fine, suggesting a memory initialization problem.

This is a known feature of Windows: libraries compiled in release
and debug mode are not binary compatible.

Under Linux I check with valgrind all the time, therefore it is almost
certain that the Windows debug/release mix is the only problem.

> I'm unable to debug the problem myself or get more details, as I can't 
> get the library to compile with debugging information in it (Is there an 
> easy way to do this with the Scons build system? I haven't used Scons 
> before.)

The *one* script to change is


Currently, in the

if (sys.platform == "win32"):
  if (env_etc.compiler == "win32_cl"):

branch you'll find:

    if (libtbx.env.build_options.debug_symbols):
      raise RuntimeError("Debug build not supported.")

This is the place to start.
On Unix platforms it simply works like this:

    if (libtbx.env.build_options.debug_symbols):
      opts.insert(0, "-g")

I forgot the details of why it is more complicated under Windows.
I vaguely recall that there were issues linking with the correct
runtime libraries, in particular linking with the correct Python

Idea: replace the RuntimeError above with opts.insert(0, "???")
and initialize a new build directory with

  libtbx\configure.py --build-boost-python-extensions=False --build=debug

Since you are not building Python extensions, the Python runtime library
problem goes away.


More information about the cctbxbb mailing list