
Hello, I would like to play around with the (provisionally accepted) Boost.Context library, and I'm wondering: does it support MinGW? First, I should mention, I am using the source from http://ok73.ok.funpic.de/boost.context-0.7.4.zip, but I'm not sure whether this is the latest version - the link to the source at http://www.boost.org/community/review_schedule.html is broken (it points to the Boost Vault, which is down, and I can't find it at https://github.com/boost-vault). I tried to compile it both in 64-bit mode using: toolset=gcc architecture=x86 instruction-set=yorksfield address-model=64 and in 32-bit mode using: toolset=gcc architecture=x86 instruction-set=i686 address-model=32 but in both cases I get errors (pasted below). Am I doing something wrong, or does this library not support MinGW? If the latter, is MinGW support planned at some point? Thanks, Nate 64-bit errors: gcc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-york sfield\link-static\protected_stack_windows.o libs\context\src\protected_stack_windows.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -m64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c - o "bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-yorksfield\link-s tatic\protected_stack_windows.o" "libs\context\src\protected_stack_windows.cpp" ...failed gcc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instructio n-set-yorksfield\link-static\protected_stack_windows.o... common.mkdir bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-yorksfi eld\link-static\asm gcc.compile.asm bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-york sfield\link-static\asm\fcontext_x86_64_ms_pe_masm.o libs\context\src\asm\fcontext_x86_64_ms_pe_masm.asm:1:0: sorry, unimplemented: 64-bit mode not compiled in "g++" -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -m64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-yorksfield\link-sta tic\asm\fcontext_x86_64_ms_pe_masm.o" "libs\context\src\asm\fcontext_x86_64_ms_pe_masm.asm" ...failed gcc.compile.asm bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instructio n-set-yorksfield\link-static\asm\fcontext_x86_64_ms_pe_masm.o... gcc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-york sfield\link-static\stack_helper_windows.o libs\context\src\stack_helper_windows.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -m64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c - o "bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-yorksfield\link-s tatic\stack_helper_windows.o" "libs\context\src\stack_helper_windows.cpp" ...failed gcc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instructio n-set-yorksfield\link-static\stack_helper_windows.o... gcc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-york sfield\link-static\seh.o libs\context\src\seh.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -m64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c - o "bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-yorksfield\link-s tatic\seh.o" "libs\context\src\seh.cpp" ...failed gcc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instructio n-set-yorksfield\link-static\seh.o... ...skipped <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-yorksfi eld\link-static>libboost_context-mgw46-1_46_1.a(clean) for lack of <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\a ddress-model-64\architecture-x86\instruction-set-yorksfield\link-static>protected_stack_windows.o... ...skipped <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-64\architecture-x86\instruction-set-yorksfi eld\link-static>libboost_context-mgw46-1_46_1.a for lack of <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\address- model-64\architecture-x86\instruction-set-yorksfield\link-static>protected_stack_windows.o... ...skipped <pstage\lib>libboost_context-mgw46-1_46_1.a for lack of <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\a ddress-model-64\architecture-x86\instruction-set-yorksfield\link-static>libboost_context-mgw46-1_46_1.a... ...failed updating 4 targets... ...skipped 3 targets... ...updated 9 targets... 32-bit errors: cc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instruction-set-i686 link-static\protected_stack_windows.o ibs\context\src\protected_stack_windows.cpp: In constructor 'boost::contexts::protected_stack::protected_stack(std::siz _t)': ibs\context\src\protected_stack_windows.cpp:60:16: warning: unused variable 'result' [-Wunused-variable] ommon.mkdir bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instruction-set-i686\li k-static\asm cc.compile.asm bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instruction-set-i686 link-static\asm\fcontext_i386_ms_pe_masm.o ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm: Assembler messages: ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:2: Error: no such instruction: `copyright Oliver Kowalke 2009.' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:3: Error: no such instruction: `distributed under the Boost Software L cense,Version 1.0.' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:4: Error: junk at end of line, first unrecognized character is `(' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:7: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:8: Error: junk at end of line, first unrecognized character is `|' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:9: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:10: Error: junk at end of line, first unrecognized character is `|' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:11: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:12: Error: junk at end of line, first unrecognized character is `|' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:13: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:14: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:15: Error: junk at end of line, first unrecognized character is `|' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:16: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:17: Error: junk at end of line, first unrecognized character is `|' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:18: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:19: Error: junk at end of line, first unrecognized character is `|' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:20: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:21: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:22: Error: junk at end of line, first unrecognized character is `|' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:23: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:24: Error: junk at end of line, first unrecognized character is `|' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:25: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:26: Error: junk at end of line, first unrecognized character is `|' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:27: Error: junk at end of line, first unrecognized character is `-' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:29: Error: unknown pseudo-op: `.386' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:30: Error: unknown pseudo-op: `.xmm' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:31: Error: unknown pseudo-op: `.model' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:32: Error: no such instruction: `_exit PROTO,value:SDWORD' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:33: Error: no such instruction: `boost_fcontext_seh PROTO,except:DWORD frame:DWORD,context:DWORD,dispatch:DWORD' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:34: Error: unknown pseudo-op: `.code' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:36: Error: no such instruction: `boost_fcontext_jump PROC EXPORT' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:37: Error: invalid char '[' beginning operand 2 `[esp+04h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:37: Error: no such instruction: `load address of the first fcontext_t rg' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:38: Error: invalid char '[' beginning operand 1 `[eax]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:38: Error: no such instruction: `save EDI' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:39: Error: invalid char '[' beginning operand 1 `[eax+04h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:39: Error: no such instruction: `save ESI' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:40: Error: invalid char '[' beginning operand 1 `[eax+08h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:40: Error: no such instruction: `save EBX' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:41: Error: invalid char '[' beginning operand 1 `[eax+0ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:41: Error: no such instruction: `save EBP' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:43: Error: no such instruction: `assume fs:nothing' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:44: Error: too many memory references for `mov' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:44: Error: no such instruction: `load NT_TIB' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:45: Error: no such instruction: `assume fs:error' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:46: Error: invalid char '[' beginning operand 2 `[edx]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:46: Error: no such instruction: `load current SEH exception list' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:47: Error: invalid char '[' beginning operand 1 `[eax+02ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:47: Error: no such instruction: `save current exception list' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:48: Error: invalid char '[' beginning operand 2 `[edx+04h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:48: Error: no such instruction: `load current stack base' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:49: Error: invalid char '[' beginning operand 1 `[eax+020h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:49: Error: no such instruction: `save current stack base' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:50: Error: invalid char '[' beginning operand 2 `[edx+08h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:50: Error: no such instruction: `load current stack limit' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:51: Error: invalid char '[' beginning operand 1 `[eax+024h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:51: Error: no such instruction: `save current stack limit' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:52: Error: invalid char '[' beginning operand 2 `[edx+010h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:52: Error: no such instruction: `load fiber local storage' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:53: Error: invalid char '[' beginning operand 1 `[eax+030h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:53: Error: no such instruction: `save fiber local storage' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:55: Error: invalid char '[' beginning operand 1 `[eax+018h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:55: Error: no such instruction: `save SSE2 control word' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:56: Error: invalid char '[' beginning operand 1 `[eax+01ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:56: Error: no such instruction: `save x87 control word' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:58: Error: invalid char '[' beginning operand 2 `[esp+04h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:58: Error: no such instruction: `exclude the return address' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:59: Error: invalid char '[' beginning operand 1 `[eax+010h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:59: Error: no such instruction: `save as stack pointer' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:60: Error: invalid char '[' beginning operand 2 `[esp]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:60: Error: no such instruction: `load return address' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:61: Error: invalid char '[' beginning operand 1 `[eax+014h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:61: Error: no such instruction: `save return address' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:64: Error: invalid char '[' beginning operand 2 `[esp+08h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:64: Error: no such instruction: `load address of the second fcontext_t arg' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:65: Error: invalid char '[' beginning operand 2 `[eax]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:65: Error: no such instruction: `restore EDI' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:66: Error: invalid char '[' beginning operand 2 `[eax+04h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:66: Error: no such instruction: `restore ESI' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:67: Error: invalid char '[' beginning operand 2 `[eax+08h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:67: Error: no such instruction: `restore EBX' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:68: Error: invalid char '[' beginning operand 2 `[eax+0ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:68: Error: no such instruction: `restore EBP' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:70: Error: no such instruction: `assume fs:nothing' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:71: Error: too many memory references for `mov' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:71: Error: no such instruction: `load NT_TIB' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:72: Error: no such instruction: `assume fs:error' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:73: Error: invalid char '[' beginning operand 2 `[eax+02ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:73: Error: no such instruction: `load SEH exception list' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:74: Error: invalid char '[' beginning operand 1 `[edx]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:74: Error: no such instruction: `restore next SEH item' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:75: Error: invalid char '[' beginning operand 2 `[eax+020h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:75: Error: no such instruction: `load stack base' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:76: Error: invalid char '[' beginning operand 1 `[edx+04h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:76: Error: no such instruction: `restore stack base' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:77: Error: invalid char '[' beginning operand 2 `[eax+024h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:77: Error: no such instruction: `load stack limit' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:78: Error: invalid char '[' beginning operand 1 `[edx+08h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:78: Error: no such instruction: `restore stack limit' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:79: Error: invalid char '[' beginning operand 2 `[eax+030h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:79: Error: no such instruction: `load fiber local storage' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:80: Error: invalid char '[' beginning operand 1 `[edx+010h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:80: Error: no such instruction: `restore fiber local storage' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:82: Error: invalid char '[' beginning operand 1 `[eax+018h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:82: Error: no such instruction: `restore SSE2 control word' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:83: Error: invalid char '[' beginning operand 1 `[eax+01ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:83: Error: no such instruction: `restore x87 control word' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:85: Error: invalid char '[' beginning operand 2 `[eax+010h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:85: Error: no such instruction: `restore ESP' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:86: Error: invalid char '[' beginning operand 2 `[eax+014h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:86: Error: no such instruction: `fetch the address to return to' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:88: Error: too many memory references for `xor' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:88: Error: no such instruction: `set EAX to zero' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:89: Error: no such instruction: `indirect jump to context' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:90: Error: no such instruction: `boost_fcontext_jump ENDP' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:92: Error: no such instruction: `boost_fcontext_make PROC EXPORT' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:93: Error: invalid char '[' beginning operand 2 `[esp+04h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:93: Error: no such instruction: `load address of the fcontext_t arg0' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:94: Error: invalid char '[' beginning operand 1 `[eax]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:94: Error: no such instruction: `save the address of current context' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:95: Error: invalid char '[' beginning operand 2 `[esp+08h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:95: Error: no such instruction: `load the address of the function supp sed to run' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:96: Error: invalid char '[' beginning operand 1 `[eax+014h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:96: Error: no such instruction: `save the address of the function supp sed to run' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:97: Error: invalid char '[' beginning operand 2 `[eax+020h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:97: Error: no such instruction: `load the stack base' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:98: Error: invalid char '[' beginning operand 2 `[edx-014h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:98: Error: no such instruction: `reserve space for last frame on stack (ESP+4)% 16==0' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:99: Error: invalid char '[' beginning operand 1 `[eax+010h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:99: Error: no such instruction: `save the address' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:101: Error: too many memory references for `mov' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:101: Error: no such instruction: `set ECX to exception-handler' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:102: Error: invalid char '[' beginning operand 1 `[edx+0ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:102: Error: no such instruction: `save ECX as SEH handler' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:103: Error: too many memory references for `mov' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:103: Error: no such instruction: `set ECX to -1' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:104: Error: invalid char '[' beginning operand 1 `[edx+08h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:104: Error: no such instruction: `save ECX as next SEH item' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:105: Error: invalid char '[' beginning operand 2 `[edx+08h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:105: Error: no such instruction: `load address of next SEH item' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:106: Error: invalid char '[' beginning operand 1 `[eax+02ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:106: Error: no such instruction: `save next SEH' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:108: Error: invalid char '[' beginning operand 2 `[eax+028h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:108: Error: no such instruction: `load the address of the next context ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:109: Error: invalid char '[' beginning operand 1 `[eax+04h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:109: Error: no such instruction: `save the address of the next context ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:110: Error: invalid char '[' beginning operand 2 `[esp+0ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:110: Error: no such instruction: `load the address of the void pointer arg2' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:111: Error: invalid char '[' beginning operand 1 `[edx+04h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:111: Error: no such instruction: `save the address of the void pointer onto the context stack' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:112: Error: invalid char '[' beginning operand 1 `[eax+018h]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:112: Error: no such instruction: `save SSE2 control word' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:113: Error: invalid char '[' beginning operand 1 `[eax+01ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:113: Error: no such instruction: `save x87 control word' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:114: Error: too many memory references for `mov' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:114: Error: no such instruction: `load helper code executed after fn() eturns' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:115: Error: invalid char '[' beginning operand 1 `[edx]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:115: Error: no such instruction: `save helper code executed adter fn() eturns' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:116: Error: too many memory references for `xor' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:116: Error: no such instruction: `set EAX to zero' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:118: Error: no such instruction: `boost_fcontext_make ENDP' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:120: Error: no such instruction: `boost_fcontext_link PROC' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:121: Error: invalid char '[' beginning operand 2 `[esp-0ch]' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:121: Error: no such instruction: `adjust the stack to proper boundarie ' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:122: Error: too many memory references for `test' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:122: Error: junk `a next context was given' after expression ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:122: Error: number of operands mismatch for `test' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:123: Error: no such instruction: `jump to finish' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:125: Error: junk `address of the next context on the stack' after expr ssion ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:126: Error: junk `address of the current context on the stack' after e pression ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:127: Error: no such instruction: `install next context' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:130: Error: too many memory references for `xor' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:130: Error: no such instruction: `set EAX to zero' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:131: Error: no such instruction: `exit code is zero' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:132: Error: no such instruction: `exit application' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:134: Error: no such instruction: `boost_fcontext_link ENDP' ibs\context\src\asm\fcontext_i386_ms_pe_masm.asm:135: Error: no such instruction: `end' "g++" -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -march=i686 -m32 -DBOOST_ALL_NO_LIB=1 -DNDEBUG I"." -c -o "bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instruction-set-i686\li k-static\asm\fcontext_i386_ms_pe_masm.o" "libs\context\src\asm\fcontext_i386_ms_pe_masm.asm" ..failed gcc.compile.asm bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instructio -set-i686\link-static\asm\fcontext_i386_ms_pe_masm.o... cc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instruction-set-i686 link-static\stack_helper_windows.o cc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instruction-set-i686 link-static\seh.o ibs\context\src\seh.cpp: In function 'char* exception_description(const _EXCEPTION_RECORD*, char*, size_t)': ibs\context\src\seh.cpp:21:40: error: '_TRUNCATE' was not declared in this scope ibs\context\src\seh.cpp:21:100: error: '_snprintf_s' was not declared in this scope ibs\context\src\seh.cpp:24:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:25:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:26:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:27:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:28:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:29:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:30:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:31:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:32:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:33:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:34:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:35:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:36:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:37:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:38:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:39:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:40:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:41:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:42:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:43:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:44:53: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] ibs\context\src\seh.cpp:47:36: error: '_TRUNCATE' was not declared in this scope ibs\context\src\seh.cpp:47:71: error: '_snprintf_s' was not declared in this scope ibs\context\src\seh.cpp: At global scope: ibs\context\src\seh.cpp:52:1: error: 'EXCEPTION_DISPOSITION' does not name a type ibs\context\src\seh.cpp:9:15: warning: 'char* exception_description(const _EXCEPTION_RECORD*, char*, size_t)' defined b t not used [-Wunused-function] "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -march=i686 -m32 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instruction-set-i686\ ink-static\seh.o" "libs\context\src\seh.cpp" ..failed gcc.compile.c++ bin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instructio -set-i686\link-static\seh.o... ..skipped <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instruction-set-i686\li k-static>libboost_context-mgw46-1_46_1.a(clean) for lack of <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\address model-32\architecture-x86\instruction-set-i686\link-static>asm\fcontext_i386_ms_pe_masm.o... ..skipped <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model-32\architecture-x86\instruction-set-i686\li k-static>libboost_context-mgw46-1_46_1.a for lack of <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\address-model- 2\architecture-x86\instruction-set-i686\link-static>asm\fcontext_i386_ms_pe_masm.o... ..skipped <pstage\lib>libboost_context-mgw46-1_46_1.a for lack of <pbin.v2\libs\context\build\gcc-mingw-4.6.0\release\a dress-model-32\architecture-x86\instruction-set-i686\link-static>libboost_context-mgw46-1_46_1.a... ..failed updating 2 targets... ..skipped 3 targets... ..updated 7 targets...

