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: Vadim Zeitlin
Subject: Re: [lmi] Building lmi with pre-wx-2.9.5 snapshot
Date: Fri, 12 Jul 2013 00:51:04 +0200

On Thu, 11 Jul 2013 14:06:57 +0000 Greg Chicares <address@hidden> wrote:

GC> I'm trying to build lmi with today's wx snapshot:
GC>   ftp://ftp.wxwidgets.org/pub/Daily_HEAD/files/wxWidgets-2013-07-11.tar.gz
GC> It fails on several files, as follows [command line wrapped manually]:
GC> 
GC> /MinGW_/bin/g++  -MMD -MP -MT file_command_wx.o -MF file_command_wx.d
GC>   -c -I /lmi/src/lmi -I /lmi/src/lmi/tools/pete-2.1.1
GC>   -I /opt/lmi/local/lib/wx/include/i686-pc-mingw32-msw-unicode-2.9
GC>   -I /opt/lmi/local/include/wx-2.9 -I /opt/lmi/third_party/include
GC>   -I /opt/lmi/third_party/src -I /opt/lmi/local/include
GC>   -I /opt/lmi/local/include/libxml2
GC>   -DLMI_WX_NEW_USE_SO    -DLIBXML_USE_DLL  -DSTRICT       
-D_LARGEFILE_SOURCE=unknown
GC>   -DWXUSINGDLL -D__WXMSW__  -DBOOST_STRICT_CONFIG
GC>   -std=gnu++98 -posix  -pedantic-errors -Werror  -Wall  -Wcast-align  
-Wconversion
GC>   -Wdeprecated-declarations  -Wdisabled-optimization  -Wimport  -Wmultichar 
 -Wpacked
GC>   -Wpointer-arith  -Wsign-compare  -Wundef  -Wwrite-strings   -Wno-long-long
GC>   -Wctor-dtor-privacy  -Wdeprecated  -Wnon-template-friend  
-Woverloaded-virtual
GC>   -Wpmf-conversions  -Wsynth      -Wno-uninitialized
GC>   --param ggc-min-expand=25 --param ggc-min-heapsize=32768
GC>   -ggdb -O2     /lmi/src/lmi/file_command_wx.cpp -ofile_command_wx.o
GC> 
GC> In file included from /opt/lmi/local/include/wx-2.9/wx/version.h:17,
GC>                  from /opt/lmi/local/include/wx-2.9/wx/defs.h:194,
GC>                  from /opt/lmi/local/include/wx-2.9/wx/mimetype.h:20,
GC>                  from /lmi/src/lmi/file_command_wx.cpp:37:
GC> /opt/lmi/local/include/wx-2.9/wx/cpp.h:153:30: anonymous variadic macros 
were introduced in C99
GC> /opt/lmi/local/include/wx-2.9/wx/cpp.h:155:66: anonymous variadic macros 
were introduced in C99
GC> [...]
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;

 Hello,

 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.

GC> and my reading of 'wx/cpp.h'
GC>   suggests that any attempted use of wxCALL_FOR_EACH would
GC>   just produce an error if I were somehow able to turn off
GC>   wxHAS_VARIADIC_MACROS anyway.

 This is correct, we decided to require variadic macros support for the
modal dialogs testing code because the only compiler that actually doesn't
support them (as opposed to disabling support for them if explicitly
requested as you do) is 15 year old VC6 and it shouldn't be a problem if it
can't be used to compile the testing code. Of course, we took this decision
only because implementing this functionality without variadic macros would
have been really difficult and maybe even impossible, so changing it
wouldn't be simple.

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 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).

 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. 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.



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.

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

 Regards,
VZ

reply via email to

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