lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Building lmi with pre-wx-2.9.5 snapshot


From: Greg Chicares
Subject: Re: [lmi] Building lmi with pre-wx-2.9.5 snapshot
Date: Fri, 12 Jul 2013 00:37:36 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

On 2013-07-11 22:51Z, Vadim Zeitlin wrote:
> On Thu, 11 Jul 2013 14:06:57 +0000 Greg Chicares <address@hidden> wrote:
[...]
> GC> /opt/lmi/local/include/wx-2.9/wx/cpp.h:170:31: anonymous variadic macros 
> were introduced in C99
> GC> /lmi/src/lmi/workhorse.make:762: recipe for target `file_command_wx.o' 
> failed
> GC> 
> GC> (1) Should I...
> ...
> GC> (1)(b) attempt to disable this somehow in 'configure'? I'm
> GC>   using '--disable-vararg_macros' already, but presumably
> GC>   that's not the same thing;
> 
>  I think it should be the same thing but right now it isn't because our
> code unconditionally enables variadic macros support for g++ 3 and later in
> wx/cpp.h. There seems to have been quite some confusion between
> HAVE_VARIADIC_MACROS (defined by configure) and wxHAS_VARIADIC_MACROS
> (defined by doing explicit compiler version checks). I've hopefully fixed
> it in r74489 (http://trac.wxwidgets.org/changeset/74489) and so this
> problem should be fixed in tomorrow snapshot.
> 
>  However the real problem is that this variadic macro using code was added
> by us when implementing the scaffolding necessary for non-interactive
> testing of the GUI programs using modal dialogs (i.e. practically all of
> them). So even if it does build, the version of wxWidgets built with these
> options won't be usable for LMI unit testing. Of course, this is not a
> problem right now as the unit tests using this code don't exist yet, but
> still something to be aware of.

Soon, therefore, lmi will specifically need these macros.

> GC> (1)(c) use '-Wno-variadic-macros' to suppress the warning
> GC>   (which is treated as an error because of '-Werror'), and
> GC>   hope^H^H^H^Htest that the compiled code just works?
> 
>  I am pretty sure that it will indeed work

[See my 2013-07-11T23:26Z message for a feasible workaround.]

> because this code is only used
> for testing, i.e. it's not used inside wxWidgets itself and currently not
> used in LMI neither (but, again, this risks changing).

It'll need to change, for automated GUI unit testing.

Can you suggest a simple non-GUI test I could run now to prove
that variadic macros actually work the way you expect with
gcc-3.4.5? I grepped for 'vari' in the 'configure' output, but
didn't find a feature test there.

>  And even though this shouldn't be necessary with the next daily snapshot
> of wxWidgets, you might still want to enable this option to allow variadic
> macros and hence include support for the modal dialogs tests.

Indeed. So it's good that we found a way to leave the feature
enabled but inhibit the warnings.

> Unless, of
> course, you are going to update to a more recent compiler version before
> these tests are written, which IMHO would be a wise thing to do anyhow as
> g++ 3.4 is really old by now and recent g++ versions seem to work well,
> i.e. not suffer from catastrophic out of memory errors when building
> wxWidgets unlike before.

That would be desirable, but might require a lot of effort.
The mingw.org builds of gcc-4.x still use dwarf2 exceptions,
which makes them useless for our purposes. There are other
builds, but the likelihood that they'd introduce a new set
of problems must give us pause...

  And makes us rather bear those ills we have,
  Than fly to others that we know not of.

> GC> (2) Unrelated question: when building wx itself, using
> GC>   ../configure [...options...] && make && make install
> GC> can I add my own CXXFLAGS in configure's options-list?
> 
>  I'm afraid there is no way to do it now. Our configure overrides CXXFLAGS
> with its own values, which is wrong, but too difficult to change by now.
> The usual trick I use to work around this is to pass "CXX" (and "CC", if
> relevant) values to make on its command line, e.g. I'd do
> 
>       make CXX="g++ --param ..."
> 
> to achieve what you'd like to. This is not as convenient as using configure
> but in practice works without any problems.

Okay, I'm glad I asked--let me try that.

> GC> In particular, I want to build wx with
> GC>   --param ggc-min-expand=25 --param ggc-min-heapsize=32768
> GC> so that I can use sixteen cores on a 32-bit OS.
> 
>  I don't know what are the optimal values for these options but on my
> machine g++ 3.4.5 auto-detects them as
> 
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

I tuned those parameters manually, documenting them as follows:

# As this is written in 2012, lmi is often built on machines with less
# RAM per core than gcc wants. Experiments show that these flags cut
# gcc's RAM appetite by fifty percent, in return for a ten-percent
# speed penalty that can be overcome by increasing parallelism.

This lets me use all sixteen cores without downgrading to a
more recent version of msw.




reply via email to

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