Boost logo

Boost Users :

Subject: Re: [Boost-users] building on OS X with custom gcc version
From: Damien Hocking (damien_at_[hidden])
Date: 2018-06-25 02:53:22


> On Jun 24, 2018, at 7:02 PM, Steven Watanabe via Boost-users <boost-users_at_[hidden]> wrote:
>
> AMDG
>
> On 06/24/2018 01:32 PM, Damien Hocking via Boost-users wrote:
>>
>>> On Jun 24, 2018, at 11:22 AM, Steven Watanabe via Boost-users <boost-users_at_[hidden]> wrote:
>>>
>>> On 06/24/2018 09:16 AM, Damien Hocking via Boost-users wrote:
>>>> I’m trying to get 1.65.1 compiled on OSX 10.13.5. I have gcc 8.1 installed and I’ve added it to user-config.jam in the home directory. When I run "bootstrap.sh —with-toolset=gcc" it uses the Darwin gcc toolset, if I try —with-toolset=gcc-8.1 I get an unknown toolset error.
>>>>
>>>> If I use the Darwin-based gcc version of b2 and try and build with gcc 8.1 I get this series of errors:
>>>>
>>>> error: No best alternative for libs/context/build/asm_sources.
>>>>
>>>
>>> Can you post the rest of the error?
>>> It should give a list of which alternatives
>>> matched or didn't match.
>>
>> Thanks for the fast response.
>>
>> This is the full list:
>>
>> <snip>
>
> Okay. I see what's going on here. Boost.Context
> only supports darwin and clang on OSX.
>
> You can work around the issue by finding this
> in libs/context/build/Jamfile.v2:
>
> # X86_64/SYSV/MACH-O
> alias asm_sources
> : asm/make_x86_64_sysv_macho_gas.S
> asm/jump_x86_64_sysv_macho_gas.S
> asm/ontop_x86_64_sysv_macho_gas.S
> : <abi>sysv
> <address-model>64
> <architecture>x86
> <binary-format>mach-o
> <toolset>clang
> ;
>
> and making a copy, replacing clang with gcc.

This didn’t work, unfortunately the errors are the same as before. We decided to go with 1.67 seeing as this was a new platform for us. I can use LLVM/Clang 6.0 though, and that seems to be working on 1.67. I had to add the clang 6.0 entry to user-config.jam but that’s all.

>
>>>
>>>> and also linker errors from an unknown option -h on ld. I’m assuming this is because b2 built with Darwin gcc doesn’t have the right options for gcc 8. Is there a way to force b2 to be built based on gcc 8 so it gets the assembly and linker options right?
>>>>
>>> <snip>
>>>
>> Any idea what the ld unknown option: -h comes from?
>>
>
> You may need to set <linker-type>darwin in the toolset
> initialization. The relevant code was significantly
> rewritten and it should work automatically in 1.67
> (1.66 has significant problems on darwin, and I don't
> recommend using it.)
>
> In Christ,
> Steven Watanabe
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net