lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Multi-toolchain builds


From: Vadim Zeitlin
Subject: Re: [lmi] Multi-toolchain builds
Date: Thu, 25 Apr 2019 23:08:47 +0200

On Thu, 25 Apr 2019 19:35:42 +0000 Greg Chicares <address@hidden> wrote:

GC> In branch odd/multiarch, I imagine that I can substitute
GC>   s/$LMI_HOST/${LMI_TOOLCHAIN}_${LMI_HOST}/
GC> in the appropriate places,

 I still wonder why is there more than one of these places. For my own
builds (of anything, but also lmi when using configure for building it) I
use $toolchain-$host in at most 2 places:

1. In the name of the build directory, which is implicit as this is just
   the directory I run configure from.
2. If I plan on installing the package, then in the value of the --prefix
   option passed to configure.

 lmi doesn't use configure, which is perfectly fine, but it does define
"prefix" variable, so shouldn't we only need to change its value in just
one place?

GC> Are the subsequent steps to build with clang trivial and obvious, or
GC> are there any tricks and traps I should be aware of?

 No, I don't see anything special. You would need to adjust the warnings
for clang as it doesn't accept all the gcc warning options (although it
does accept the most usual ones) and has a few useful warning options of
its own not understood by gcc, but other than that it works in exactly the
same way as gcc does.

GC> I ask because I'm looking at the monstrous error message
GC> below, and I know how to fix it, but one does grow weary
GC> of gcc's error messages.
GC> 
GC> In file included from 
/usr/lib/gcc/i686-w64-mingw32/7.3-win32/include/c++/memory:80:0,
GC>                  from /opt/lmi/src/lmi/xml_lmi.hpp:33,
GC>                  from /opt/lmi/src/lmi/ledger.hpp:30,
GC>                  from /opt/lmi/src/lmi/pdf_command_wx.cpp:35:
GC> /usr/lib/gcc/i686-w64-mingw32/7.3-win32/include/c++/bits/unique_ptr.h: In 
instantiation of 'typename std::_MakeUniq<_Tp>::__single_object 
std::make_unique(_Args&& ...) [with _Tp = {anonymous}::cover_page; _Args = 
{{anonymous}::pdf_illustration&, const Ledger&, pdf_writer_wx&, const 
{anonymous}::html_interpolator&}; typename std::_MakeUniq<_Tp>::__single_object 
= std::unique_ptr<{anonymous}::cover_page, 
std::default_delete<{anonymous}::cover_page> >]':
GC> /opt/lmi/src/lmi/pdf_command_wx.cpp:800:17:   required from 'void 
{anonymous}::pdf_illustration::add(Args&& ...) [with T = 
{anonymous}::cover_page; Args = {}]'
GC> /opt/lmi/src/lmi/pdf_command_wx.cpp:2327:25:   required from here
GC> 
/usr/lib/gcc/i686-w64-mingw32/7.3-win32/include/c++/bits/unique_ptr.h:825:30: 
error: invalid new-expression of abstract class type '{anonymous}::cover_page'
GC>      { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
GC>                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GC> /opt/lmi/src/lmi/pdf_command_wx.cpp:1340:7: note:   because the following 
virtual functions are pure within '{anonymous}::cover_page':
GC>  class cover_page : public numbered_page
GC>        ^~~~~~~~~~
GC> /opt/lmi/src/lmi/pdf_command_wx.cpp:1320:17: note:      virtual int 
{anonymous}::numbered_page::get_extra_pages_needed()
GC>      virtual int get_extra_pages_needed() = 0;
GC>                  ^~~~~~~~~~~~~~~~~~~~~~

 This particular one is really not bad, it contains all the useful
information and doesn't have much overhead. I'm not sure clang is going to
do markedly better here, but I could be wrong, of course.

 Regards,
VZ


reply via email to

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