acorg / Racmacs

Racmacs R package for performing antigenic cartography
https://acorg.github.io/Racmacs/
GNU Affero General Public License v3.0
20 stars 9 forks source link

Racmacs install failure - /usr/local/bin/g++-11: No such file or directory #138

Closed silca87 closed 1 year ago

silca87 commented 1 year ago

Hi!

I followed all your guidelines to install gcc through home brew and then generated a folder .R with the compiler file specified here: https://github.com/acorg/Racmacs

Here is the ERROR code that I get from R:

devtools::install_github("acorg/Racmacs")

(...)

1 warning generated. clang++ -arch arm64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o Racmacs.so Racmacs_wrappers.o Racmacs_wrappers_antigens.o Racmacs_wrappers_optimizations.o Racmacs_wrappers_plotspec.o Racmacs_wrappers_sera.o RcppExports.o ac_bootstrap.o ac_dimension_test.o ac_hemi_test.o ac_matching.o ac_merge.o ac_move_trapped_points.o ac_optim_map_stress.o ac_optimization.o ac_optimize_ag_reactivity.o ac_stress.o ac_stress_blobs.o ac_titers.o ac_utils.o acmap_map.o acmap_optimization.o acmap_point.o acmap_titers.o json_assert.o json_read_to_acmap.o json_write_from_acmap.o procrustes.o utils.o utils_error.o utils_euc_dist.o utils_interpolation.o utils_transformation.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1 -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1' ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib' ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Racmacs.so] Error 1 ERROR: compilation failed for package ‘Racmacs’

I am not sure how to solve this issue. Please advise!

Thank you immensely in advance

shwilks commented 1 year ago

There is now some updated info on setting up your compilation toolchain at acorg.github.io/Racmacs but you can also now install a pre-compiled binary version from CRAN with

install.packages("Racmacs")