Skip to content

Commit 79ea839

Browse files
committed
fix parallel build issues with APFS/HFS+/ext2/3 in netlib-lapack
The problem is that OpenBLAS sets the LAPACKE_LIB and the TMGLIB to the same object and uses the `ar` feature to update the archive file. If the underlying filesystem does not have sub-second timestamp resolution and the system is fast enough (or `ccache` is used), the timestamp of the builds which should be added to the previously generated archive is the same as the archive file itself and therefore `make` does not update the archive. Since OpenBLAS takes care to not run the different targets updating the archive in parallel, the easiest solution is to declare the respective targets `.PHONY`, forcing `make` to always update them. fixes #1682
1 parent f7f97c6 commit 79ea839

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

lapack-netlib/LAPACKE/src/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,6 +2454,8 @@ endif
24542454

24552455
all: ../../$(LAPACKELIB)
24562456

2457+
.PHONY: ../../$(LAPACKELIB)
2458+
24572459
../../$(LAPACKELIB): $(OBJ_A) $(OBJ_B) $(DEPRECATED) $(EXTENDED) $(MATGEN)
24582460
$(ARCH) $(ARCHFLAGS) $@ $(OBJ_A)
24592461
$(ARCH) $(ARCHFLAGS) $@ $(OBJ_B)

lapack-netlib/SRC/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,8 @@ endif
552552

553553
all: ../$(LAPACKLIB)
554554

555+
.PHONY: ../$(LAPACKLIB)
556+
555557
../$(LAPACKLIB): $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
556558
$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
557559
$(RANLIB) $@

lapack-netlib/TESTING/MATGEN/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ all: ../../$(TMGLIB)
5757
ALLOBJ = $(SMATGEN) $(CMATGEN) $(SCATGEN) $(DMATGEN) $(ZMATGEN) \
5858
$(DZATGEN)
5959

60+
.PHONY: ../../$(TMGLIB)
61+
6062
../../$(TMGLIB): $(ALLOBJ)
6163
$(ARCH) $(ARCHFLAGS) $@ $^
6264
$(RANLIB) $@

0 commit comments

Comments
 (0)