mingw-cross-env-list
[Top][All Lists]
Advanced

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

Re: [Mingw-cross-env-list] Question on cross-compiling boost context lib


From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] Question on cross-compiling boost context library
Date: Fri, 03 Feb 2017 20:14:07 +1100

Hi Jack,

> On 3 Feb 2017, at 19:18, Jack Kumba <address@hidden> wrote:
> 
> Thanks for the answer but it seems I still don't have the answer to my 
> question.
> 
> MXE claims to cross-compile sucessfully boost context library version 1.60.0 
> for windows 32-bit on linux 64-bit

I just added a quick trivial sanity check and it seems to build (on darwin at 
least) and run [1].

> but when I try to compile it with 
> 
> b2 --with-context 
> --prefix=/home/jagdish/COMMELEC/prerequisits/real_boost_installation_dir/ 
> --user-config=user-config.jam  toolset=gcc-mingw target-os=windows 
> variant=release  install
> 
> where my user-config.jam file contains
> using gcc : mingw : i686-w64-mingw32-g++ : ;

That doesn’t seem to be an mxe toolchain. 

> I get the following error:
> libs/context/src/asm/make_i386_sysv_elf_gas.S:23: Error: junk at end of line, 
> first unrecognized character is `m'
> 
> It seems like the windows assembler is not ported to run on linux to 
> cross-compile...
> 
> Now, my question is how did the MXE project succeed to cross-compile the 
> boost context library for 32-bit windows on linux 64-bit?

In general, browse through the config options in the makefile [2] and any of 
the associated patches or test files. In particular, the boost docs say:

> For cross-compiling the lib you must specify certain additional properties at 
> bjam command line: target-os, abi, binary-format, architecture and 
> address-model.

I’m guessing that not setting those will cause the wrong assembler to be 
selected.

There’s also examples of both manual linking lines and find_package(Boost …) if 
you’re using cmake.

Cheers,

Tony


[1] https://github.com/mxe/mxe/pull/1657
[2] https://github.com/mxe/mxe/blob/master/src/boost.mk
[3] 
http://www.boost.org/doc/libs/1_60_0/libs/context/doc/html/context/requirements.html




reply via email to

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