Boost logo

Boost-Build :

Subject: Re: [Boost-build] Trouble building boost on solaris 10 sparc since boost 1.58.0
From: Matthaus Owens (matthaus_at_[hidden])
Date: 2015-08-20 17:46:49


Volodya,
Passing instruction-set=v9 allows the build to proceed and succeed.
Thanks a lot for the help!

On Thu, Aug 13, 2015 at 9:44 AM, Matthaus Owens <matthaus_at_[hidden]> wrote:
> Thanks Volodya, I'll give that a try.
>
> Reading the sparc gcc manual it sounds like it might be the
> combination of -m32 and -mcpu=v7 that is causing problems. The section
> containing -m32 has the following written:
> "These ‘-m’ options are supported in addition to the above on SPARC-V9
> processors in 64-bit environments"
>
> This seems to indicate that -m32 is only valid alongside v9.
>
> On Wed, Aug 12, 2015 at 3:46 AM, Vladimir Prus <vladimir.prus_at_[hidden]> wrote:
>> On 11-Aug-15 8:09 PM, Matthaus Owens wrote:
>>>
>>> I'm building boost using a cross compiler (gcc 4.8.2) for solaris 10
>>> sparc. Boost built fine in 1.57.0, but starting in 1.58.0, two new
>>> flags were being passed to g++ that broke compilation. Here is an
>>> example compilation from boost 1.57.0, 1.58.0, and 1.59.0-rc2. The
>>> notable flag changes are -mcpu=c3 and -m32 in 1.58.0 and -mcpu=v7 and
>>> -m32 in 1.59.0-rc2. These weren't present in 1.57.0. Does anyone have
>>> any ideas about what might be going on here? Thanks so much!
>>>
>>> 1.57.0:
>>> "/opt/pl-build-tools/bin/sparc-sun-solaris2.10-g++"
>>> -ftemplate-depth-128 -std=c++11 -fPIC -O3 -finline-functions
>>> -Wno-inline -Wall -pthreads -DBOOST_ALL_NO_LIB=1 -DNDEBUG
>>> -D_XOPEN_SOURCE=600 -I"." -c -o
>>>
>>> "boost/bin.v2/libs/program_options/build/gcc-4.8.2/release/link-static/threading-multi/cmdline.o"
>>> "libs/program_options/src/cmdline.cpp"
>>>
>>> This succeeds.
>>>
>>> 1.58.0:
>>> "/opt/pl-build-tools/bin/sparc-sun-solaris2.10-g++"
>>> -ftemplate-depth-128 -std=c++11 -fPIC -O3 -finline-functions
>>> -Wno-inline -Wall -mcpu=c3 -pthreads -m32 -DBOOST_ALL_NO_LIB=1
>>> -DNDEBUG -D_XOPEN_SOURCE=600 -I"." -c -o
>>>
>>> "boost/bin.v2/libs/program_options/build/gcc-4.8.2/release/link-static/threading-multi/cmdline.o"
>>> "libs/program_options/src/cmdline.cpp"
>>>
>>> This fails with errors such as:
>>> sparc-sun-solaris2.10-g++: error: unrecognized argument in option
>>> '-mcpu=c3'
>>> sparc-sun-solaris2.10-g++: note: valid arguments to '-mcpu=' are:
>>> cypress f930 f934 hypersparc leon native niagara niagara2 niagara3
>>> niagara4 sparclet sparclite sparclite86x supersparc tsc701 ultrasparc
>>> ultrasparc3 v7 v8 v9
>>
>>
>> Yeah, that was outright bug.
>>
>>> 1.59.0-rc2:
>>> "/opt/pl-build-tools/bin/sparc-sun-solaris2.10-g++"
>>> -ftemplate-depth-128 -std=c++11 -fPIC -O3 -finline-functions
>>> -Wno-inline -Wall -mcpu=v7 -pthreads -m32 -DBOOST_ALL_NO_LIB=1
>>> -DNDEBUG -D_XOPEN_SOURCE=600 -I"." -c -o
>>>
>>> "boost/bin.v2/libs/program_options/build/gcc-4.8.2/release/link-static/threading-multi/cmdline.o"
>>> "libs/program_options/src/cmdline.cpp"
>>>
>>> This fails with errors such as:
>>> /var/tmp//cc6Xl0Mh.s: Assembler messages:
>>> /var/tmp//cc6Xl0Mh.s:2119: Error: Architecture mismatch on "cas".
>>> /var/tmp//cc6Xl0Mh.s:2119: (Requires v9|v9a|v9b; requested architecture
>>> is v8.)
>>
>>
>> So only v9* works these days? Do you know if that's documented behaviour of
>> sparc assembler?
>>
>> You can work this around by adding
>>
>> instruction-set=v9
>>
>> on the command line, but we probably need to make it default as well.
>>
>> - Volodya
>>
>>
>>
>>
>>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>
>
> --
> Matthaus Owens
> Puppet Labs
>
> PuppetConf 2015 is coming to Portland, Oregon! Join us October 5-9.
> Register now to take advantage of the Early Bird discount —save $249!

-- 
Matthaus Owens
Puppet Labs
PuppetConf 2015 is coming to Portland, Oregon! Join us October 5-9.
Register now to take advantage of the Early Bird discount —save $249!

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk