Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#7289 closed Bugs (wontfix)

[Context] Cross compiling for Windows on Linux using gcc fails

Reported by: anonymous Owned by: olli
Milestone: To Be Determined Component: context
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

When cross compiling boost 1.51.0 for target Win32 on Linux using mxe, the new "Context"-Lib fails to build. It seems that the problem is different from #7287 and #7262, so I am opening a new ticket. The following errors occur:

gcc.compile.asm bin.v2/libs/context/build/gcc-mingw-4.7.1/debug/link-static/target-os-windows/threadapi-win32/threading-multi/asm/fcontext_i386_sysv_elf_gas.o
libs/context/src/asm/fcontext_i386_sysv_elf_gas.S: Assembler messages:
libs/context/src/asm/fcontext_i386_sysv_elf_gas.S:37: Warning: .type pseudo-op used outside of .def/.endef ignored.
libs/context/src/asm/fcontext_i386_sysv_elf_gas.S:37: Error: junk at end of line, first unrecognized character is `j'
libs/context/src/asm/fcontext_i386_sysv_elf_gas.S:72: Warning: .size pseudo-op used outside of .def/.endef ignored.
libs/context/src/asm/fcontext_i386_sysv_elf_gas.S:72: Error: junk at end of line, first unrecognized character is `j'
libs/context/src/asm/fcontext_i386_sysv_elf_gas.S:77: Warning: .type pseudo-op used outside of .def/.endef ignored.
libs/context/src/asm/fcontext_i386_sysv_elf_gas.S:77: Error: junk at end of line, first unrecognized character is `m'
libs/context/src/asm/fcontext_i386_sysv_elf_gas.S:122: Warning: .size pseudo-op used outside of .def/.endef ignored.
libs/context/src/asm/fcontext_i386_sysv_elf_gas.S:122: Error: junk at end of line, first unrecognized character is `m'

Change History (8)

comment:1 by viboes, 10 years ago

Component: Building Boostcontext
Description: modified (diff)
Owner: set to olli

comment:2 by olli, 10 years ago

as the output show fcontext_i386_sysv_elf_gas.S is selected - that indicates that the build-properties are not set correctly for the cross-compiling. boost.context requires:

<address-model>=32, <architecture>=x86, <binary-format=>pe, <target-os>=windows

please post the bjam/b2 command line and the output if bjam/b2 is invoked with the additional argument --debug-building

comment:3 by olli, 10 years ago

Resolution: wontfix
Status: newclosed

no response - so I close the bug as wont fix

comment:4 by kai-boost@…, 8 years ago

Quoting http://www.boost.org/build/doc/html/bbv2/tasks/crosscompile.html ,

# On Linux box
b2 toolset=gcc-mingw target-os=windows

Using

b2 --layout=system --prefix=/home/kai/appsv2/bindir/i686-w64-mingw32/external/boost variant=release link=static toolset=gcc-mingw target-os=windows install

fails in the manner described, with 1.57.

Using

b2 --layout=system --prefix=/home/kai/appsv2/bindir/i686-w64-mingw32/external/boost variant=release link=static toolset=gcc-mingw target-os=windows binary-format=pe install

fails with

libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported"

comment:5 by kai-boost@…, 8 years ago

Ok, here's something new.

Adding "abi=ms" now fails with

/bin/sh: 2: ml: not found

Has this ever been tested at all?

in reply to:  5 ; comment:6 by olli, 8 years ago

Replying to kai-boost@…:

Ok, here's something new.

Adding "abi=ms" now fails with

/bin/sh: 2: ml: not found

Has this ever been tested at all?

yes - see boost regression test.

'ml: not found': means that MASM (assembler) is not installed or in the search path

in reply to:  6 ; comment:7 by peppard+boost@…, 8 years ago

Replying to olli:

Replying to kai-boost@…:

Ok, here's something new.

Adding "abi=ms" now fails with

/bin/sh: 2: ml: not found

Has this ever been tested at all?

yes - see boost regression test.

'ml: not found': means that MASM (assembler) is not installed or in the search path

MASM seems to be Windows-only, does this mean that cross compiling from Linux to Windows is currently not possible?

According to the boost mailinglist a year ago you considered adding support for GAS on Windows, I'd be very happy if this would be working, too.

in reply to:  7 comment:8 by olli, 7 years ago

Replying to peppard+boost@…:

MASM seems to be Windows-only, does this mean that cross compiling from Linux to Windows is currently not possible?

probably yes

According to the boost mailinglist a year ago you considered adding support for GAS on Windows, I'd be very happy if this would be working, too.

I'm sorry - I'm too busy, but you are welcome to provide a port.

Note: See TracTickets for help on using tickets.