Failed to install R package in Mac
The warning is harmless. The real issue is that the linker doesn't find the fortran libs:
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0' ld: warning: directory not found for option '-L/usr/local/gfortran/lib' ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0' ld: warning: directory not found for option '-L/usr/local/gfortran/lib' ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation)
This suggests that you have an installation problem with your compiler. Compiling source package on Mac can be quite tricky if you want them to work with the CRAN binaries of R, especially if fortran is involved. See Simon's documents and downloads at mac.r-project.org. However, it is not normally an issue to instal tseries as a binary package: R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid" ....
library(tseries)
Error in library(tseries) : there is no package called ?tseries?
install.packages("tseries")
--- Please select a CRAN mirror for use in this session --- also installing the dependencies ?xts?, ?TTR?, ?curl?, ?quadprog?, ?zoo?, ?quantmod? trying URL 'https://cloud.r-project.org/bin/macosx/contrib/4.2/xts_0.12.1.tgz' Content type 'application/x-gzip' length 928219 bytes (906 KB) ================================================== downloaded 906 KB .... trying URL 'https://cloud.r-project.org/bin/macosx/contrib/4.2/tseries_0.10-51.tgz' Content type 'application/x-gzip' length 416419 bytes (406 KB) ================================================== downloaded 406 KB The downloaded binary packages are in /var/folders/h0/hzzhnnfd1gx7399sx_cwlhpw0000gn/T//RtmpIrrODM/downloaded_packages
So, there appears to be something special about your setup. -pd
On 18 Aug 2022, at 12:20 , Christofer Bogaso <bogaso.christofer at gmail.com> wrote:
Hi,
I was to trying to install a package called tseries on my Mac desktop
but got below error message
Warning: Unused variable 'i' declared at (1) [-Wunused-variable]
dsumsl.f:2841:36:
2841 | LOGICAL FUNCTION DSTOPX(IDUMMY)
| 1
Warning: Unused dummy argument 'idummy' at (1) [-Wunused-dummy-argument]
clang -mmacosx-version-min=10.13
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/usr/local/include -fPIC -Wall -g -O2 -c formats.c -o formats.o
clang -mmacosx-version-min=10.13
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/usr/local/include -fPIC -Wall -g -O2 -c garch.c -o garch.o
clang -mmacosx-version-min=10.13
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/usr/local/include -fPIC -Wall -g -O2 -c init.c -o init.o
clang -mmacosx-version-min=10.13
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/usr/local/include -fPIC -Wall -g -O2 -c ppsum.c -o ppsum.o
clang -mmacosx-version-min=10.13
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/usr/local/include -fPIC -Wall -g -O2 -c tsutils.c -o tsutils.o
clang -mmacosx-version-min=10.13 -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
tseries.so arma.o bdstest.o boot.o cfuncs.o dsumsl.o formats.o garch.o
init.o ppsum.o tsutils.o
-L/Library/Frameworks/R.framework/Resources/lib -lRblas
-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0
-L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0
-L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
ld: warning: directory not found for option
'-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: warning: directory not found for option
'-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tseries.so] Error 1
ERROR: compilation failed for package ?tseries?
* removing ?/Library/Frameworks/R.framework/Versions/4.0/Resources/library/tseries?
The downloaded source packages are in
?/private/var/folders/kk/prk1_r356_bfx33vn4cnmls00000gp/T/Rtmp29ceBu/downloaded_packages?
Warning message:
In install.packages("tseries") :
installation of package ?tseries? had non-zero exit status
Could you please help to resolve this
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com