lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Special build types, e.g. gcov


From: Vadim Zeitlin
Subject: Re: [lmi] Special build types, e.g. gcov
Date: Wed, 29 Oct 2014 23:56:16 +0100

On Wed, 29 Oct 2014 18:19:04 +0000 Greg Chicares <address@hidden> wrote:

GC> The lmi makefiles provide various special-purpose build types:
GC>   grep build_type make
GC> including one for gprof, so gcov should be easy to add. My first
GC> thought would be to add it in parallel with (and distinct from)
GC> gprof; is that the usual practice, or do most people use a single
GC> build for both gprof and gcov, combining all their flags together?

 To be honest, I don't use gcov that much, so I don't know how people use
it usually. But I think it's more logical to keep separate gcov and gprof
builds and maybe add gcov_and_prof one later if needed. I'm going to do
this soon if you have no objections.


GC> BTW, I hadn't exercised lmi's 'so_test' build type since adding
GC> the GUI tests, so this seemed like a good time to try it:
GC> 
GC>   make --jobs=16 all build_type=so_test USE_SO_ATTRIBUTES=1  >../log 2>&1
GC> /MinGW_/bin/g++  -o wx_test.exe main_wx_test.o wx_test_about_version.o 
wx_test_benchmark_census.o wx_test_calculation_summary.o 
wx_test_config_settings.o wx_test_create_open.o wx_test_default_input.o 
wx_test_default_update.o wx_test_expiry_dates.o wx_test_extract.o 
wx_test_input_sequences.o wx_test_input_validation.o wx_test_paste_census.o 
wx_test_pdf_create.o wx_test_validate_output.o lmi_msw_res.o skeleton.dll 
liblmi.dll -L . -L /opt/lmi/local/lib -L /opt/lmi/local/bin  -L 
/opt/lmi/local/lib
GC> -lwx_mswu-3.1-i686-pc-mingw32 -mwindows    -lexslt -lxslt -lxml2        
-Wl,-Map,wx_test.exe.map -Wl,--disable-auto-import
GC> 
wx_test_default_input.o:C:/opt/lmi/MinGW-20090203/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ext/new_allocator.h:62:
 undefined reference to `tn_range<calendar_date, date_trammel<calendar_date> 
>::value() const'
GC> 
wx_test_default_input.o:C:/opt/lmi/MinGW-20090203/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ext/new_allocator.h:62:
 undefined reference to `datum_string::value() const'
GC> 
GC> We could, of course, decide that wx_test needn't be built this way,
GC> but this is such a small problem that it seems better to fix it.
GC> I think the easiest way is to use this:
GC>   yare_input::yare_input(Input const& z)
GC> which turns an Input instance into something whose members are
GC> directly useful--e.g.:
GC>     calendar_date                     EffectiveDate                   ;
GC>     std::vector<double>               GeneralAccountRate              ;
GC> Would you mind doing that?

 I did it, but I had a couple of problems:

1. I still had to add LMI_SO to yare_input class declaration, otherwise I
   was just getting similar errors for it instead of the errors above.
   Notice that I was able to fix the latter one of those easily, just by
   adding LMI_SO to datum_string class too. But the one with tn_range<>
   was less obvious and I couldn't fix it quickly and, as you advised to
   switch to yare_input anyhow, I didn't spend more time on it.
 
2. I was not sure how to format GeneralAccountRate on output, so I decided
   to just output all the elements of the vector, but this is probably not
   the right thing to do as it results in the output like "0.06, 0.06,
   [52 more times], 0.06" instead of just "0.06" as before. Unfortunately
   I don't know how to recover the original string form from the vector, I
   wonder if you already know the answer to this because I'm a bit lost in
   all this conversion code.

3. Worst of all, the test doesn't work any more when built with MinGW
   (while working just fine with MSVC): it fails with the error that
   the vector is empty. I'm completely lost as to how is this possible,
   so I'm going to try rebuilding without optimizations to be able to debug
   the code as something seems to be going seriously wrong inside
   yare_input ctor.

GC> Oh, and this is really minute, but at the same time would you change
GC> 'd' to 'r' in "general_account_date", to correspond more closely to
GC> "GeneralAccountRate"?

 Oops, sorry about this, fixed locally and will be included in the series
of patching for fixing the so_test build when I finish them.

VZ

reply via email to

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