[R-pkg-devel] Obscure-to-me parallel make issue

Peter Green m@pjg @end|ng |rom br|@to|@@c@uk
Fri Apr 1 17:46:51 CEST 2022


I am having persistent but difficult-to-reproduce compilation errors for 
some CRAN tests on my package Nmix. These may be instances of the 
'parallel make' problem. A typical error message is
---
    30 |         use f2cio
       |                 1
Fatal Error: Cannot open module file ‘f2cio.mod’ for reading at (1): No 
such file or directory
---

Apart from Nmix_init.c, my src directory has 8 source files:
---
.f : Nmix-sub3z, Nmix-aux, pnorm, rgamma, RNGfns
.c: wrapper.c
.f90: fef2cio, f2cio (each defining modules of the same name)
---

The dependency structure among them is summarised by:
---
Nmix-sub3z.f
     calls pnorm.f rgamma.f Nmix-aux.f RNGfns.f
     uses    fef2cio.mod f2cio.mod
fef2cio.f90
     uses  f2cio.mod
Nmix-aux.f
     calls rgamma.f RNGfns.f
pnorm.f
     calls RNGfns.f
rgamma.f
     calls RNGfns.f
RNGfns.f
     calls wrapper.c
---

My Makevars is:
---
C_OBJS = wrapper.o Nmix_init.o
FT_OBJS = Nmix-aux.o Nmix-sub3z.o RNGfns.o f2cio.o fef2cio.o pnorm.o 
rgamma2.o
all: $(SHLIB) clean
$(SHLIB): $(FT_OBJS) $(C_OBJS)
f2cio.mod: f2cio.o
fef2cio.mod: fef2cio.o f2cio.o
Nmix-sub3z.o: f2cio.mod fef2cio.mod
clean:
     @rm -rf *.mod *.o
---

What dependency am I failing to capture? Or is there some other fault in 
the Makevars? Any clues welcome!

Peter Green




More information about the R-package-devel mailing list