[Context] Building 32-bit Context?
Our product uses many third-party libraries, all built for 32 bits. On a couple platforms we still support users with 32-bit systems. We build our Boost libraries with address-model=32, which has so far worked (for the subset of libraries we use) even on 64-bit build systems. Now we would like to introduce Boost.Context. However, address-model=32 --with-context causes the Boost build to break on Mac OS X. Indeed, the Requirements page [0] for Boost.Context says: "Please note that address-model=64 must be given to bjam command line on 64bit Windows (boost-build issue)." Does the same boost-build issue affect Mac OS X? Is there a workaround for this boost-build issue? I don't think we can integrate Boost.Context any time soon if it would require converting everything to 64 bits. [0] http://www.boost.org/doc/libs/1_51_0/libs/context/doc/html/context/requireme...
On Thu, Sep 20, 2012 at 2:56 PM, Nat Linden
address-model=32 --with-context causes the Boost build to break on Mac OS X.
Just found https://svn.boost.org/trac/boost/ticket/7110 ; may or may not be the same issue. The specific assembler error messages differ.
Am 20.09.2012 21:03, schrieb Nat Linden:
On Thu, Sep 20, 2012 at 2:56 PM, Nat Linden
wrote: address-model=32 --with-context causes the Boost build to break on Mac OS X. Just found https://svn.boost.org/trac/boost/ticket/7110 ; may or may not be the same issue. The specific assembler error messages differ. code should work - see the regression tests at http://www.boost.org/development/tests/release/developer/context.html
Am 20.09.2012 20:56, schrieb Nat Linden:
Our product uses many third-party libraries, all built for 32 bits. On a couple platforms we still support users with 32-bit systems.
We build our Boost libraries with address-model=32, which has so far worked (for the subset of libraries we use) even on 64-bit build systems.
Now we would like to introduce Boost.Context. However, address-model=32 --with-context causes the Boost build to break on Mac OS X. I think address-model=32 is not necessary: bjam toolset=<> should work
Indeed, the Requirements page [0] for Boost.Context says:
"Please note that address-model=64 must be given to bjam command line on 64bit Windows (boost-build issue)." only if you ant to generate 64bit code Does the same boost-build issue affect Mac OS X?
Is there a workaround for this boost-build issue? should work on Mac OS X - take a look at http://www.boost.org/development/tests/release/developer/context.html tests are OK
I don't think we can integrate Boost.Context any time soon if it would require converting everything to 64 bits.
no
On Thu, Sep 20, 2012 at 3:06 PM, Oliver Kowalke
Am 20.09.2012 20:56, schrieb Nat Linden:
Now we would like to introduce Boost.Context. However, address-model=32 --with-context causes the Boost build to break on Mac OS X.
I think address-model=32 is not necessary: bjam toolset=<> should work
In our case, toolset=darwin, yes. However, on a 64-bit Mac, this only builds address-model-64. When I pass address-model=32, I get: libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:70:suffix or operands invalid for `jmp' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:82:suffix or operands invalid for `push' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:83:suffix or operands invalid for `push' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:84:suffix or operands invalid for `push' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:86:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:87:Missing operand value assumed absolute 0. libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:87:junk `[.-1b]' after expression libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:88:junk `@PLT' after expression libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:90:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:91:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:92:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:101:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:112:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:113:Missing operand value assumed absolute 0. libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:113:junk `[.-3b]' after expression libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:116:suffix or operands invalid for `push' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:117:junk `@PLT' after expression I need to build a 32-bit Context library even on a 64-bit build machine. Is this possible?
should work on Mac OS X - take a look at http://www.boost.org/development/tests/release/developer/context.html tests are OK
None of them seem to specify address-model, so presumably they're defaulting to the current architecture. I don't know if they're running on 32-bit or 64-bit machines.
Am 20.09.2012 22:23, schrieb Nat Linden:
On Thu, Sep 20, 2012 at 3:06 PM, Oliver Kowalke
wrote: Am 20.09.2012 20:56, schrieb Nat Linden:
Now we would like to introduce Boost.Context. However, address-model=32 --with-context causes the Boost build to break on Mac OS X. I think address-model=32 is not necessary: bjam toolset=<> should work In our case, toolset=darwin, yes.
However, on a 64-bit Mac, this only builds address-model-64.
When I pass address-model=32, I get:
libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:70:suffix or operands invalid for `jmp' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:82:suffix or operands invalid for `push' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:83:suffix or operands invalid for `push' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:84:suffix or operands invalid for `push' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:86:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:87:Missing operand value assumed absolute 0. libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:87:junk `[.-1b]' after expression libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:88:junk `@PLT' after expression libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:90:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:91:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:92:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:101:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:112:suffix or operands invalid for `pop' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:113:Missing operand value assumed absolute 0. libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:113:junk `[.-3b]' after expression libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:116:suffix or operands invalid for `push' libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:117:junk `@PLT' after expression
I need to build a 32-bit Context library even on a 64-bit build machine. Is this possible?
yes - it should, unfortunately 1.51.0 contains an error for 32bit Mac OSX. Could you try the trunk or release branch from svn (32bit and 64bit)? thx, Oliver
On Thu, Sep 20, 2012 at 4:52 PM, Oliver Kowalke
Am 20.09.2012 22:23, schrieb Nat Linden:
I need to build a 32-bit Context library even on a 64-bit build machine. Is this possible?
yes - it should, unfortunately 1.51.0 contains an error for 32bit Mac OSX. Could you try the trunk or release branch from svn (32bit and 64bit)?
I checked out the Subversion trunk. This command: ./b2 toolset=darwin address-model=32 architecture=x86 variant=release link=static stage produces these errors: Jamfile.gas bin.v2/libs/context/build/darwin-4.2.1/release/address-model-32/architecture-x86/link-static/threading-multi/asm/make_i386_sysv_macho_gas.o libs/context/src/asm/make_i386_sysv_macho_gas.S:38:suffix or operands invalid for `push' libs/context/src/asm/make_i386_sysv_macho_gas.S:62:suffix or operands invalid for `pop' libs/context/src/asm/make_i386_sysv_macho_gas.S:68:suffix or operands invalid for `pop' as -o "bin.v2/libs/context/build/darwin-4.2.1/release/address-model-32/architecture-x86/link-static/threading-multi/asm/make_i386_sysv_macho_gas.o" "libs/context/src/asm/make_i386_sysv_macho_gas.S" Jamfile.gas bin.v2/libs/context/build/darwin-4.2.1/release/address-model-32/architecture-x86/link-static/threading-multi/asm/jump_i386_sysv_macho_gas.o libs/context/src/asm/jump_i386_sysv_macho_gas.S:70:suffix or operands invalid for `jmp' as -o "bin.v2/libs/context/build/darwin-4.2.1/release/address-model-32/architecture-x86/link-static/threading-multi/asm/jump_i386_sysv_macho_gas.o" "libs/context/src/asm/jump_i386_sysv_macho_gas.S" My colleague found that if we execute the above 'as' commands, adding '-arch i386', they each succeed: as -arch i386 -o "bin.v2/libs/context/build/darwin-4.2.1/release/address-model-32/architecture-x86/link-static/threading-multi/asm/make_i386_sysv_macho_gas.o" "libs/context/src/asm/make_i386_sysv_macho_gas.S" as -arch i386 -o "bin.v2/libs/context/build/darwin-4.2.1/release/address-model-32/architecture-x86/link-static/threading-multi/asm/jump_i386_sysv_macho_gas.o" "libs/context/src/asm/jump_i386_sysv_macho_gas.S" So perhaps there's a Jamfile error somewhere. Once those 'as' commands have succeeded, repeating the above './b2' command succeeds as well, producing stage/lib/libboost_context.a. With that library, I can compile and link the exit.cpp example. However, it produces a segmentation fault: cd libs/context/example g++ -I ../../.. -L ../../../stage/lib -arch i386 -m32 -o exitprog exit.cpp -lboost_context && ./exitprog main: call start_fcontext( & fcm, fc1, 0) f1: entered f1: call jump_fcontext( fc1, fc2, 0) f2: entered f2: call jump_fcontext( fc2, fc1, 0) f1: return /bin/bash: line 1: 3034 Segmentation fault: 11 ./exitprog The name of the function in which the fault occurs is suggestive: gdb exitprog GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done (gdb) run Starting program: /Users/nat/boost-trunk/libs/context/example/exitprog Reading symbols for shared libraries ++......................... done main: call start_fcontext( & fcm, fc1, 0) f1: entered f1: call jump_fcontext( fc1, fc2, 0) f2: entered f2: call jump_fcontext( fc2, fc1, 0) f1: return Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x00000000 0x9afb9820 in misaligned_stack_error_ () (gdb) where #0 0x9afb9820 in misaligned_stack_error_ () #1 0xac435d70 in std::wclog () (gdb) Is there something we could/should be doing to avoid "misaligned_stack_error_()" ?
Am 21.09.2012 16:06, schrieb Nat Linden:
On Thu, Sep 20, 2012 at 4:52 PM, Oliver Kowalke
wrote: Am 20.09.2012 22:23, schrieb Nat Linden:
I need to build a 32-bit Context library even on a 64-bit build machine. Is this possible? yes - it should, unfortunately 1.51.0 contains an error for 32bit Mac OSX. Could you try the trunk or release branch from svn (32bit and 64bit)? I checked out the Subversion trunk. This command:
./b2 toolset=darwin address-model=32 architecture=x86 variant=release link=static stage could you replace build/Jamfile.v2 with the one appended at this eMail and run
bjam toolset=darwin address-model=32 --debug-building Please send me the output. regards, Oliver
On Fri, Sep 21, 2012 at 11:09 AM, Oliver Kowalke
could you replace build/Jamfile.v2 with the one appended at this eMail and run
bjam toolset=darwin address-model=32 --debug-building
Please send me the output.
I interpret that to mean: libs/context/build/Jamfile.v2. It built successfully -- yay! ./b2 toolset=darwin address-model=32 architecture=x86 variant=release link=static --debug-building stage Building target './stage' Build request: object(property-set)@1122 <address-model>32 <architecture>x86 <debug-symbols>off <define>NDEBUG <inlining>full <link>static <optimization>speed <runtime-debugging>off <runtime-link>shared <threading>multi <toolset>darwin <variant>release Command line free features: Target requirements: <conditional>@Jamfile%Jamfile.handle-static-runtime <define>BOOST_ALL_NO_LIB=1 <include>. <tag>@Jamfile%Jamfile.tag <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>sun:<stdlib>sun-stlport xsl:paramboost.defaults=Boost Common properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Building target './stage-proper' Build request: object(property-set)@1129 <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <debug-symbols>off <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <variant>release <warnings-as-errors>off <warnings>on Command line free features: Target requirements: <conditional>@Jamfile%Jamfile.handle-static-runtime <define>BOOST_ALL_NO_LIB=1 <hardcode-dll-paths>false <include>. <install-dependencies>on <install-no-version-symlinks>on <install-type>LIB <location>stage/lib <tag>@Jamfile%Jamfile.tag <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>sun:<stdlib>sun-stlport xsl:paramboost.defaults=Boost Common properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>darwin <include>. <inlining>full <install-dependencies>on <install-no-version-symlinks>on <install-type>LIB <link>static <location>stage/lib <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost building project Jamfile ('object(project-target)@164') with <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <debug-symbols>off <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <variant>release <warnings-as-errors>off <warnings>on Building target 'libs/context/build/select_asm_context_sources' Build request: object(property-set)@1129 <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <debug-symbols>off <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <variant>release <warnings-as-errors>off <warnings>on Command line free features: Target requirements: <conditional>@Jamfile%architecture.deduce-address-model <conditional>@Jamfile%architecture.deduce-architecture <conditional>@Jamfile%Jamfile.handle-static-runtime <define>BOOST_ALL_NO_LIB=1 <include>. <os>SOLARIS:<define>_XOPEN_SOURCE=1 <os>SOLARIS:<define>_XOPEN_SOURCE_EXTENDED=1 <tag>@Jamfile%Jamfile.tag <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>sun:<stdlib>sun-stlport xsl:paramboost.defaults=Boost Common properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%architecture.deduce-address-model <conditional>@Jamfile%architecture.deduce-architecture <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Building target 'libs/context/build/asm_context_sources' Build request: object(property-set)@1129 <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <debug-symbols>off <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <variant>release <warnings-as-errors>off <warnings>on Command line free features: Target requirements: <abi>sysv <address-model>32 <architecture>x86 <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <define>BOOST_ALL_NO_LIB=1 <include>. <os>SOLARIS:<define>_XOPEN_SOURCE=1 <os>SOLARIS:<define>_XOPEN_SOURCE_EXTENDED=1 <tag>@Jamfile%Jamfile.tag <target-os>darwin <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>darwin <toolset>sun:<stdlib>sun-stlport xsl:paramboost.defaults=Boost Common properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements for asm_context_sources: Build properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements from asm_context_sources: <include>. Usage requirements for select_asm_context_sources: <include>. Build properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%architecture.deduce-address-model <conditional>@Jamfile%architecture.deduce-architecture <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements from select_asm_context_sources: <include>. Building target 'libs/context/build/boost_context' Build request: object(property-set)@1129 <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <debug-symbols>off <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <variant>release <warnings-as-errors>off <warnings>on Command line free features: Target requirements: <conditional>@Jamfile%Jamfile.handle-static-runtime <define>BOOST_ALL_NO_LIB=1 <include>. <link>shared:<define>BOOST_CONTEXT_DYN_LINK=1 <os>SOLARIS:<define>_XOPEN_SOURCE=1 <os>SOLARIS:<define>_XOPEN_SOURCE_EXTENDED=1 <tag>@Jamfile%Jamfile.tag <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>sun:<stdlib>sun-stlport xsl:paramboost.defaults=Boost Common properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Building target 'libs/context/build/select_asm_context_sources' Build request: object(property-set)@1129 <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <debug-symbols>off <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <variant>release <warnings-as-errors>off <warnings>on Command line free features: Target requirements: <conditional>@Jamfile%architecture.deduce-address-model <conditional>@Jamfile%architecture.deduce-architecture <conditional>@Jamfile%Jamfile.handle-static-runtime <define>BOOST_ALL_NO_LIB=1 <include>. <os>SOLARIS:<define>_XOPEN_SOURCE=1 <os>SOLARIS:<define>_XOPEN_SOURCE_EXTENDED=1 <tag>@Jamfile%Jamfile.tag <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>sun:<stdlib>sun-stlport xsl:paramboost.defaults=Boost Already built Usage requirements from select_asm_context_sources: <include>. Building target 'libs/context/build/context_sources' Build request: object(property-set)@1129 <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <debug-symbols>off <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <variant>release <warnings-as-errors>off <warnings>on Command line free features: Target requirements: <conditional>@Jamfile%Jamfile.handle-static-runtime <define>BOOST_ALL_NO_LIB=1 <include>. <os>SOLARIS:<define>_XOPEN_SOURCE=1 <os>SOLARIS:<define>_XOPEN_SOURCE_EXTENDED=1 <tag>@Jamfile%Jamfile.tag <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>sun:<stdlib>sun-stlport xsl:paramboost.defaults=Boost Common properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements for context_sources: Build properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements from context_sources: <include>. Usage requirements for boost_context: <include>. <include>. Build properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements from boost_context: <include>. Usage requirements for stage-proper: <include>. Build properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>darwin <include>. <inlining>full <install-dependencies>on <install-no-version-symlinks>on <install-type>LIB <link>static <location>stage/lib <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements from stage-proper: <include>. Building target './stage-unversioned' Build request: object(property-set)@1129 <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <debug-symbols>off <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <variant>release <warnings-as-errors>off <warnings>on Command line free features: Target requirements: <conditional>@Jamfile%Jamfile.handle-static-runtime <define>BOOST_ALL_NO_LIB=1 <include>. <tag>@Jamfile%Jamfile.tag <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>sun:<stdlib>sun-stlport xsl:paramboost.defaults=Boost Common properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements for stage-unversioned: Build properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements from stage-unversioned: <include>. Usage requirements for stage: <include>. <include>. Build properties: <abi>sysv <address-model>32 <architecture>x86 <asynch-exceptions>off <binary-format>mach-o <conditional>@Jamfile%Jamfile.handle-static-runtime <debug-symbols>off <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>darwin <include>. <inlining>full <install-dependencies>off <link>static <optimization>speed <os>MACOSX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile%Jamfile.tag <target-os>darwin <threadapi>pthread <threading>multi toolset-darwin:version4.2.1 <toolset>darwin <user-interface>console <variant>release <warnings-as-errors>off <warnings>on xsl:paramboost.defaults=Boost Usage requirements from stage: <include>. Component configuration: - atomic : not building - chrono : not building - context : building - date_time : not building - exception : not building - filesystem : not building - graph : not building - graph_parallel : not building - iostreams : not building - locale : not building - math : not building - mpi : not building - program_options : not building - python : not building - random : not building - regex : not building - serialization : not building - signals : not building - system : not building - test : not building - thread : not building - timer : not building - wave : not building ...found 84 targets... ...updating 5 targets... darwin.compile.asm bin.v2/libs/context/build/darwin-4.2.1/release/address-model-32/architecture-x86/link-static/threading-multi/asm/make_i386_sysv_macho_gas.o darwin.compile.asm bin.v2/libs/context/build/darwin-4.2.1/release/address-model-32/architecture-x86/link-static/threading-multi/asm/jump_i386_sysv_macho_gas.o darwin.archive bin.v2/libs/context/build/darwin-4.2.1/release/address-model-32/architecture-x86/link-static/threading-multi/libboost_context.a common.copy stage/lib/libboost_context.a ...updated 5 targets... exit.cpp does link successfully with this new library, but its runtime behavior is unchanged: main: call start_fcontext( & fcm, fc1, 0) f1: entered f1: call jump_fcontext( fc1, fc2, 0) f2: entered f2: call jump_fcontext( fc2, fc1, 0) f1: return Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x00000000 0x9afb9820 in misaligned_stack_error_ () (gdb) where #0 0x9afb9820 in misaligned_stack_error_ () #1 0xac435d70 in std::wclog ()
Am 21.09.2012 18:20, schrieb Nat Linden:
exit.cpp does link successfully with this new library, but its runtime behavior is unchanged:
main: call start_fcontext( & fcm, fc1, 0) f1: entered f1: call jump_fcontext( fc1, fc2, 0) f2: entered f2: call jump_fcontext( fc2, fc1, 0) f1: return
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x00000000 0x9afb9820 in misaligned_stack_error_ () (gdb) where #0 0x9afb9820 in misaligned_stack_error_ () #1 0xac435d70 in std::wclog () 'exit' has returned from f1() and should now jumped to label 'finish' (in make_fcontext()) in order to call exit(0). seams that the stack pointer isn't valid - hard to fix without debugging. Unfortunately I've no Mac OS X :/
Oliver
participants (2)
-
Nat Linden
-
Oliver Kowalke