lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Build fails with 'build_type=safestdlib'


From: Greg Chicares
Subject: Re: [lmi] Build fails with 'build_type=safestdlib'
Date: Fri, 20 Apr 2007 01:23:09 +0000
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

On 2007-04-19 18:12Z, Vadim Zeitlin wrote:
> On Thu, 19 Apr 2007 18:02:49 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> It sounds like we have these choices:

[snip things I had hoped to avoid]

>  Yes, and I think those are the only choices we have.

Alas, yes.

> GC> > The correct solution would be to compile both wx and lmi with the same
> GC> > set of flags (to make a safestdlib build for wx too and to link to
> GC> > it).
> GC> 
> GC> Well, it's not incorrect, but it's also not convenient. IIRC,
> GC> you have something like fifteen custom wx builds already.
> 
>  Yes, but LMI only uses one of them. As long as it doesn't use the stock
> build of wx it doesn't matter which extra options are used for it AFAICS.

We'll need two separate builds. Debug mode is too slow for release.
You might find it too slow to work with routinely.

> GC> have only one ourselves, and one is nicer than two. I'd like
> GC> to evaluate other ideas.
>
> [...] just asking for trouble. Even if it does work now [...]

I abbreviated your response to that point because I think I've found a
conclusive argument that affirms your counterpoint and dashes my hopes:

http://gcc.gnu.org/onlinedocs/libstdc++/debug_mode.html
|
| [4] Per-use recompilation
...
| a set of translation units that accesses a particular standard container
| instance may either be compiled in release mode (no checking) or debug
| mode (full checking), but must all be compiled in the same way; a
| translation unit that does not see that standard container instance need
| not be recompiled.

I had remembered (but misunderstood) only the part that says:

| This also means that a translation unit A that contains a particular
| instantiation (say, std::vector<int>) compiled in release mode can be
| linked against a translation unit B that contains the same instantiation
| compiled in debug mode (a feature not present with partial recompilation).

They seem contradictory, but studying both parts carefully now,
I conclude that they're carefully distinguishing an "instance"

  std::list<wxWindow> some_window_list;
  // Instance 'some_window_list' is an object and has an address.

from an "instantiation"

  std::list<wxWindow> A_window_list; // in TU A
  std::list<wxWindow> B_window_list; // in TU B
  // Both TUs instantiate std::list with parameter 'wxWindow'.
  // They're interoperable even if compiled with different flags,
  // but only if they don't access each other's instances.

So gcc with and gcc without the stdlibc++ debug-mode flags
are two different ABI-incompatible compilers, in effect as
incompatible as gcc and comeau. It had seemed to work before,
but that's only one possible effect of undefined behavior.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]