lmi
[Top][All Lists]
Advanced

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

Re: [lmi] PATCH: tests build fixes for clang


From: Greg Chicares
Subject: Re: [lmi] PATCH: tests build fixes for clang
Date: Sun, 7 Mar 2021 20:41:56 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 3/7/21 4:05 PM, Vadim Zeitlin wrote:
> On Sun, 7 Mar 2021 15:25:57 +0000 Greg Chicares <gchicares@sbcglobal.net> 
> wrote:
> 
> GC> On 3/7/21 1:10 PM, Vadim Zeitlin wrote:
> GC> > 
> GC> >  I'd like to submit a series of small fixes to the tests allowing to 
> build
> GC> > them with clang, please see 
> https://github.com/let-me-illustrate/lmi/pull/173
> GC> 
> GC> I glanced quickly at the commit messages, and each seems to be a
> GC> valuable improvement. Of course, the larger goal of supporting
> GC> clang is most valuable.
> 
>  Thanks!
> 
> GC> >  One thing I did not do, although I think it would be worth doing, was 
> to
> GC> > define LMI_GCC and LMI_CLANG macros in config.hpp. The reason I'd like 
> to
> GC> > do this is that the number of occurrences of
> GC> > 
> GC> >         #if defined __GNUC__ && !defined __clang__
> GC> > 
> GC> > tests increases from 4 to 10 with this PR and it risks continuing 
> growing
> GC> > in the future, so I'd prefer to write this as shorter and clearer
> GC> > 
> GC> >         #if defined LMI_GCC
> GC> > 
> GC> > instead. If you agree that it would be a good idea, please let me know 
> and
> GC> > I'll add a commit doing this to this PR (or create another PR with it, 
> as
> GC> > you prefer).
> GC> 
> GC> Sounds good. Would you prefer to do that before I merge PR 173,
> GC> or should I merge PR 173 as it stands now?
> 
>  I've just added another commit (cce367c18) to this PR with this change.
> You would have to re-run git-fetch again if you had already done it before
> merging/cherry-picking.

Doesn't seem to build cleanly with MinGW-w64 gcc-8.3 .

Verbosely, just in case I erred, I grabbed your latest changes thus:

/opt/lmi/src/lmi[0]$git cherry-pick 205a59c82
[master 33a1270dd] Remove tests involving std::mem_fun
 Author: Vadim Zeitlin <vadim@tt-solutions.com>
 Date: Fri Feb 26 23:30:24 2021 +0100
 1 file changed, 27 deletions(-)
/opt/lmi/src/lmi[0]$git cherry-pick aa9135a21
[master 0dda3f528] Disable clang -Wself-assign-overloaded warning in date test
 Author: Vadim Zeitlin <vadim@tt-solutions.com>
 Date: Fri Feb 26 23:35:11 2021 +0100
 1 file changed, 7 insertions(+)
/opt/lmi/src/lmi[0]$git cherry-pick 03d1a7df9
[master fc767f76e] Include <cmath> to get std::rint() declaration, not <math.h>
 Author: Vadim Zeitlin <vadim@tt-solutions.com>
 Date: Fri Feb 26 23:36:13 2021 +0100
 1 file changed, 1 insertion(+), 1 deletion(-)
/opt/lmi/src/lmi[0]$git cherry-pick 6b5cbb99d
[master 71238a32f] Disable clang tautological constant compare warning in a test
 Author: Vadim Zeitlin <vadim@tt-solutions.com>
 Date: Fri Feb 26 23:37:40 2021 +0100
 1 file changed, 9 insertions(+)
/opt/lmi/src/lmi[0]$git cherry-pick 975ddded0
[master d12604620] Disable clang -Wbraced-scalar-init in a test
 Author: Vadim Zeitlin <vadim@tt-solutions.com>
 Date: Fri Feb 26 23:39:41 2021 +0100
 1 file changed, 9 insertions(+)
/opt/lmi/src/lmi[0]$git cherry-pick 52e90cdc6
[master 50824fe8f] Use std::next() rather than "1+" with raw literal strings
 Author: Vadim Zeitlin <vadim@tt-solutions.com>
 Date: Fri Feb 26 23:41:00 2021 +0100
 1 file changed, 8 insertions(+), 7 deletions(-)