I'm also having problems compiling it on Linux with: toolset=gcc architecture=x86 instruction-set=i686 address-model=32 I get the following errors: gcc.compile.c++ bin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static/protected_stack_posix.o libs/context/src/protected_stack_posix.cpp: In constructor 'boost::contexts::protected_stack::protected_stack(std::size_t)': libs/context/src/protected_stack_posix.cpp:61:15: warning: unused variable 'result' [-Wunused-variable] libs/context/src/protected_stack_posix.cpp: At global scope: libs/context/src/protected_stack_posix.cpp:76:1: error: prototype for 'boost::contexts::protected_stack::protected_stack(boost::rv<boost::contexts::protected_stack>&)' does not match any in class 'boost::contexts::protected_stack' ./boost/context/protected_stack.hpp:44:5: error: candidates are: boost::contexts::protected_stack::protected_stack(boost::rv<boost::contexts::protected_stack>&) libs/context/src/protected_stack_posix.cpp:38:1: error: boost::contexts::protected_stack::protected_stack(std::size_t) libs/context/src/protected_stack_posix.cpp:34:1: error: boost::contexts::protected_stack::protected_stack() ./boost/context/protected_stack.hpp:27:5: error: boost::contexts::protected_stack::protected_stack(boost::contexts::protected_stack&) libs/context/src/protected_stack_posix.cpp:81:1: error: prototype for 'boost::contexts::protected_stack& boost::contexts::protected_stack::operator=(boost::rv<boost::contexts::protected_stack>&)' does not match any in class 'boost::contexts::protected_stack' ./boost/context/protected_stack.hpp:46:23: error: candidates are: boost::contexts::protected_stack& boost::contexts::protected_stack::operator=(boost::rv<boost::contexts::protected_stack>&) ./boost/context/protected_stack.hpp:27:5: error: boost::contexts::protected_stack& boost::contexts::protected_stack::operator=(boost::contexts::protected_stack&) "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -march=i686 -m32 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static/protected_stack_posix.o" "libs/context/src/protected_stack_posix.cpp" ...failed gcc.compile.c++ bin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static/protected_stack_posix.o... common.mkdir bin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static/asm gcc.compile.asm bin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static/asm/fcontext_i386_sysv_elf_gas.o gcc.compile.c++ bin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static/stack_helper_posix.o libs/context/src/stack_helper_posix.cpp: In function 'rlimit {anonymous}::stacksize_limit_()': libs/context/src/stack_helper_posix.cpp:27:15: warning: unused variable 'result' [-Wunused-variable] ...skipped <pbin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static>libboost_context.a(clean) for lack of <pbin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static>protected_stack_posix.o... ...skipped <pbin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static>libboost_context.a for lack of <pbin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static>protected_stack_posix.o... ...skipped <pstage/lib>libboost_context.a for lack of <pbin.v2/libs/context/build/gcc-4.6.1/release/address-model-32/architecture-x86/instruction-set-i686/link-static>libboost_context.a... ...failed updating 1 target... ...skipped 3 targets... ...updated 11 targets... What am I doing wrong? Thanks, Nate.

