I need to build my application with /SAFESEH which uses boost coroutine which uses context. I'm getting the following link errors: 1>libboost_context-vc100-mt-gd-1_53.lib(jump_i386_ms_pe_masm.obj) : error LNK2026: module unsafe for SAFESEH image. 1>libboost_context-vc100-mt-gd-1_53.lib(make_i386_ms_pe_masm.obj) : error LNK2026: module unsafe for SAFESEH image. I've built boost static libs with the same MSVC vesion and options (sans /SAFESEH as it's not a compile/lib option) Compiler/linker versions: Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 Microsoft (R) Incremental Linker Version 10.00.40219.01 Has anyone run into this and resolved the error? Any insight is appreciated. Thanks, Jeff
Currently it is not supported, e.g. you could try to set the SAFESEH in the
masm command line (build/Jamfile).
Please report what happened.
2013/10/1 Jeff Flinn
I need to build my application with /SAFESEH which uses boost coroutine which uses context. I'm getting the following link errors:
1>libboost_context-vc100-mt-**gd-1_53.lib(jump_i386_ms_pe_**masm.obj) : error LNK2026: module unsafe for SAFESEH image. 1>libboost_context-vc100-mt-**gd-1_53.lib(make_i386_ms_pe_**masm.obj) : error LNK2026: module unsafe for SAFESEH image.
I've built boost static libs with the same MSVC vesion and options (sans /SAFESEH as it's not a compile/lib option)
Compiler/linker versions: Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 Microsoft (R) Incremental Linker Version 10.00.40219.01
Has anyone run into this and resolved the error? Any insight is appreciated.
Thanks, Jeff
______________________________**_________________ Unsubscribe & other changes: http://lists.boost.org/** mailman/listinfo.cgi/boosthttp://lists.boost.org/mailman/listinfo.cgi/boost
masm /safeseh
2013/10/1 Oliver Kowalke
Currently it is not supported, e.g. you could try to set the SAFESEH in the masm command line (build/Jamfile). Please report what happened.
2013/10/1 Jeff Flinn
I need to build my application with /SAFESEH which uses boost coroutine which uses context. I'm getting the following link errors:
1>libboost_context-vc100-mt-**gd-1_53.lib(jump_i386_ms_pe_**masm.obj) : error LNK2026: module unsafe for SAFESEH image. 1>libboost_context-vc100-mt-**gd-1_53.lib(make_i386_ms_pe_**masm.obj) : error LNK2026: module unsafe for SAFESEH image.
I've built boost static libs with the same MSVC vesion and options (sans /SAFESEH as it's not a compile/lib option)
Compiler/linker versions: Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01for 80x86 Microsoft (R) Incremental Linker Version 10.00.40219.01
Has anyone run into this and resolved the error? Any insight is appreciated.
Thanks, Jeff
______________________________**_________________ Unsubscribe & other changes: http://lists.boost.org/** mailman/listinfo.cgi/boosthttp://lists.boost.org/mailman/listinfo.cgi/boost
On 10/1/2013 1:12 PM, Oliver Kowalke wrote:
Currently it is not supported, e.g. you could try to set the SAFESEH in the masm command line (build/Jamfile). Please report what happened.
I've added /safeseh in ...\boost_1_53_0\libs\context\build\Jamfile.v2: actions masm { ml /safeseh /c /Fo"$(<)" "$(>)" } And get the same link errors:
1>libboost_context-vc100-mt-**gd-1_53.lib(jump_i386_ms_pe_**masm.obj) : error LNK2026: module unsafe for SAFESEH image. 1>libboost_context-vc100-mt-**gd-1_53.lib(make_i386_ms_pe_**masm.obj) : error LNK2026: module unsafe for SAFESEH image.
/VERBOSE:SAFESEH provides no futher information. Let me know if you have any other ideas to try. Jeff
On 10/1/2013 1:47 PM, Oliver Kowalke wrote:
2013/10/1 Jeff Flinn
And get the same link errors:
hmm - then it needs some modifications in the assembler files I fear that the MSDN does not well document it.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
It's appearing that actions masm { ml /safeseh /c /Fo"$(<)" "$(>)" } is being ignored in \boost_1_53_0\libs\context\build\Jamfile.v2. I added: MyHandler proc .safeseh MyHandler MyHandler endp to make_i386_ms_pe_masm.asm resulting in the following error: msvc.compile.asm bin.v2\libs\context\build\msvc-10.0\debug\link-static\runtime-link-static\threading-multi\asm\make_i386_ms_pe_masm.obj Assembling: libs\context\src\asm\make_i386_ms_pe_masm.asm libs\context\src\asm\make_i386_ms_pe_masm.asm(50) : warning A4024:directive ignored without /safeseh switch msvc.compile.asm bin.v2\libs\context\build\msvc-10.0\debug\link-static\runtime-link-static\threading-multi\asm\jump_i386_ms_pe_masm.obj But running ml /safeseh /c make_i386_ms_pe_masm.asm in ...\boost_1_53_0\libs\context\src\asm succeeds. Jeff
On 10/1/2013 1:47 PM, Oliver Kowalke wrote:
2013/10/1 Jeff Flinn
And get the same link errors:
hmm - then it needs some modifications in the assembler files I fear that the MSDN does not well document it.
Ok I'm able to build my app linking with static context libs. I had to manually assemble the following into obj's by: ml /safeseh /c make_i386_ms_pe_masm.asm ml /safeseh /c jump_i386_ms_pe_masm.asm and then replace make_i386_ms_pe_masm.obj jump_i386_ms_pe_masm.obj in the boost build generated libs with the above. Any idea why modifying ...\boost_1_53_0\libs\context\build\Jamfile.v2: actions masm { ml /safeseh /c /Fo"$(<)" "$(>)" } is not being honored? Jeff
2013/10/1 Jeff Flinn
On 10/1/2013 1:47 PM, Oliver Kowalke wrote:
2013/10/1 Jeff Flinn
And get the same link errors:
hmm - then it needs some modifications in the assembler files I fear that the MSDN does not well document it.
Ok I'm able to build my app linking with static context libs.
I had to manually assemble the following into obj's by:
ml /safeseh /c make_i386_ms_pe_masm.asm ml /safeseh /c jump_i386_ms_pe_masm.asm
and then replace
make_i386_ms_pe_masm.obj jump_i386_ms_pe_masm.obj
in the boost build generated libs with the above.
Any idea why modifying ...\boost_1_53_0\libs\context\**build\Jamfile.v2:
actions masm { ml /safeseh /c /Fo"$(<)" "$(>)" }
is not being honored?
I remember that boost.build has a bug which causes this behaviour - I don't know when it will be fixed (if ever) or we have to wait for cmake.
Hi, I had the same problem (with version 1.56) and I solved adding /safeseh in boost_1_56_0\libs\context\build\Jamfile.v2 as supposed: actions masm { ml /safeseh /c /Fo"$(<)" "$(>)" } and -safeseh in boost_1_56_0\tools\build\src\tools\msvc.jam, line 952: local default-assembler-i386 = "ml -coff -safeseh" ; Maybe someone can explain, why this works? Tobias -- View this message in context: http://boost.2283326.n4.nabble.com/context-msvc-SAFESEH-tp4652245p4666842.ht... Sent from the Boost - Dev mailing list archive at Nabble.com.
I found a solution here http://lists.boost.org/boost-build/2013/10/27024.php http://lists.boost.org/boost-build/2013/10/27024.php that solves the problem entirely from the b2.exe command-line. Just add asmflags=\safeseh My full b2.exe command-line looks like this: .\b2.exe --toolset=msvc-11.0 variant=debug,release runtime-link=shared,static address-model=32 asmflags=\safeseh --stagedir=.\stage\i386 Tobias -- View this message in context: http://boost.2283326.n4.nabble.com/context-msvc-SAFESEH-tp4652245p4678770.ht... Sent from the Boost - Dev mailing list archive at Nabble.com.
participants (3)
-
Jeff Flinn
-
Oliver Kowalke
-
Tobias Loew