b2 - what does this message mean? "error: No best alternative for"

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

b2 - what does this message mean? "error: No best alternative for"

Boost - Build mailing list
I have been checking some jamfiles, and wanted to test that a program (here a hello-worldly examples using chrono).

I wanted to check that I could build using both a pre-built library in the usual boost/lib location

     <library>/boost/chrono//boost_chrono

run hello_boost_chrono_library.cpp ; # Use pre-built library.

and also using a build-now library version

run hello_boost_chrono_library.cpp /boost/chrono//boost_chrono ; # Build using a built-now library.

Both run commands work on their own, but not nicely together, as I naively expected.

Command: b2 -a -j16 address-model=64 toolset=msvc-14.1,msvc-14.2,gcc-8.1.0,clang-win-7.0.1,clang-win-8.0.0 release

I got several variants of warnings like this:

"Performing configuration checks

    - default address-model    : 32-bit
    - default architecture     : x86
    - symlinks supported       : yes
error: No best alternative for ./hello_boost_chrono_library
    next alternative: required properties: (empty)
        matched
    next alternative: required properties: (empty)
        matched
"

which I find inscrutable and puzzling.

The result is 5 passes, one for each compiler.  I had hoped for 10 passes, 2 runs for each.

Am I simply doing something that should not work?

Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830



_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: b2 - what does this message mean? "error: No best alternative for"

Boost - Build mailing list
AMDG

On 4/2/19 3:09 AM, Paul A. Bristow via Boost-build wrote:

> I have been checking some jamfiles, and wanted to test that a program (here a hello-worldly examples using chrono).
>
> I wanted to check that I could build using both a pre-built library in the usual boost/lib location
>
>      <library>/boost/chrono//boost_chrono
>
> run hello_boost_chrono_library.cpp ; # Use pre-built library.
>
> and also using a build-now library version
>
> run hello_boost_chrono_library.cpp /boost/chrono//boost_chrono ; # Build using a built-now library.
>
> Both run commands work on their own, but not nicely together, as I naively expected.
>

If you have two targets with the same name,
they are not independent.  Instead, they
are considered target alternatives.  When
you build it, b2 will choose one based on
the build properties and target requirements.
You can think of it as being like an overloaded
function. The (default) name of a run target is
derived from the source file.  To make this
work the way you want, you need to set the name
of one or both of these targets explicitly.

run hello_boost_chrono_library.cpp
  : name hello_boost_chrono_library_prebuilt
  ;

> Command: b2 -a -j16 address-model=64 toolset=msvc-14.1,msvc-14.2,gcc-8.1.0,clang-win-7.0.1,clang-win-8.0.0 release
>
> I got several variants of warnings like this:
>
> "Performing configuration checks
>
>     - default address-model    : 32-bit
>     - default architecture     : x86
>     - symlinks supported       : yes
> error: No best alternative for ./hello_boost_chrono_library
>     next alternative: required properties: (empty)
>         matched
>     next alternative: required properties: (empty)
>         matched
> "
>
> which I find inscrutable and puzzling.
>
> The result is 5 passes, one for each compiler.  I had hoped for 10 passes, 2 runs for each.
>
> Am I simply doing something that should not work?
>

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: b2 - what does this message mean? "error: No best alternative for"

Boost - Build mailing list
AMDG

On 4/3/19 10:43 AM, Paul A. Bristow wrote:
>
>
>> -----Original Message-----
>> From: Steven Watanabe [mailto:[hidden email]]
>> Sent: 02 April 2019 15:12
>> <snip>
>>
>> run hello_boost_chrono_library.cpp
>>   : name hello_boost_chrono_library_prebuilt

This should say `target-name` instead of `name`

>>   ;
>
>
>
> I'm sure this is the cause, but despite some fumbling experiments, I could not find an incantation that works.
>
> 4.5 testing
>
> test rule. The run rule has the following signature:
>
> rule run ( sources + : args * : input-files * : requirements * : target-name ?     : default-build * )
>
> which is different from the 'common rule format' used by other examples
>
>  lib filesystem : : <name>libfilesystem
>
> So I expected it to be this
>
> # To build both ways in same jamfile here, must name explicitly different
> # or target name would be ambiguous with default implicit name of source file.
>
> run
>   hello_boost_chrono_library.cpp  # Source(s)
> : # Args *
> : # Input files *
> : # Requirements *
> : # Target name
>   <name>hello_boost_chrono_library_pre-built      # Explicit run target name.

Leave off the <name> and it should work.

> ; # Use pre-built library.
>
> But I'm obviously still too stupid to understand bjam ☹
>
> Suggestions welcome.
>

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: b2 - what does this message mean? "error: No best alternative for"

Boost - Build mailing list
AMDG

On 4/4/19 7:59 AM, [hidden email] wrote:
>
> "    failed to write output file '..\..\..\bin.v2\libs\hello_boost\example\hello_boost_chrono_library_pre-built.test\msvc-14.1\release\address-model-64\asynch-exceptions-on\link-static\runtime-link-static\threading-multi\hello_boost_chrono_library_pre-built.exe.rsp'!"
>
> But no more clues.
>

The file name is too long.

> Works OK if I comment out the " hello_boost_chrono_library_pre-built" name.
>

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build