Am 23.07.2011 07:55, schrieb Nathan Ridge:
Hello Nate, please use https://github.com/olk/boost.context - I don't get compiler errors with this source for 32bit/64bit Linux on x86. The errors above point to some problems with boost.move. Which version did you use? Could you test the lib with the sources from github? Unfortunately MinGW is not supported yet - this would require to port the assembler code written for MASM to GAS. Maybe in the near future I find time doing this (or if you want you can do -> requires only to port the assembler syntax).. best regards, Oliver

Am 23.07.2011 11:35, schrieb Nathan Ridge:
It is a bug in the boost.move (trunk version). The new version doesn't allow to separate the implemantion of copy-ctor and assignment-op from their declaration. For instance if you modify the examples of boost.move like movable.hpp to: class movable { BOOST_MOVABLE_BUT_NOT_COPYABLE(movable) int value_; public: movable() : value_(1){} // only declaration movable(BOOST_RV_REF(movable) m); movable & operator=(BOOST_RV_REF(movable) m); bool moved() const //Observer { return value_ == 0; } }; movable::movable(BOOST_RV_REF(movable) m) { value_ = m.value_; m.value_ = 0; } movable & movable::operator=(BOOST_RV_REF(movable) m) { value_ = m.value_; m.value_ = 0; return *this; } it won't compile for gcc 4.5.2 : movable.hpp:36:1: error: prototype for ‘movable::movable(boost::rv<movable>&)’ does not match any in class ‘movable’ movable.hpp:28:4: error: candidates are: movable::movable(boost::rv<movable>&) movable.hpp:25:4: error: movable::movable() movable.hpp:21:4: error: movable::movable(movable&) movable.hpp:39:11: error: prototype for ‘movable& movable::operator=(boost::rv<movable>&)’ does not match any in class ‘movable’ movable.hpp:30:14: error: candidates are: movable& movable::operator=(boost::rv<movable>&) movable.hpp:21:4: error: movable& movable::operator=(movable&) So I believe I've nothing to fix in boost.context - do you agree? regards, Oliver

