Error message 'make' not found

questions concerning analysis/theory using the R package 'marked'

Error message 'make' not found

Postby kquail » Wed May 14, 2025 10:49 am

I am trying to move my multistate analysis (originally run in RMark) to 'marked' so that I can include a random effect of brood ID. When I try to run my model I get this error:
Code: Select all
Error in system(paste(MAKE, p1(paste("-f", shQuote(makefiles))), "compilers"),  :
  'make' not found
6. system(paste(MAKE, p1(paste("-f", shQuote(makefiles))), "compilers"),
intern = TRUE)
5. .shlib_internal(file)
4. compile(paste(tpl, ".cpp", sep = ""), flags = "-Wno-ignored-attributes")
3. setup_tmb("multistate_tmb", clean = clean)
2. mscjs_tmb(data.proc, ddl, fullddl, dml, parameters = parameters,
initial = initial, method = method, hessian = hessian, debug = debug,
accumulate = accumulate, chunk_size = chunk_size, refit = refit,
control = control, itnmax = itnmax, scale = scale, re = re, ...
1. crm(data = post.process, ddl = post.ddl, use.tmb = TRUE, model.parameters = list(S = list(formula = ~1),
Psi = list(formula = ~Treatment + (1 | Brood)), p = list(formula = ~1)))


The same thing happens if I try to run just one model instead of the entire set. I'm wondering if anyone has come across this? Is it a bug in the package or something I need to fix in my system/environment? I already tried updating Rtools, editing the file path, etc. but to no avail. Here is my code:

Code: Select all
> head(post_multi)
  ID Treatment Weight Brood          ch     
1  1       Exp   18.1  177A    A...........
2  2       Exp   15.9  177A    A...........
3  3       Exp   18.0  177A    A...........
4  4       Exp   21.3  177A    A...........
5  5       Exp   18.1  177A    A0A00AAAAA0A
6  6       Exp   15.3  945A    A...........   

post.process<- process.data(post_multi, model="Mscjs", strata.labels=c("A","D","."), time.intervals= c(2,2,2,2,2,2,2,2,2,2,2), groups=c("ID","Treatment"), begin.time=12)
post.ddl<-make.design.data(post.process)
#fix psi(D-A) = 0
post.ddl$Psi$fix=NA
post.ddl$Psi$fix[post.ddl$Psi$stratum=="D" & post.ddl$Psi$tostratum=="A"]=0
#fix psi(D-D) = 1
post.ddl$Psi$fix[post.ddl$Psi$stratum=="D" & post.ddl$Psi$tostratum=="D"]=1
#post.ddl$Psi
#summary(mark(post_multi,post.ddl,output=FALSE),show.fixed=TRUE) #throws an error for some reason
#fix all S = 1
post.ddl$S$fix=1
#fix individual p for specific occasions to 0
#for p, occ 1 is actually the second sampling occasion because there is no p for the first one
post.ddl$p$fix=NA
post.ddl$p$fix[post.ddl$p$ID=="4" & post.ddl$p$occ=="1"]=0
post.ddl$p$fix[post.ddl$p$ID=="5" & post.ddl$p$occ=="2"|post.ddl$p$ID=="5" &post.ddl$p$occ=="3"|post.ddl$p$ID=="5" &post.ddl$p$occ=="4"|post.ddl$p$ID=="5" &post.ddl$p$occ=="10"]=0
post.ddl$p$fix[post.ddl$p$ID=="7" & post.ddl$p$occ=="2"|post.ddl$p$ID=="7" & post.ddl$p$occ=="8"]=0
post.ddl$p$fix[post.ddl$p$ID=="8" & post.ddl$p$occ=="2"]=0
post.ddl$p$fix[post.ddl$p$ID=="9" & post.ddl$p$occ=="1"|post.ddl$p$ID=="9" &post.ddl$p$occ=="2"]=0
post.ddl$p$fix[post.ddl$p$ID=="10" & post.ddl$p$occ=="1"|post.ddl$p$ID=="10" &post.ddl$p$occ=="2"|post.ddl$p$ID=="10" &post.ddl$p$occ=="8"]=0
post.ddl$p$fix[post.ddl$p$ID=="11" & post.ddl$p$occ=="1"]=0
post.ddl$p$fix[post.ddl$p$ID=="12" & post.ddl$p$occ=="2"]=0
post.ddl$p$fix[post.ddl$p$ID=="13" & post.ddl$p$occ=="2"]=0
post.ddl$p$fix[post.ddl$p$ID=="14" & post.ddl$p$occ=="1"|post.ddl$p$ID=="14" &post.ddl$p$occ=="7"]=0
post.ddl$p$fix[post.ddl$p$ID=="15" & post.ddl$p$occ=="1"]=0
post.ddl$p$fix[post.ddl$p$ID=="16" & post.ddl$p$occ=="1"|post.ddl$p$ID=="16" &post.ddl$p$occ=="2"|post.ddl$p$ID=="16" &post.ddl$p$occ=="5"|post.ddl$p$ID=="16" &post.ddl$p$occ=="7"]=0
post.ddl$p$fix[post.ddl$p$ID=="17" & post.ddl$p$occ=="1"|post.ddl$p$ID=="17" &post.ddl$p$occ=="2"|post.ddl$p$ID=="17" &post.ddl$p$occ=="5"|post.ddl$p$ID=="17" &post.ddl$p$occ=="7"]=0
post.ddl$p$fix[post.ddl$p$ID=="18" & post.ddl$p$occ=="1"|post.ddl$p$ID=="18" &post.ddl$p$occ=="4"|post.ddl$p$ID=="18" &post.ddl$p$occ=="7"|post.ddl$p$ID=="18" &post.ddl$p$occ=="8"]=0
post.ddl$p$fix[post.ddl$p$ID=="19" & post.ddl$p$occ=="1"|post.ddl$p$ID=="19" &post.ddl$p$occ=="4"|post.ddl$p$ID=="19" &post.ddl$p$occ=="7"|post.ddl$p$ID=="19" &post.ddl$p$occ=="8"]=0
post.ddl$p$fix[post.ddl$p$ID=="20" & post.ddl$p$occ=="1"]=0
post.ddl$p$fix[post.ddl$p$ID=="21" & post.ddl$p$occ=="1"|post.ddl$p$ID=="21" &post.ddl$p$occ=="5"|post.ddl$p$ID=="21" &post.ddl$p$occ=="7"]=0
post.ddl$p$fix[post.ddl$p$ID=="22" & post.ddl$p$occ=="1"]=0
post.ddl$p$fix[post.ddl$p$ID=="23" & post.ddl$p$occ=="1"]=0
post.ddl$p$fix[post.ddl$p$ID=="24" & post.ddl$p$occ=="1"]=0
post.ddl$p$fix[post.ddl$p$ID=="25" & post.ddl$p$occ=="3"|post.ddl$p$ID=="25" &post.ddl$p$occ=="5"|post.ddl$p$ID=="25" &post.ddl$p$occ=="10"]=0
post.ddl$p$fix[post.ddl$p$ID=="26" & post.ddl$p$occ=="3"|post.ddl$p$ID=="26" &post.ddl$p$occ=="5"|post.ddl$p$ID=="26" &post.ddl$p$occ=="10"]=0
post.ddl$p$fix[post.ddl$p$ID=="28" & post.ddl$p$occ=="4"|post.ddl$p$ID=="28" &post.ddl$p$occ=="9"]=0
post.ddl$p$fix[post.ddl$p$ID=="29" & post.ddl$p$occ=="2"|post.ddl$p$ID=="29" &post.ddl$p$occ=="5"|post.ddl$p$ID=="29" &post.ddl$p$occ=="10"]=0
post.ddl$p$fix[post.ddl$p$ID=="30" & post.ddl$p$occ=="2"|post.ddl$p$ID=="30" &post.ddl$p$occ=="5"|post.ddl$p$ID=="30" &post.ddl$p$occ=="10"]=0
post.ddl$p$fix[post.ddl$p$ID=="31" & post.ddl$p$occ=="2"|post.ddl$p$ID=="31" &post.ddl$p$occ=="5"|post.ddl$p$ID=="31" &post.ddl$p$occ=="10"]=0
post.ddl$p$fix[post.ddl$p$ID=="32" & post.ddl$p$occ=="2"|post.ddl$p$ID=="32" &post.ddl$p$occ=="5"]=0
post.ddl$p$fix[post.ddl$p$ID=="33" & post.ddl$p$occ=="2"]=0
post.ddl$p$fix[post.ddl$p$ID=="34" & post.ddl$p$occ=="2"]=0
post.ddl$p$fix[post.ddl$p$ID=="35" & post.ddl$p$occ=="2"]=0
post.ddl$p$fix[post.ddl$p$ID=="36" & post.ddl$p$occ=="2"]=0
post.ddl$p$fix[post.ddl$p$ID=="37" & post.ddl$p$occ=="1"|post.ddl$p$ID=="37" &post.ddl$p$occ=="6"]=0
post.ddl$p$fix[post.ddl$p$ID=="38" & post.ddl$p$occ=="2"]=0
post.ddl$p$fix[post.ddl$p$ID=="39" & post.ddl$p$occ=="1"|post.ddl$p$ID=="39" &post.ddl$p$occ=="6"]=0
post.ddl$p$fix[post.ddl$p$ID=="40" & post.ddl$p$occ=="1"|post.ddl$p$ID=="40" &post.ddl$p$occ=="6"]=0
post.ddl$p$fix[post.ddl$p$ID=="41" & post.ddl$p$occ=="5"]=0
post.ddl$p$fix[post.ddl$p$ID=="42" & post.ddl$p$occ=="5"]=0
post.ddl$p$fix[post.ddl$p$ID=="43" & post.ddl$p$occ=="3"]=0
post.ddl$p$fix[post.ddl$p$ID=="45" & post.ddl$p$occ=="3"]=0

fit.models=function()
{
  #Models for Psi
  Psi.Treatment.Weight.Time=list(formula=~Treatment+Weight+time+(1|Brood))
  Psi.Weight.Time=list(formula=~Weight+time+(1|Brood))
  Psi.Weight.Treatment=list(formula=~Weight+Treatment+(1|Brood))
  Psi.Treatment.Time=list(formula=~Treatment+time+(1|Brood))
  Psi.Weight=list(formula=~Weight+(1|Brood))
  Psi.Treatment=list(formula=~Treatment+(1|Brood))
  Psi.Time=list(formula=~time+(1|Brood))
  Psi.dot.Brood=list(formula=~1+(1|Brood))
  Psi.dot=list(formula=~1)
 
  #Models for p
  #p.Time=list(formula=~time)
  p.dot=list(formula=~1)
 
  #Models for S
  S.dot=list(formula=~1)
 
  cml=create.model.list(c("Psi","p","S"))
  results=crm.wrapper(cml,data=post.process, ddl=post.ddl,use.tmb=TRUE)#,re=TRUE)
  #external=FALSE,accumulate=FALSE)
}

post.models.rand=fit.models()


You'll notice several individual-specific occasions where I set p=0 because they were not tracked in that interval.

Other uncertainties on my end, potentially related to the issue:
1. I am using dot notation to censor individuals whose radio transmitter fell off. I did this because there are some true zeros before the transmitter fell off that I didn't want to lose. This seemed to work in RMark, but perhaps is not appropriate for 'marked?' In the process.data line, I got an error unless I listed "." as one of the strata, but would I want to treat it as it's own stratum?
2. I saw another post (http://www.phidot.org/forum/viewtopic.php?f=54&t=3549) saying that the re= argument doesn't actually work with the crm() function, so I removed it from the code above. When it was included, however, I got a different error message: "argument 4 matches multiple formal arguments"

Alternatively, other suggestions of methods for accounting for brood effect would be welcome. I saw other posts on calculating process variance, but I don't fully understand how to use/interpret that.
Thanks for your time!
kquail
 
Posts: 15
Joined: Wed Jan 15, 2025 4:15 pm

Re: Error message 'make' not found

Postby jlaake » Wed May 14, 2025 7:45 pm

With regard to make, you need to find where make.exe is stored and include that directory in your system path. I believe it is in Rtools. Typically that is added to your path when you install Rtools.

As you found, dot notation is not supported by marked. If you specify as a stratum, you should set p and S to 1 for that stratum. I'm not sure how dot is handled in MARK for multistate. Alternatively, you can replace . with 0 and fix p to 0 and S to 0 for the intervals and occasions once radio is lost. They will be specific to each animal that lost a tag
This is possible in marked because each animal has design data for each occasion .

The argument re is not used. The random effect is identified from the formula.
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Error message 'make' not found

Postby kquail » Thu May 15, 2025 10:38 am

It seems as though newer versions of Rtools do not automatically add themselves to the PATH, so this must be done manually.

Thanks for the tips on running my models in marked! I took your first suggestion to treat "." as a stratum and fix S and p for that stratum. Unfortunately, I am now getting a new error that compilation has failed because the file size is too big. I get this error even when trying to only run one model, and even if I remove the random effect. Is my model just too complex for the amount of data I have (only 49 individuals) or is something else amiss?

Code: Select all
> model1<-crm(data=post.process,ddl=post.ddl,use.tmb=TRUE,model.parameters=list(S=list(formula=~1),Psi=list(formula=~Treatment + (1|Brood)), p=list(formula=~1)))

All values for S have been fixed. Setting formula to ~0

using C++ compiler: ‘G__~1.EXE (GCC) 14.2.0’
g++ -std=gnu++17  -I"C:/Users/kschroeder/AppData/Local/Programs/R/R-4.5.0/include" -DNDEBUG -I"C:/Users/KSCHRO~1/AppData/Local/R/WIN-LI~1/4.5/TMB/include" -I"C:/Users/KSCHRO~1/AppData/Local/R/WIN-LI~1/4.5/RCPPEI~1/include"  -DTMB_SAFEBOUNDS -DTMB_EIGEN_DISABLE_WARNINGS -DLIB_UNLOAD=R_unload_multistate_tmb  -DTMB_LIB_INIT=R_init_multistate_tmb  -DCPPAD_FRAMEWORK    -I"c:/rtools45/x86_64-w64-mingw32.static.posix/include"      -Wno-ignored-attributes  -c multistate_tmb.cpp -o multistate_tmb.o
as: multistate_tmb.o: too many sections (39200)
C:\Users\KSCHRO~1\AppData\Local\Temp\cc4vGfhO.s: Assembler messages:
C:\Users\KSCHRO~1\AppData\Local\Temp\cc4vGfhO.s: Fatal error: can't write 306 bytes to section .text of multistate_tmb.o: 'file too big'
as: multistate_tmb.o: too many sections (39200)
C:\Users\KSCHRO~1\AppData\Local\Temp\cc4vGfhO.s: Fatal error: multistate_tmb.o: file too big
make: *** [C:/Users/kschroeder/AppData/Local/Programs/R/R-4.5.0/etc/x64/Makeconf:296: multistate_tmb.o] Error 1
Error in compile(paste(tpl, ".cpp", sep = ""), flags = "-Wno-ignored-attributes") :
  Compilation failed



Also, when I try to run my full model set with the fit.models() function I am getting this error below, though I believe I specified the model names correctly? I also tried create.model.list("Mscjs") instead.
Code: Select all
Error in create.model.list(c("Psi", "p", "S")) :
No model specifications found. Use case sensitive parameter.description notation (e.g., Phi.time)
In addition: Warning message:
In parameter_definitions$model == model :
  longer object length is not a multiple of shorter object length
kquail
 
Posts: 15
Joined: Wed Jan 15, 2025 4:15 pm

Re: Error message 'make' not found

Postby jlaake » Fri May 16, 2025 12:02 pm

Try updating TMB. I have seen this before but was never able to diagnose the cause. It is not an issue with data unless you have thousands of occasions.

If updating TMB doesn't work, I'll build you a version of the TMB exe and send you a link to download to your project directory
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Error message 'make' not found

Postby kquail » Fri May 16, 2025 12:39 pm

I updated TMB, but I am still getting the same error message.
That would be great if you could provide a different version for me to try! Thank you!!
kquail
 
Posts: 15
Joined: Wed Jan 15, 2025 4:15 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 0 guests