Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to specify "ar" path?
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-04-24 05:09:34


On Saturday 24 April 2010 04:28:37 Steve Soule wrote:

> On my Suse Linux 11.2 x86_64 machine, I have the MinGW Windows
> cross-compiler installed (from the OpenSuse Build Service). The
> executables for g++ and ar are:
>
> /usr/bin/i686-pc-mingw32-g++
> /usr/bin/i686-pc-mingw32-ar
>
> If I specify the following in my user-config.jam file:
>
> using gcc : mingw : /usr/bin/i686-pc-mingw32-g++ ;
>
> then Boost Build can find the right g++ executable, but not the right ar
> executable. It tries:
>
> /usr/bin/ar
>
> which doesn't work because /usr/bin/ar doesn't understand non-Linux
> object files.

What is the output of

        /usr/bin/i686-pc-mingw32-g++ -print-prog-name=ar

? It it the 'ar' binary that must be used? Are you using SVN HEAD version
of Boost.Build (or nightly build at http://boost.org/boost-build2) -- which
should use this trick automatically?

- Volodya

>
> To work around this problem, I created a directory /home/soule/mingw
> with symlinks to the mingw g++ and ar, and used the following
> user-config.jam instead:
>
> using gcc : mingw : /home/soule/mingw/g++ ;
>
> This works fine, but is a kludge. There must be some way to specify the
> path to ar in the "using gcc" rule. But I haven't found it in the
> documentation.

Use:

        using gcc : mingw : /usr/bin/i686-pc-mingw32-g++ : <archiver>whatever ;

Thanks,

--
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2

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