Closed evebohnett closed 3 years ago
Hi,
I've been waiting to respond to see if anyone else reports this same problem. I apologize that I don't have a MacOS machine to replicate this Clang compiler error, and also don't understand it enough to give any advice. I would be curious to hear if you can replicate this error using a Windows or Linux OS, or if others are seeing this issue.
Thanks for checking on it. I got an earlier version of VAST to work. I did some updates in R recently. I'll try again. It must be something with my machine. Best, Eve Bohnett
On Thursday, February 14, 2019, 2:18:50 PM EST, Jim Thorson <notifications@github.com> wrote:
Hi,
I've been waiting to respond to see if anyone else reports this same problem. I apologize that I don't have a MacOS machine to replicate this Clang compiler error, and also don't understand it enough to give any advice. I would be curious to hear if you can replicate this error using a Windows or Linux OS, or if others are seeing this issue.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi,
I also face same error messages when I tried to build TmbList.
TmbList = Build_TMB_Fn( "TmbData"=TmbData, "RunDir"=DateFile, "Version"=Version, "RhoConfig"=RhoConfig, "loc_x"=Spatial_List$loc_x, "Method"=Method ) Error in compile(paste0(Version, ".cpp")) : Compilation failed In addition: Warning message: 'Build_TMB_Fn' is deprecated. Use 'VAST::make_model' instead. See help("Deprecated")
Actually, I faced this problem since yesterday after accidentally reinstalling VAST. After that some previous codes have failed to work. For example, the following code also does not work, and then I have stopped to use the library(tidyverse), the code can work.
plot_data(Extrapolation_List=Extrapolation_List, Spatial_List=Spatial_List, Data_Geostat=Data_Geostat, PlotDir=DateFile ) Error in as_mapper(.f, ...) : argument ".f" is missing, with no default
I have reinstalled RStudio, Microsoft R Open, VAST, INLA and TMB, however the situation does not change. My OS is Windows 10. You can find model setting of the code as follows;
Version = "VAST_v5_4_0" ( I also try "VAST_v7_0_0", but the situation was same) Method = c("Grid", "Mesh", "Spherical_mesh")[2] grid_size_km = 50 n_x = c(10, 20, 50, 100, 200, 500)[5] # Number of stations Kmeans_Config = list( "randomseed"=1, "nstart"=100, "iter.max"=1e3 )
FieldConfig = c("Omega1"=1, "Epsilon1"=1, "Omega2"=1, "Epsilon2"=1) RhoConfig = c("Beta1"=0, "Beta2"=0, "Epsilon1"=0, "Epsilon2"=0) OverdispersionConfig = c("Eta1"=0, "Eta2"=0) ObsModel = c(1,0)
Options = c("SD_site_density"=0, "SD_site_logdensity"=0, "Calculate_Range"=1,"Calculate_evenness"=0, "Calculate_effective_area"=1, "Calculate_Cov_SE"=0,'Calculate_Synchrony'=0, 'Calculate_Coherence'=0)
strata.limits <- data.frame('STRATA'="1")
Region = "Other"
I have no idea what as.mapper
is but a short google shows that its part of tidyverse, and apparently its interfering with TMB somehow. Please try re-running on a fresh R console without any tidyverse loaded or installed.
Also, I don't really understand your question due to some grammar issues. Feel free to edit your question and I'll look again. For example, what functions are throwing errors? What are the error messages?
Hi, Thank you for quick response. When I run this code, TmbList = Build_TMB_Fn( "TmbData"=TmbData, "RunDir"=DateFile, "Version"=Version, "RhoConfig"=RhoConfig, "loc_x"=Spatial_List$loc_x, "Method"=Method )
I received this error message. It is my problem. Error in compile(paste0(Version, ".cpp")) : Compilation failed
Best
Hi, I was able to get everything to run if I downgraded the version of VAST to 2.5.0 or something around that version ( I only tried one downgraded version).
What was the error message for the compile statement?
That is ultimately an issue with your installation of TMB, and the error message would give a bit more insight before referring you to that issue tracker.
I found the same/similar error messages on mac OS w/ everything upgraded for VAST7.0 (but a couple of other TMB models compiled and ran). Testing full suite of TMB models in tmb_examples. Would be great if VAST worked on a mac...
Hi everyone,
I'm trying to run the species ordination example on my mac, and it looks like I'm getting similar error messages to @evebohnett's post.
Running the example ends with the following error
18 warnings and 9 errors generated.
make: *** [VAST_v8_0_0.o] Error 1
Error in compile(paste0(Version, ".cpp")) : Compilation failed
The two errors being repeated are
error: no matching function for call to 'fmax'
error: no matching function for call to 'scalbn'
I'm using a mac with R 3.6.2
and clang8
installed
Following this issue, I adjusted my Makevars file to be:
##CC=/usr/local/clang8/bin/clang
##CXX=/usr/local/clang8/bin/clang++
CC=gcc
CXX=/usr/local/bin/g++-9
CXX1X=/usr/local/clang8/bin/clang++
CXX98=/usr/local/clang8/bin/clang++
CXX11=/usr/local/clang8/bin/clang++
CXX14=/usr/local/clang8/bin/clang++
CXX17=/usr/local/clang8/bin/clang++
LDFLAGS=-L/usr/local/clang8/lib
Installing previous versions of VAST doesn't seem to work for me, and I've confirmed that TMB is installed correctly following this post. Any ideas?
Can you try compiling the VAST .cpp file outside of the example script?
Still no luck. I tried
download.file("https://raw.githubusercontent.com/James-Thorson-NOAA/VAST/master/inst/executables/VAST_v8_0_0.cpp",
"VAST_v8_0_0.cpp")
Version="VAST_v8_0_0"
TMB::compile( paste0(Version,".cpp") )
It looks like I'm getting the same error as before
Hi @seanhardison1 I'm at a bit of a loss. Can you confirm you can run all the TMB examples? TMB::runExample(all=TRUE, clean=TRUE)
? Are you sure you have the latest TMB version?
@Cole-Monnahan-NOAA here's the error I get when running TMB::runExample(all=TRUE, clean=TRUE)
:
clang: error: unsupported option '-fopenmp'
make: *** [linreg_parallel.o] Error 1
Error in compile(paste0(name, ".cpp"), ...) : Compilation failed
In addition: Warning messages:
1: In file.remove(dynlib(name)) :
cannot remove file 'ar1xar1.so', reason 'No such file or directory'
2: In file.remove(paste0(name, ".o")) :
cannot remove file 'ar1xar1.o', reason 'No such file or directory'
3: In file.remove(dynlib(name)) :
cannot remove file 'linreg_parallel.so', reason 'No such file or directory'
4: In file.remove(paste0(name, ".o")) :
cannot remove file 'linreg_parallel.o', reason 'No such file or directory'
Timing stopped at: 0.018 0.015 0.036
I thought I had the latest version installed but maybe it's not installing properly?
The other examples ran? E.g., runExample('simple', clean=TRUE)
compiles and optimizes? It may just be that something isn't working with the parallel setup of that example. VAST doesn't use this so that shouldn't be an issue if the other examples work.
That example runs fine, although I do get a series of warning messages:
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
#pragma clang diagnostic pop
I'll give the other examples a shot! thanks
I get the same, sqrt is ambiguous, no function 'fmax', and no matching function to 'scalbn'
seeing Cheryl's Makevars addition (in https://github.com/James-Thorson-NOAA/VAST/issues/218 ), and adding those into my ~/.R/Makevars file did the trick apparently. Suspect it was the fortran variable and gcc in https://github.com/James-Thorson-NOAA/VAST/issues/218
I think I fixed these install issues on macOS by removing some functionality for MICE models (which used compiler options not available on macOS). Also fixed original issue by deprecating those Rmd examples, and moving to Wiki examples using high-level interface.
This line of both multi and single spp tutorials will not compile. Maybe I need to use an earlier version of VAST. I'm not sure.
TmbList = Build_TMB_Fn("TmbData"=TmbData, "RunDir"=DateFile, "Version"=Version, "RhoConfig"=RhoConfig, "loc_x"=Spatial_List$loc_x, "Method"=Method)
It says at the very bottom:
18 warnings and 12 errors generated. make: *** [VAST_v5_4_0.o] Error 1 Error in compile(paste0(Version, ".cpp")) : Compilation failed
Here's the rest of what should have been the compilation running.... clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Users/apple/Library/R/3.4/library/TMB/include -I/Users/apple/Library/R/3.4/library/RcppEigen/include -DTMB_SAFEBOUNDS -DLIB_UNLOAD=R_unload_VAST_v5_4_0 -DTMB_LIB_INIT=R_init_VAST_v5_4_0 -I/usr/local/include -fPIC -Wall -g -O2 -c VAST_v5_4_0.cpp -o VAST_v5_4_0.o In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:1: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Core:535: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:2: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/LU:47: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:3: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Cholesky:12: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Jacobi:29: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:3: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Cholesky:43: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:4: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/QR:17: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Householder:27: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:5: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/SVD:48: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:6: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Geometry:58: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:53: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Dense:7: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Eigenvalues:58: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:26: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/SparseCore:66: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:27: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/OrderingMethods:71: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:29: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/SparseCholesky:43: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:32: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/SparseQR:35: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
In file included from VAST_v5_4_0.cpp:1: In file included from /Users/apple/Library/R/3.4/library/TMB/include/TMB.hpp:54: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/Sparse:33: In file included from /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/IterativeLinearSolvers:46: /Users/apple/Library/R/3.4/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
pragma clang diagnostic pop
VAST_v5_4_0.cpp:671:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if( (Options_vec(8)==1) ){