Am 24.07.2011 01:31, schrieb Nathan Ridge:
I've reverted the commit which has removed boost.move from https://github.com/olk/boost.context. so long, Oliver

Thanks! I'm happy to report that I can build the library and compile and run an example program now. However, if I try to compile a program using the library with --std=c++0x, I get the following linker error: In function `boost::contexts::detail::context_base<boost::con texts::protected_stack>::context_base(boost::contexts::protected_stack&&, bool, bool)': output_iterator_range.cpp:( .text._ZN5boost8contexts6detail12context_baseINS0_15protected_stackEEC2 EOS3_bb[ _ZN5boost8contexts6detail12context_baseINS0_15protected_stackEEC5EOS3_b b]+0x41): undefined reference to `boost::contexts::protected_stack::protected_stack( boost::contexts::protected_stack && )' What can I do to fix this? Thanks, Nate.

Am 25.07.2011 01:57, schrieb Nathan Ridge:
something wired with boost.move - with std=c++0x it required to change the move assignment op from protected_stack tmp( boost::move( other) ); // use move-copy-ctor to protected_stack tmp( other); I would vote that using --std=c++x0 is not supported until this issue is fixed/clarified in boost.move. so long, Oliver

Hi Oliver,
Would it be possible for you to provide a patch, either to Boost.Move (since we have to use a non-trunk version anyways) or to Boost.Context, that gets this to work? I think this is important to fix; while there is no rush for a library to use C++0x features itself, it should not block users from using C++0x features elsewhere in their program just because they use the library. Thanks, Nate.

Hi Nate, I could fix it if boost.move from trunk is used and the body of move- copy-ctor and move- assignment-op for protected_stack is put inside the declaration. don't know why bosot.move doen't allow to separate declaration and definition of copy-ctor/assignm. op Oliver -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Am 27.07.2011 20:00, schrieb Jeffrey Lee Hellrung, Jr.:
If definition of move-copy-ctor and move-assignment-op is separated from its declaration boost.move generates an compiler error (using boost.move from trunk). lass movable { BOOST_MOVABLE_BUT_NOT_COPYABLE(movable) int value_; public: movable() : value_(1){} // only declaration movable(BOOST_RV_REF(movable) m); movable & operator=(BOOST_RV_REF(movable) m); bool moved() const //Observer { return value_ == 0; } }; movable::movable(BOOST_RV_REF(movable) m) { value_ = m.value_; m.value_ = 0; } movable & movable::operator=(BOOST_RV_REF(movable) m) { value_ = m.value_; m.value_ = 0; return *this; } it won't compile for gcc 4.5.2 : movable.hpp:36:1: error: prototype for ‘movable::movable(boost::rv<movable>&)’ does not match any in class ‘movable’ movable.hpp:28:4: error: candidates are: movable::movable(boost::rv<movable>&) movable.hpp:25:4: error: movable::movable() movable.hpp:21:4: error: movable::movable(movable&) movable.hpp:39:11: error: prototype for ‘movable& movable::operator=(boost::rv<movable>&)’ does not match any in class ‘movable’ movable.hpp:30:14: error: candidates are: movable& movable::operator=(boost::rv<movable>&) movable.hpp:21:4: error: movable& movable::operator=(movable&) I've changed boost.context so that the declaration contains the definition - now it compiles. Oliver
participants (3)
-
Jeffrey Lee Hellrung, Jr.
-
Nathan Ridge
-
Oliver Kowalke