lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Cross-compiling lmi from Linux to MSW


From: Vadim Zeitlin
Subject: Re: [lmi] Cross-compiling lmi from Linux to MSW
Date: Fri, 22 Jan 2016 16:20:14 +0100

On Fri, 22 Jan 2016 14:48:48 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2016-01-22 14:17, Vadim Zeitlin wrote:
GC> > On Fri, 22 Jan 2016 04:26:10 +0000 Greg Chicares <address@hidden> wrote:
GC> > 
GC> > GC> mkdir ~/build/lmi-msw
GC> [...
GC> > GC> configure: error: Boost filesystem library boost_filesystem not 
found, use --with-boost-libs=dir
GC> > GC> if it is installed in non default location
GC> > 
GC> >  As usual, I'd really like to look at your config.log.
GC> 
GC> Okay, I'll do that routinely in future; I thought it would just be a
GC> bothersome distraction.

 I won't say it's not bothersome, but it's the only way to debug configure
problems, so whenever something surprising happens, this is the place to
look.

GC> > GC> Here's how I installed the cross toolchain:
GC> > GC>   apt-get install g++-mingw-w64-i686
GC> > GC> and let's see whether it's even remotely sane:
GC> > GC>   i686-w64-mingw32-gcc -dumpversion
GC> > GC>   4.6
GC> > GC> Okay, this is debian-7, so it's an older gcc, and maybe I should
GC> > GC> get 4.9.1 from debian-8 instead
GC> > 
GC> >  Yes, you definitely should. g++ 4.6 doesn't support C++11 (it supports
GC> > pieces of C++0x, but it's not at all the same thing) and it just doesn't
GC> > make sense to go back and try to work around its problems when we're 
trying
GC> > to standardize on using 4.9.
GC> 
GC> Would you recommend any particular way to do that?

 Yes: install Jessie in a chroot and install the cross-compiler there. This
is not as simple just upgrading to Jessie (which would be definitely my
preferred way of solving the problem), but it won't touch anything on your
main system and won't have any overhead (other than a few dozen of
megabytes taken by the chrooted system). Please let me know if I should go
into the details of creating a chroot under Debian but at a first glance I
think https://wiki.debian.org/chroot explains it well. FWIW I have an
unstable/experimental mixed chroot here for testing the latest versions of
everything (e.g. g++ 5.3 right now) without having to build it myself and
it works without any real problems since many (as in 15+) years. By "not
real" problems I mean temporary breakages in the package dependencies which
do happen sometimes, but only with sid, if you keep your chroot limited to
stable (or even testing), you should never have any problems at all.

GC> MinGW-w64 isn't in
GC> wheezy-backports or wheezy-backports-sloppy. From what I've read, pinning
GC> seems to be fraught with problems. I'm tempted to try enabling "jessie",
GC> installing only the cross toolchain, and then un-enabling "jessie", but
GC> that's a gross hack.

 It won't really work because the Jessie package depends on Jessie libc (of
course...) and so you would need to upgrade half of your system to Jessie
anyhow.

GC> Somewhere someone suggested using 'dpkg' to install
GC> MinGW-w64 only, and 'apt' for everything else, but then someone else said
GC> that's a bad idea.

 It won't work for the same reason as above.

GC> I suppose the best way is to download the cross
GC> toolchain's sources and build them, but it might take a lot of work to
GC> get that running.

 This would work but is unnecessary IMHO.

GC> I really don't want to "upgrade" the OS to debian-8.

 Why not? It does take some time but is mostly a painless process on a
desktop machine and official support for Wheezy from Debian security team
is about to run out in February 2016 (although maybe the LTS will continue
providing support for it). I'm guilty of not having upgraded all my Debian
boxes to Jessie too yet, but it's just due to a lack of time, I don't see
why would you intentionally want to make your life more difficult by not
upgrading to it.

 Regards,
VZ

reply via email to

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