Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g++: command not found & make: Error 127 #334

Open
Blevy2 opened this issue Jul 18, 2022 · 5 comments
Open

g++: command not found & make: Error 127 #334

Blevy2 opened this issue Jul 18, 2022 · 5 comments

Comments

@Blevy2
Copy link

Blevy2 commented Jul 18, 2022

Hi everyone,

I think I may be having a dependency issue, but I am at a loss about what it is and how to correct it. It started last week when an error made me believe I needed to reinstall INLA. Along the way I have removed and reinstalled a number of packages including VAST, INLA, sp, and TMB. I have tried to align my packages with what was working for me before and currently have the following versions installed:

VAST 3.9.1
TMB 1.7.22
sp 1.4.7
FishStatsUtils 2.11.0

The above package combination previously worked for me with VAST 3.8.0 so I tried rolling back to VAST 3.8.0 but am still coming up with the below error. I cannot find any information online related to this error so any help you could provide is very much welcomed.

Thank you,

Ben Levy

Edit 1: I should also mention that I recently updated to R 4.2.1 as part of reinstalling INLA. Might that be the problem?

Edit 2: I will also add that I am working on a government issued Windows machine.

image

@Blevy2
Copy link
Author

Blevy2 commented Jul 18, 2022

I may have resolved this problem. It looks like rolling back to R version 4.1.3 worked.

I was able to successfully move past "Making TMB object" with the following R and package versions:

R version 4.1.3
VAST 3.9.0
TMB 1.8.1
sp 1.5.0
FishStatsUtils 2.11.0

Ben

@jlmorano
Copy link

I am having the same problem, but I haven't been able to work around it no matter what version combos of R, VAST, and INLA I do. I think INLA is the source because I haven't been able to figure out which previous version of INLA I had been using without trouble. INLA 22.05.03 and 22.05.07 are not it.

@Blevy2
Copy link
Author

Blevy2 commented Aug 1, 2022

I recently had a few nasty compatibility issues that were tough to move past. I thought they were related to INLA and the version of R I was using. What is currently working for me are the versions I listed above along with INLA 22.05.07. A colleague of mine who has been digging deep with VAST also recently struggled with INLA dependencies and specifically recommended 22.05.07 to me.

@slarge
Copy link

slarge commented Jan 10, 2023

I'll add my experience to this thread. I updated to R 4.2.2 and got the same "Error 127" as @Blevy2 (see SessionInfo() at the bottom for package versions). Running the simple univariate EBS_pollock model with different VAST versions, I am able to compile and run the model with VAST version "VAST_v13_0_0". However, the following VAST versions result in the same "Error 127" ( "VAST_v13_1_0", "VAST_V14_0_0", and "VAST_v14_1_0"). @James-Thorson-NOAA , have you seen this before? I didn't see any other issues where R4.2.2 and VAST >13_0_0 don't get along.

`

Load package

library(VAST)

load data set

example = load_example( data_set="EBS_pollock" )

Make settings (turning off bias.correct to save time for example)

settings = make_settings( n_x = 100,
Region = example$Region,
purpose = "index2",
bias.correct = FALSE )

For some reason I need to make sure Rtools has path properly set, else TMB won't compile

Sys.setenv(PATH = paste("C:/Rtools/bin", Sys.getenv("PATH"), sep=";"))
Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")

Run model

fit = fit_model( settings = settings,
Lat_i = example$sampling_data[,'Lat'],
Lon_i = example$sampling_data[,'Lon'],
t_i = example$sampling_data[,'Year'],
b_i = example$sampling_data[,'Catch_KG'],
Version = "VAST_v14_0_1",
a_i = example$sampling_data[,'AreaSwept_km2'] )
`

Writing output from fit_model in directory: C:/Users/scott.large/Documents/projects/zoopDFA/

Making extrapolation-grid

Using strata All_areas
For the UTM conversion, automatically detected zone 2.

Reducing extrapolation-grid from 38284 to 2000 cells for Region(s): eastern_bering_sea

Loaded from C:/Users/scott.large/Documents/projects/zoopDFA//Kmeans_extrapolation-2000.RData

Making spatial information

Loaded from C:/Users/scott.large/Documents/projects/zoopDFA//Kmeans_knots-100.RData

Making data object

