bugMotti - Bugs: bug #45700, try

 
 

bug #45700: try

Submitter:  None
Submitted:  Wed 05 Aug 2015 09:35:43 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 05 Aug 2015 09:42:45 AM UTC, comment #2: 

Double-colon may not "play" nicely with parallel-execution.

The following example shows one situation, where parallel execution may skip over a dependency (i.e. NOT building it at all), because it was linked in via a double-colon.

As shown later, this occurs only for parallel execution, so you may want to choose parallel-execution OR double-colon.
It may not be safe to use BOTH!


root: all;
        echo root


# 'all' is a double-colon,
#     This is the FIRST target in the double-colon linked-list
all::
        echo all_first

# 'all' is a double-colon,
#     This is the SECOND target in the double-colon linked-list
all:: 3;
        echo all_second


# implicit-rule to match targets: '1', '2', and '3'
%:
        sleep 0.$*


Running


make -r 1 2 root


We get:


sleep 0.1
sleep 0.2
echo all_first
all_first
sleep 0.3
echo all_second
all_second
echo root
root


Where, running


make -r -j2 1 2 root


We get:


sleep 0.1
sleep 0.2
echo all_first
all_first
sleep 0.3
echo root
root



Or, to put simply, running


make -rs 1 2 root


We get:


all_first
all_second
root


Where, running


make -rs -j2 1 2 root


We get:


all_first
root


Anonymous
Wed 05 Aug 2015 09:39:01 AM UTC, comment #1: 

Double-colon may not "play" nicely with parallel-execution.

The following example shows one situation, where parallel execution may skip over a dependency (i.e. NOT building it at all), because it was linked in via a double-colon.

As shown later, this occurs only for parallel execution, so you may want to choose parallel-execution OR double-colon.
It may not be safe to use BOTH!


root: all;
        echo root


# 'all' is a double-colon,
#     This is the FIRST target in the double-colon linked-list
all::
        echo all_first

# 'all' is a double-colon,
#     This is the SECOND target in the double-colon linked-list
all:: 3;
        echo all_second


# implicit-rule to match targets: '1', '2', and '3'
%:
        sleep 0.$*


Running


make -r 1 2 root


We get:


sleep 0.1
sleep 0.2
echo all_first
all_first
sleep 0.3
echo all_second
all_second
echo root
root


Where, running


make -r -j2 1 2 root


We get:


sleep 0.1
sleep 0.2
echo all_first
all_first
sleep 0.3
echo root
root


Or, to put simply, running


make -rs 1 2 root


We get:


all_first
all_second
root


Where, running:


make -rs -j2 1 2 root


We get:


all_first
root


Anonymous
Wed 05 Aug 2015 09:35:43 AM UTC, original submission:  

Double-colon may not "play" nicely with parallel-execution.

The following example shows one situation, where parallel execution may skip over a dependency (i.e. NOT building it at all), because it was linked in via a double-colon.

As shown later, this occurs only for parallel execution, so you may want to choose parallel-execution OR double-colon.
It may not be safe to use BOTH!


root: all;
        echo root


# 'all' is a double-colon,
#     This is the FIRST target in the double-colon linked-list
all::
        echo all_first

# 'all' is a double-colon,
#     This is the SECOND target in the double-colon linked-list
all:: 3;
        echo all_second


# implicit-rule to match targets: '1', '2', and '3'
%:
        sleep 0.$*

Running:

make -r 1 2 root

We get:

sleep 0.1
sleep 0.2
echo all_first
all_first
sleep 0.3
echo all_second
all_second
echo root
root

Where, running:

make -r -j2 1 2 root

We get:

sleep 0.1
sleep 0.2
echo all_first
all_first
sleep 0.3
echo root
root



Or, to put simply, running:

make -rs 1 2 root

We get:

all_first
all_second
root

Where, running:

make -rs -j2 1 2 root

We get:

all_first
root


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code