hallowkm / RxODE

RxODE is an R package that facilitates easy simulations in R
20 stars 13 forks source link

Mac compile error #10

Open pascalschulthess opened 7 years ago

pascalschulthess commented 7 years ago

I wanted to run your example on my Mac (10.12.3, R3.3, RStudio1.0.136) and executing

mod1 <- RxODE(model = ode, modName = "mod1", wd = work)

resulted in the following error:

clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RxODE/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c /var/folders/0f/n_bwmfvs1890_5p8_tbnzsjr1tn9gk/T//RtmpTcYi6R/Rx_intro-9f9a7bb59b53/mod1.d/mod1.c -o /var/folders/0f/n_bwmfvs1890_5p8_tbnzsjr1tn9gk/T//RtmpTcYi6R/Rx_intro-9f9a7bb59b53/mod1.d/mod1.o clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RxODE/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c /var/folders/0f/n_bwmfvs1890_5p8_tbnzsjr1tn9gk/T//RtmpTcYi6R/Rx_intro-9f9a7bb59b53/mod1.d/call_dvode.c -o /var/folders/0f/n_bwmfvs1890_5p8_tbnzsjr1tn9gk/T//RtmpTcYi6R/Rx_intro-9f9a7bb59b53/mod1.d/call_dvode.o clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o /var/folders/0f/n_bwmfvs1890_5p8_tbnzsjr1tn9gk/T//RtmpTcYi6R/Rx_intro-9f9a7bb59b53/mod1.d/mod1.so /var/folders/0f/n_bwmfvs1890_5p8_tbnzsjr1tn9gk/T//RtmpTcYi6R/Rx_intro-9f9a7bb59b53/mod1.d/mod1.o /var/folders/0f/n_bwmfvs1890_5p8_tbnzsjr1tn9gk/T//RtmpTcYi6R/Rx_intro-9f9a7bb59b53/mod1.d/call_dvode.o -L/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RxODE/libs/ -lodeaux -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2' ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [/var/folders/0f/n_bwmfvs1890_5p8_tbnzsjr1tn9gk/T//RtmpTcYi6R/Rx_intro-9f9a7bb59b53/mod1.d/mod1.so] Error 1 Error in cmpMgr$compile() : error loading dll file /var/folders/0f/n_bwmfvs1890_5p8_tbnzsjr1tn9gk/T//RtmpTcYi6R/Rx_intro-9f9a7bb59b53/mod1.d/mod1.so

Hope you can help...

wwang-at-github commented 7 years ago

to use RxODE, you'll need to install gfortran on your Mac. you may use "R CMD config FC" to check the installation status of gfortran on your Mac.

Below is the compiler msg I got when compiling RxODE with proper configuration:

m1 = RxODE(ode) clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RxODE/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c /Users/annie/annie.d/annie.c -o /Users/annie/annie.d/annie.o clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RxODE/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c /Users/annie/annie.d/call_dvode.c -o /Users/annie/annie.d/call_dvode.o clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o /Users/annie/annie.d/annie.so /Users/annie/annie.d/annie.o /Users/annie/annie.d/call_dvode.o -L/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RxODE/libs/ -lodeaux -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation