[context] doesn't build on 32-bit osx

Hello Oliver There's actually already a ticket on this (https://svn.boost.org/trac/boost/ticket/7110 not from me) but since it's unassigned I thought I'd post here with a few more details. bjam address-model=32 -d+2 Performing configuration checks - x86 : yes Jamfile</Users/macpro/dev/checkouts/boost-trunk/libs/context/build>.gas ../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/architecture-x86/asm/fcontext_i386_sysv_macho_gas.o as -o "../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/architecture-x86/asm/fcontext_i386_sysv_macho_gas.o" "../../../libs/context/src/asm/fcontext_i386_sysv_macho_gas.S" ../../../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: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' darwin.compile.c++ ../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/fcontext.o Applying the 64-bit change from Daniel Larimer on 13th May and adding -arch=i386 to the as flags gets things further: as -o "../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/architecture-x86/asm/fcontext_i386_sysv_macho_gas.o" "../../../libs/context/src/asm/fcontext_i386_sysv_macho_gas.S" -arch i386 ../../../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:113:Missing operand value assumed absolute 0. ../../../libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:113:junk `[.-3b]' after expression From a quick google, it sounds like _GLOBAL_OFFSET_TABLE is an ELF only thing. I'm now way out of my depth and probably can't really help any further (though happy to try out any fixes). Probably not of much relevance but: sw_vers ProductName: Mac OS X ProductVersion: 10.7.4 BuildVersion: 11E53 as -version Apple Inc version cctools-822, GNU assembler version 1.38 I hope that is of some use! ucontext throws up a deprecated warning so it would be nice to switch to boost.context one day. I've not tried Mountain Lion yet so don't know if they've actually removed ucontext support or if it's still deprecated. Best regards Luke Elliott.

Am 07.08.2012 14:02, schrieb Luke Elliott:
Hello Oliver
There's actually already a ticket on this (https://svn.boost.org/trac/boost/ticket/7110 not from me) but since it's unassigned I thought I'd post here with a few more details.
Hi Luke, could you try the appended asm - it might fail by computing the absolute address of label finish. Oliver

On 07/08/2012 14:04, Oliver Kowalke wrote:
Am 07.08.2012 14:02, schrieb Luke Elliott:
Hello Oliver
There's actually already a ticket on this (https://svn.boost.org/trac/boost/ticket/7110 not from me) but since it's unassigned I thought I'd post here with a few more details.
Hi Luke,
could you try the appended asm - it might fail by computing the absolute address of label finish.
Oliver
No joy I'm afraid: as -o "../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/architecture-x86/asm/fcontext_i386_sysv_macho_gas.o" "../../../libs/context/src/asm/fcontext_i386_sysv_macho_gas.S" -arch i686 ../../../libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:98:bad register name `%eip)' Apparently reading eip in 32-bit mode is a no-go? From some googling, I tried: call _get_eip leal finish(%eip), %ecx with _get_eip: mov (%esp), %ecx ret Which assembles. But at link time: ld: illegal text-relocation to finish in ../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/architecture-x86/asm/fcontext_i386_sysv_macho_gas.o from _make_fcontext in ../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/architecture-x86/asm/fcontext_i386_sysv_macho_gas.o for architecture i386 HTH! Luke.

On 08/08/2012 12:02, Luke Elliott wrote:
On 07/08/2012 14:04, Oliver Kowalke wrote:
Am 07.08.2012 14:02, schrieb Luke Elliott:
Hello Oliver
There's actually already a ticket on this (https://svn.boost.org/trac/boost/ticket/7110 not from me) but since it's unassigned I thought I'd post here with a few more details.
Hi Luke,
could you try the appended asm - it might fail by computing the absolute address of label finish.
Oliver
No joy I'm afraid:
as -o "../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/architecture-x86/asm/fcontext_i386_sysv_macho_gas.o" "../../../libs/context/src/asm/fcontext_i386_sysv_macho_gas.S" -arch i686 ../../../libs/context/src/asm/fcontext_i386_sysv_macho_gas.S:98:bad register name `%eip)'
Apparently reading eip in 32-bit mode is a no-go?
From some googling, I tried:
call _get_eip leal finish(%eip), %ecx
Whoops... leal finish(%ecx), %ecx
with
_get_eip: mov (%esp), %ecx ret
Which assembles. But at link time:
ld: illegal text-relocation to finish in ../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/architecture-x86/asm/fcontext_i386_sysv_macho_gas.o from _make_fcontext in ../../../bin.v2/libs/context/build/darwin-4.2.1/debug/address-model-32/architecture-x86/asm/fcontext_i386_sysv_macho_gas.o for architecture i386
HTH!
Luke.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Luke Elliott
-
Oliver Kowalke