/opt/lmi/src/lmi[0]$git cherry-pick e562d7168
[master 0911400aa] Avoid using gcc-specific warnings with clang
 Author: Vadim Zeitlin <vadim@tt-solutions.com>
 Date: Fri Feb 26 23:44:14 2021 +0100
 2 files changed, 12 insertions(+), 12 deletions(-)
/opt/lmi/src/lmi[0]$git cherry-pick cce367c18
[master ae32f2f1f] Define LMI_GCC symbol and use it for gcc-specific parts
 Author: Vadim Zeitlin <vadim@tt-solutions.com>
 Date: Sun Mar 7 16:59:31 2021 +0100
 6 files changed, 29 insertions(+), 20 deletions(-)

This command seems to verify that mine matches yours,
except for a few commits that I've pushed to files
that you didn't touch:

/opt/lmi/src/lmi[0]$git --no-pager diff --name-only 
xanadu/clang-tests-build-fixes 
gwc/rh.sh
lmi_setup_25.sh
miscellany.hpp
miscellany_test.cpp

I had just run this command before pushing my last changes:
  ./nychthemeral_test.sh
and it was a perfectly clean run. Then, after cherry-picking
as above, I repeated that same command, and everything worked
for pc-linux-gnu, but then...

Contents of '/opt/lmi/gcc_x86_64-w64-mingw32/logs/nychthemeral_test':

# test concinnity

  Problems detected by xmllint:
  Miscellaneous problems:
      683 source files
   193146 source lines
      293 marked defects
# install; check physical closure

/opt/lmi/src/lmi/census_view.cpp: In constructor 
‘wxFloatingPointValidator<T>::wxFloatingPointValidator(wxFloatingPointValidator<T>::ValueType*,
 int) [with T = double; wxFloatingPointValidator<T>::ValueType = double]’:
/opt/lmi/src/lmi/census_view.cpp:127:42: error: zero as null pointer constant 
[-Werror=zero-as-null-pointer-constant]
         wxFloatingPointValidator<double> val;
                                          ^~~
/opt/lmi/src/lmi/census_view.cpp: In member function ‘void 
wxEvtHandler::Bind(const EventTag&, const Functor&, int, int, wxObject*) [with 
EventTag = wxEventTypeTag<wxKeyEvent>; Functor = 
{anonymous}::DatumSequenceEditor::Create(wxWindow*, wxWindowID, 
wxEvtHandler*)::<lambda(wxKeyEvent&)>]’:
/opt/lmi/src/lmi/census_view.cpp:234:10: error: zero as null pointer constant 
[-Werror=zero-as-null-pointer-constant]
         });
          ^
/opt/lmi/src/lmi/skeleton.cpp: In member function ‘void 
wxEvtHandler::Bind(const EventTag&, void (Class::*)(EventArg&), EventHandler*, 
int, int, wxObject*) [with EventTag = wxEventTypeTag<wxMenuEvent>; Class = 
Skeleton; EventArg = wxMenuEvent; EventHandler = Skeleton]’:
/opt/lmi/src/lmi/skeleton.cpp:750:68: error: zero as null pointer constant 
[-Werror=zero-as-null-pointer-constant]
         frame_->Bind(wxEVT_MENU_OPEN, &Skeleton::UponMenuOpen, this);
                                                                    ^
cc1plus: all warnings being treated as errors
make[1]: *** [/opt/lmi/src/lmi/workhorse.make:968: census_view.o] Error 1
cc1plus: all warnings being treated as errors
make[1]: *** [/opt/lmi/src/lmi/workhorse.make:968: skeleton.o] Error 1
install -m 0775 lmi_md5sum.exe /opt/lmi/local/gcc_x86_64-w64-mingw32/bin
make[1]: Target 'install' not remade because of errors.
make: *** [GNUmakefile:241: /opt/lmi/gcc_x86_64-w64-mingw32/build/ship] Error 2
make: Target 'install' not remade because of errors.
make: Target 'check_physical_closure' not remade because of errors.

It looks like 32-bit MinGW-w64 gcc-8.3 gives the same errors.



reply via email to

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