[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] SOLVED: Errors and warnings in x86_64-mingw_w64-gcc lmi build
From: |
Greg Chicares |
Subject: |
[lmi] SOLVED: Errors and warnings in x86_64-mingw_w64-gcc lmi build |
Date: |
Sun, 24 Mar 2019 21:37:36 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
I wondered why a web search found hardly any other occurrences of these
issues. It's because they're bogus. In particular, I did find reports of
error: cast from 'const void*' to 'wxUIntPtr' {aka 'long unsigned int'} loses
precision [-fpermissive]
and no reply except, well, PEBKAC. I can now explain one way to reproduce
them, for anyone who finds the present message in a similar search:
- configure and build wx for 32-bit msw, in a normal 'prefix' directory
- repeat for 64-bit msw, with a nondefault 'prefix'
- build a wx-dependent application for 64-bit msw, using the normal
'prefix' directory for wx
which I hope is more useful than "you did something wrong" or
"try reinstalling".
Having spent so much time writing what follows, it would pain me too
greatly to discard it, but it's not really worth reading because,
well, see above.
-------stop reading here-------
I've built all required libraries (successfully, I think) for msw x86_64,
but building lmi gives 102 instances of four types of errors. Filtering
out the
[-Werror=conversion]
[-Werror=type-limits]
warnings that can be turned off leaves two other types that I don't know
how to deal with:
ambiguous overload for 'operator[]' (operand types are 'wxString' and 'unsigned
int')
cast from 'const void*' to 'wxUIntPtr' {aka 'long unsigned int'} loses
precision [-fpermissive]
Here's an example of each, separated by '=========' because the commands
and error messages are lengthy.
=========
x86_64-w64-mingw32-g++ -MMD -MP -MT previewframe_ex.o -MF previewframe_ex.d -c
-I /opt/lmi/src/lmi -I /opt/lmi/src/lmi/tools/pete-2.1.1 -I
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I
/opt/lmi/third_party/src -I /opt/lmi/x86_64-w64-mingw32/local/include -I
/opt/lmi/x86_64-w64-mingw32/local/include/libxml2 -DLMI_WX_NEW_USE_SO
-DLIBXML_USE_DLL -DSTRICT -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__
-DBOOST_NO_AUTO_PTR -DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP
-frounding-math -std=c++17 -pedantic-errors -Werror -Wall -Walloc-zero -Walloca
-Wcast-align -Wconversion -Wdangling-else -Wdeprecated-declarations
-Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches
-Wduplicated-cond -Wextra -Wformat-nonliteral -Wformat-security
-Wformat-signedness -Wformat-y2k -Wimport -Winit-self -Winvalid-pch
-Wlogical-op -Wmissing-include-dirs -Wmultichar -Wnull-dereference -Wpacked
-Wpointer-arith -Wredundant-decls -Wrestrict -Wshadow -Wsign-compare
-Wstack-protector -Wswitch-enum -Wtrampolines -Wundef -Wunreachable-code
-Wunused-macros -Wvector-operation-performance -Wwrite-strings -Wno-parentheses
-Wc++11-compat -Wc++14-compat -Wc++1z-compat -Wconditionally-supported
-Wctor-dtor-privacy -Wdelete-non-virtual-dtor -Wdeprecated -Wnoexcept
-Wnoexcept-type -Wnon-template-friend -Wnon-virtual-dtor -Woverloaded-virtual
-Wpmf-conversions -Wregister -Wreorder -Wstrict-null-sentinel -Wsynth
-Wuseless-cast -Wcast-qual -D'BOOST_STATIC_ASSERT(A)=static_assert((A))'
-ggdb -O2 /opt/lmi/src/lmi/previewframe_ex.cpp -opreviewframe_ex.o
In file included from /opt/lmi/local/include/wx-3.1/wx/event.h:14,
from /opt/lmi/src/lmi/wx_utility.hpp:29,
from /opt/lmi/src/lmi/previewframe_ex.hpp:38,
from /opt/lmi/src/lmi/previewframe_ex.cpp:32:
/opt/lmi/local/include/wx-3.1/wx/defs.h: In function 'wxUIntPtr
wxPtrToUInt(const void*)':
/opt/lmi/local/include/wx-3.1/wx/defs.h:917:41: error: cast from 'const void*'
to 'wxUIntPtr' {aka 'long unsigned int'} loses precision [-fpermissive]
return reinterpret_cast<wxUIntPtr>(p);
^
=========
x86_64-w64-mingw32-g++ -MMD -MP -MT pdf_writer_wx.o -MF pdf_writer_wx.d -c -I
/opt/lmi/src/lmi -I /opt/lmi/src/lmi/tools/pete-2.1.1 -I
/opt/lmi/local/lib/wx/include/i686-w64-mingw32-msw-unicode-3.1 -I
/opt/lmi/local/include/wx-3.1 -I /opt/lmi/third_party/include -I
/opt/lmi/third_party/src -I /opt/lmi/x86_64-w64-mingw32/local/include -I
/opt/lmi/x86_64-w64-mingw32/local/include/libxml2 -DLMI_WX_NEW_USE_SO
-DLIBXML_USE_DLL -DSTRICT -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__
-DBOOST_NO_AUTO_PTR -DBOOST_STRICT_CONFIG -DBOOST_STATIC_ASSERT_HPP
-frounding-math -std=c++17 -pedantic-errors -Werror -Wall -Walloc-zero -Walloca
-Wcast-align -Wconversion -Wdangling-else -Wdeprecated-declarations
-Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches
-Wduplicated-cond -Wextra -Wformat-nonliteral -Wformat-security
-Wformat-signedness -Wformat-y2k -Wimport -Winit-self -Winvalid-pch
-Wlogical-op -Wmissing-include-dirs -Wmultichar -Wnull-dereference -Wpacked
-Wpointer-arith -Wredundant-decls -Wrestrict -Wshadow -Wsign-compare
-Wstack-protector -Wswitch-enum -Wtrampolines -Wundef -Wunreachable-code
-Wunused-macros -Wvector-operation-performance -Wwrite-strings -Wno-parentheses
-Wc++11-compat -Wc++14-compat -Wc++1z-compat -Wconditionally-supported
-Wctor-dtor-privacy -Wdelete-non-virtual-dtor -Wdeprecated -Wnoexcept
-Wnoexcept-type -Wnon-template-friend -Wnon-virtual-dtor -Woverloaded-virtual
-Wpmf-conversions -Wregister -Wreorder -Wstrict-null-sentinel -Wsynth
-Wuseless-cast -Wcast-qual -D'BOOST_STATIC_ASSERT(A)=static_assert((A))'
-ggdb -O2 /opt/lmi/src/lmi/pdf_writer_wx.cpp -opdf_writer_wx.o
In file included from /opt/lmi/local/include/wx-3.1/wx/filesys.h:26,
from /opt/lmi/local/include/wx-3.1/wx/html/htmlpars.h:16,
from /opt/lmi/local/include/wx-3.1/wx/html/winpars.h:17,
from /opt/lmi/src/lmi/pdf_writer_wx.hpp:30,
from /opt/lmi/src/lmi/pdf_writer_wx.cpp:24:
/opt/lmi/local/include/wx-3.1/wx/filename.h: In static member function 'static
wxUniChar wxFileName
::GetPathSeparator(wxPathFormat)':
/opt/lmi/local/include/wx-3.1/wx/filename.h:460:43: error: ambiguous overload
for 'operator[]' (operand types are 'wxString' and 'unsigned int')
{ return GetPathSeparators(format)[0u]; }
^
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi] SOLVED: Errors and warnings in x86_64-mingw_w64-gcc lmi build,
Greg Chicares <=