Specifying Compiler when invoking bootstrap.sh

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Specifying Compiler when invoking bootstrap.sh

Boost - Users mailing list
Hello all,

simple question:
How do I specify the compiler that will be used to compile boost
directly? I would like to provide the whole path.

I have a big CMakeProject that depends on Boost. And boost should be
preferably build with the same Compiler.

Regards,
Simon
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Specifying Compiler when invoking bootstrap.sh

Boost - Users mailing list
On 7 August 2018 at 15:18, Michalke, Simon via Boost-users
<[hidden email]> wrote:
> Hello all,
>
> simple question:
> How do I specify the compiler that will be used to compile boost directly?
> I would like to provide the whole path.

Typically, you pass name of recognised/known toolset via command line
https://github.com/boostorg/boost/blob/master/bootstrap.sh#L154

But, I doubt/don't know you can pass full path.
Instead, you can try to specify the special `cc` toolset and
point to your compiler via the CC environment variable:

https://github.com/boostorg/build/blob/develop/src/engine/build.sh#L37-L40

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Specifying Compiler when invoking bootstrap.sh

Boost - Users mailing list
Am 2018-08-07 16:01, schrieb Mateusz Loskot via Boost-users:

> On 7 August 2018 at 15:18, Michalke, Simon via Boost-users
> <[hidden email]> wrote:
>> Hello all,
>>
>> simple question:
>> How do I specify the compiler that will be used to compile boost
>> directly?
>> I would like to provide the whole path.
>
> Typically, you pass name of recognised/known toolset via command line
> https://github.com/boostorg/boost/blob/master/bootstrap.sh#L154
>
> But, I doubt/don't know you can pass full path.
> Instead, you can try to specify the special `cc` toolset and
> point to your compiler via the CC environment variable:
>
> https://github.com/boostorg/build/blob/develop/src/engine/build.sh#L37-L40
>
> Best regards,

Hello,

the second solution seems to be the correct one. Although I get error
messages that tell me paths are missing. Guess I will have to provide
some more env vars then. I'll figure those out, thank you very much for
the help!

Regards,
Simon
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Specifying Compiler when invoking bootstrap.sh

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
On Tue, 7 Aug 2018 at 09:48 Michalke, Simon via Boost-users <[hidden email]> wrote:
Hello all,

simple question:
How do I specify the compiler that will be used to compile boost
directly? I would like to provide the whole path.

I have a big CMakeProject that depends on Boost. And boost should be
preferably build with the same Compiler.

Regards,
Simon

I don't understand your reason for doing this. As far as I know, bootstrap.sh just builds the b2 executable, which can then invoke any toolset to actually build boost. So, what you bootstrap with is irrelevant to what you actually build boost with, because the resulting b2 should have identical functionality regardless of what was used to compile it.

-- chris

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Specifying Compiler when invoking bootstrap.sh

Boost - Users mailing list
On Sat, 11 Aug 2018, 15:32 Chris Glover via Boost-users, <[hidden email]> wrote:
On Tue, 7 Aug 2018 at 09:48 Michalke, Simon via Boost-users <[hidden email]> wrote:
Hello all,

simple question:
How do I specify the compiler that will be used to compile boost
directly? I would like to provide the whole path.

I have a big CMakeProject that depends on Boost. And boost should be
preferably build with the same Compiler.

Regards,
Simon

I don't understand your reason for doing this. As far as I know, bootstrap.sh just builds the b2 executable, which can then invoke any toolset to actually build boost. So, what you bootstrap with is irrelevant to what you actually build boost with


Yes, but not quite. 
The bootstrap script also generates .jam configs which predefined the detected toolset as default, so it does affect Boost libraries build unless user is aware of such details of the process


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Specifying Compiler when invoking bootstrap.sh

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
Am 2018-08-07 16:20, schrieb Michalke, Simon:

> Am 2018-08-07 16:01, schrieb Mateusz Loskot via Boost-users:
>> On 7 August 2018 at 15:18, Michalke, Simon via Boost-users
>> <[hidden email]> wrote:
>>> Hello all,
>>>
>>> simple question:
>>> How do I specify the compiler that will be used to compile boost
>>> directly?
>>> I would like to provide the whole path.
>>
>> Typically, you pass name of recognised/known toolset via command line
>> https://github.com/boostorg/boost/blob/master/bootstrap.sh#L154
>>
>> But, I doubt/don't know you can pass full path.
>> Instead, you can try to specify the special `cc` toolset and
>> point to your compiler via the CC environment variable:
>>
>> https://github.com/boostorg/build/blob/develop/src/engine/build.sh#L37-L40
>>
>> Best regards,
>
> Hello,
>
> the second solution seems to be the correct one. Although I get error
> messages that tell me paths are missing. Guess I will have to provide
> some more env vars then. I'll figure those out, thank you very much
> for the help!
>
> Regards,
> Simon

Hi,

I cannot get it working. My boostrap.log log shows me stuff like this

builtins.c:58:11: fatal error: sys/wait.h: No such file or directory
  # include <sys/wait.h>
            ^~~~~~~~~~~~
compilation terminated.

My bootstrap line is:
env CC=/usr/bin/x86_64-w64-mingw32-gcc ./bootstrap.sh
--without-libraries=python --prefix=[...] --with-toolset=cc
target-os=windows architecture=x86 address-model=64

I tried to specify the include path with
CPATH=/usr/x86_64-w64-mingw32/sys-root/mingw/include
CXX=/usr/bin/x86_64-w64-mingw32-g++ (which does contain the correct
sys/wait.h) but that did not work as well.

Regards,
Simon
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users