Crocc-compiling Boost from Linux for windows

niXman via Boost-users <[email protected]> Fri, 29 Aug 2025 07:09:46 +0000
Newsgroups gmane.comp.lib.boost.user
Message-ID <[email protected]>
Hi,

I'm trying to build Boost from Linux for Windows.

I created user-config.jam file with the following content:
using gcc : mingw : x86_64-w64-mingw32-g++
:
    <rc>x86_64-w64-mingw32-windres
    <as>x86_64-w64-mingw32-as
;

I build using this command line:
./b2 --user-config=./user-config.jam --prefix=$HOME/boost-1.82.0 
target-os=windows address-model=64 variant=release install

but I get these messages when building boost.context:
gcc.compile.asm 
bin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden/asm/ontop_x86_64_sysv_elf_gas.o
ontop_x86_64_sysv_elf_gas.S: Assembler messages:
ontop_x86_64_sysv_elf_gas.S:43: Warning: .type pseudo-op used outside of 
.def/.endef: ignored.
ontop_x86_64_sysv_elf_gas.S:43: Error: junk at end of line, first 
unrecognized character is `o'
libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:135: Warning: .size 
pseudo-op used outside of .def/.endef: ignored.
libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:135: Error: junk at end 
of line, first unrecognized character is `o'
libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S:138: Error: junk at end 
of line, first unrecognized character is `-'

     "x86_64-w64-mingw32-g++" -x assembler-with-cpp -m64 -mthreads -O3 
-finline-functions -Wno-inline -Wall -fvisibility=hidden  
-DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS 
-DNDEBUG -D_WIN32_WINNT=0x0601 -I"." -c -o 
"bin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden/asm/ontop_x86_64_sysv_elf_gas.o" 
"libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S"

...failed gcc.compile.asm 
bin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden/asm/ontop_x86_64_sysv_elf_gas.o...
gcc.compile.asm 
bin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden/asm/make_x86_64_sysv_elf_gas.o
make_x86_64_sysv_elf_gas.S: Assembler messages:
make_x86_64_sysv_elf_gas.S:44: Warning: .type pseudo-op used outside of 
.def/.endef: ignored.
make_x86_64_sysv_elf_gas.S:44: Error: junk at end of line, first 
unrecognized character is `m'
libs/context/src/asm/make_x86_64_sysv_elf_gas.S:144: Warning: .size 
pseudo-op used outside of .def/.endef: ignored.
libs/context/src/asm/make_x86_64_sysv_elf_gas.S:144: Error: junk at end 
of line, first unrecognized character is `m'
libs/context/src/asm/make_x86_64_sysv_elf_gas.S:147: Error: junk at end 
of line, first unrecognized character is `-'

     "x86_64-w64-mingw32-g++" -x assembler-with-cpp -m64 -mthreads -O3 
-finline-functions -Wno-inline -Wall -fvisibility=hidden  
-DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS 
-DNDEBUG -D_WIN32_WINNT=0x0601 -I"." -c -o 
"bin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden/asm/make_x86_64_sysv_elf_gas.o" 
"libs/context/src/asm/make_x86_64_sysv_elf_gas.S"

...failed gcc.compile.asm 
bin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden/asm/make_x86_64_sysv_elf_gas.o...
gcc.compile.asm 
bin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden/asm/jump_x86_64_sysv_elf_gas.o
jump_x86_64_sysv_elf_gas.S: Assembler messages:
jump_x86_64_sysv_elf_gas.S:44: Warning: .type pseudo-op used outside of 
.def/.endef: ignored.
jump_x86_64_sysv_elf_gas.S:44: Error: junk at end of line, first 
unrecognized character is `j'
libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:139: Warning: .size 
pseudo-op used outside of .def/.endef: ignored.
libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:139: Error: junk at end 
of line, first unrecognized character is `j'
libs/context/src/asm/jump_x86_64_sysv_elf_gas.S:142: Error: junk at end 
of line, first unrecognized character is `-'

     "x86_64-w64-mingw32-g++" -x assembler-with-cpp -m64 -mthreads -O3 
-finline-functions -Wno-inline -Wall -fvisibility=hidden  
-DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS 
-DNDEBUG -D_WIN32_WINNT=0x0601 -I"." -c -o 
"bin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden/asm/jump_x86_64_sysv_elf_gas.o" 
"libs/context/src/asm/jump_x86_64_sysv_elf_gas.S"

...failed gcc.compile.asm 
bin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden/asm/jump_x86_64_sysv_elf_gas.o...
...skipped 
<pbin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden>libboost_context.a(clean) 
for lack of 
<pbin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden>asm/make_x86_64_sysv_elf_gas.o...
...skipped 
<pbin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden>libboost_context.a 
for lack of 
<pbin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden>asm/make_x86_64_sysv_elf_gas.o...
...skipped <p/home/andrew/boost-1.82.0/lib>libboost_context.a for lack 
of 
<pbin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden>libboost_context.a...
...skipped 
<pbin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden>libboost_context-variant-static.cmake 
for lack of 
<pbin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden>libboost_context.a...
...skipped 
<p/home/andrew/boost-1.82.0/lib/cmake/boost_context-1.82.0>libboost_context-variant-static.cmake 
for lack of 
<pbin.v2/libs/context/build/gcc-mingw/release/link-static/target-os-windows/threading-multi/visibility-hidden>libboost_context-variant-static.cmake...
...failed updating 3 targets...
...skipped 5 targets...





any ideas how can I fix it?


best!
_______________________________________________
Boost-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost-users.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/XACG77RU3ZIRDVFWYP2UUJJJNI53MGRA/