Boost logo

Boost :

Subject: [boost] [context] doesn't build on 32-bit osx
From: Luke Elliott (lukester_null_at_[hidden])
Date: 2012-08-07 08:02:22


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk