2

I need to recompile some old functions to work again (I had no problem with them back in 2016). Here are the commands and the error msg:

system("R CMD SHLIB rk4_mod_r.f90 derive_rossler.f90 simulate_rk4.f90 -o simulate_rossler_rk4.so");    
gfortran -arch x86_64  -fPIC -g -O2  -c  rk4_mod_r.f90 -o rk4_mod_r.o
gfortran -arch x86_64  -fPIC -g -O2  -c  derive_rossler.f90 -o derive_rossler.o
gfortran -arch x86_64  -fPIC -g -O2  -c  simulate_rk4.f90 -o simulate_rk4.o
gfortran -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/clang4/lib -o simulate_rossler_rk4.so rk4_mod_r.o derive_rossler.o simulate_rk4.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

ld: framework not found CoreFoundation
collect2: error: ld returned 1 exit status
make: *** [simulate_rossler_rk4.so] Error 1

~.R/Makevars is as follows

VER=-8
CC=gcc$(VER)
CXX=g++$(VER)
CXX11=g++$(VER)
CXX14=g++$(VER)
CXX17=g++$(VER)
CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
FLIBS=-L/usr/local/Cellar/gcc/8.3.0/lib/gcc/8

I noticed that -L/usr/local/clang4/lib is there. I am not sure if that is correct. I tried the same command by replacing it to -L/usr/local/Cellar/gcc/8.3.0/lib/gcc/8 to no avail.

What am I missing?

Many thanks,

Ed

massisenergy
  • 1,764
  • 3
  • 14
  • 25
Ed Mendes
  • 267
  • 1
  • 3
  • 9
  • I occurred same error output for gcc while gfortran in your case with gcc-9.3.0, clang-1103.0.32.29, still searching for some additional output. – Oleksii Kyslytsyn Apr 08 '20 at 13:59
  • There are some updates for this question at: http://thetechawesomeness.ideasmatter.info/configuring-alternative-compilers-in-macos.html – Oleksii Kyslytsyn Apr 20 '20 at 09:59

0 Answers0