Coercing b_i to have units kg; I recommend using explicit units, e.g., as_units(b_i,'kg'), as_units(b_i,'count') or as_units(b_i,unitless)Coercinga_ito have unitskm^2; I recommend using explicit units, e.g., as_units(a_i,'km^2')oras_units(a_i,unitless)`
FieldConfig_input is:
Component_1 Component_2
Omega -2 -2
Epsilon -2 -2
Beta -2 -2
Epsilon_time -3 -3
OverdispersionConfig_input is:
Eta1 Eta2
-1 -1
Calculating range shift for stratum #1:

Making TMB object

C:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/Users/scott.large/AppData/Local/Programs/R/R-4.2.2/include" -DNDEBUG -I"C:/Users/SCOTT1.LAR/AppData/Local/Programs/R/R-421.2/library/TMB/include" -I"C:/Users/SCOTT1.LAR/AppData/Local/Programs/R/R-421.2/library/RCPPEI~1/include" -DTMB_SAFEBOUNDS -DTMB_EIGEN_DISABLE_WARNINGS -DLIB_UNLOAD=R_unload_VAST_v14_0_1_TMBad -DTMB_LIB_INIT=R_init_VAST_v14_0_1_TMBad -DTMBAD_FRAMEWORK -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -Wno-ignored-attributes -O2 -mfpmath=sse -msse2 -mstackrealign -c VAST_v14_0_1_TMBad.cpp -o VAST_v14_0_1_TMBad.o
/bin/sh: line 1: C:/Rtools/mingw_64/bin/g++: No such file or directory
make: *** [C:/Users/scott.large/AppData/Local/Programs/R/R-4.2.2/etc/x64/Makeconf:260: VAST_v14_0_1_TMBad.o] Error 127

sessionInfo()

sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] VAST_3.10.0 FishStatsUtils_2.12.0 units_0.8-1 TMB_1.9.1

loaded via a namespace (and not attached):
[1] rnaturalearth_0.1.0 Rcpp_1.0.9 here_1.0.1 lattice_0.20-45 class_7.3-20 rprojroot_2.0.3 utf8_1.2.2
[8] R6_2.5.1 cellranger_1.1.0 plyr_1.8.8 rnaturalearthdata_0.1.0 RSQLite_2.2.20 e1071_1.7-12 ggplot2_3.4.0
[15] pillar_1.8.1 ThorsonUtilities_1.0 rlang_1.0.6 googlesheets4_1.0.1 rstudioapi_0.14 raster_3.6-13 blob_1.2.3
[22] Matrix_1.5-1 splines_4.2.2 rgdal_1.6-3 googledrive_2.0.0 readr_2.1.3 stringr_1.5.0 igraph_1.3.5
[29] bit_4.0.5 munsell_0.5.0 proxy_0.4-27 compiler_4.2.2 pkgconfig_2.0.3 shape_1.4.6 marmap_1.0.9
[36] tidyselect_1.2.0 tibble_3.1.8 RANN_2.6.1 codetools_0.2-18 fansi_1.0.3 TMBhelper_1.4.0 dplyr_1.0.10
[43] tzdb_0.3.0 sf_1.0-9 grid_4.2.2 gtable_0.3.1 lifecycle_1.0.3 DBI_1.1.3 adehabitatMA_0.3.15
[50] magrittr_2.0.3 scales_1.2.1 ncdf4_1.21 KernSmooth_2.23-20 cli_3.5.0 stringi_1.7.8 cachem_1.0.6
[57] INLA_22.12.16 reshape2_1.4.4 fs_1.5.2 sp_1.5-1 ellipsis_0.3.2 generics_0.1.3 vctrs_0.5.1
[64] tools_4.2.2 bit64_4.0.5 glue_1.6.2 purrr_1.0.0 splancs_2.01-43 hms_1.1.2 abind_1.4-5
[71] parallel_4.2.2 fastmap_1.1.0 colorspace_2.0-3 gargle_1.2.1 gdistance_1.6 terra_1.6-47 classInt_0.4-8
[78] memoise_2.0.1 usethis_2.1.6

@James-Thorson-NOAA
Copy link
Owner

There might be two issues here, I can't really tell.

@Blevy2 it sounds like you're having some RINLA install issues, and consider trying the steps here

@slarge it seems like you're having some TMB compilation issues (that's what Error-127 means). I can't replicate the problem on my machine, but will try to look around a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants