franzmohr / bvartools

Functions for Bayesian inference of vector autoregressive and vector error correction models
30 stars 11 forks source link

Error when updating #2

Closed Rosavanderdrift closed 1 year ago

Rosavanderdrift commented 4 years ago

When I try to update the bvartools package in R from version 0.03 to 0.1.0. I receive the following error:

> install.packages("bvartools")
also installing the dependencies ‘coda’, ‘Rcpp’, ‘RcppArmadillo’

  There is a binary version available but the source version is later:
          binary source needs_compilation
bvartools  0.0.3  0.1.0              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/coda_0.19-3.tgz'
Content type 'application/x-gzip' length 320842 bytes (313 KB)
==================================================
downloaded 313 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/Rcpp_1.0.5.tgz'
Content type 'application/x-gzip' length 3215939 bytes (3.1 MB)
==================================================
downloaded 3.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/RcppArmadillo_0.9.900.3.0.tgz'
Content type 'application/x-gzip' length 1871293 bytes (1.8 MB)
==================================================
downloaded 1.8 MB

The downloaded binary packages are in
    /var/folders/y8/3xvvn_bx4zq6p1nv4tmt51580000gn/T//RtmpYiLLLM/downloaded_packages
installing the source package ‘bvartools’

trying URL 'https://cran.rstudio.com/src/contrib/bvartools_0.1.0.tar.gz'
Content type 'application/x-gzip' length 337692 bytes (329 KB)
==================================================
downloaded 329 KB

* installing *source* package ‘bvartools’ ...
** package ‘bvartools’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c bvaralg.cpp -o bvaralg.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c bvecalg.cpp -o bvecalg.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c bvs.cpp -o bvs.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c ir.cpp -o ir.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c kalman_dk.cpp -o kalman_dk.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c loglik_normal.cpp -o loglik_normal.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c post_coint_kls.cpp -o post_coint_kls.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c post_coint_kls_sur.cpp -o post_coint_kls_sur.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c post_normal.cpp -o post_normal.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c post_normal_sur.cpp -o post_normal_sur.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c svss.cpp -o svss.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c vardecomp.cpp -o vardecomp.o
clang++ -mmacosx-version-min=10.13 -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/usr/local/lib -o bvartools.so RcppExports.o bvaralg.o bvecalg.o bvs.o ir.o kalman_dk.o loglik_normal.o post_coint_kls.o post_coint_kls_sur.o post_normal.o post_normal_sur.o svss.o vardecomp.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -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 -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: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bvartools.so] Error 1
ERROR: compilation failed for package ‘bvartools’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/bvartools’
Warning in install.packages :
  installation of package ‘bvartools’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/y8/3xvvn_bx4zq6p1nv4tmt51580000gn/T/RtmpYiLLLM/downloaded_packages’

Do you perhaps have any idea how I could solve this?

Thanks in advance! Rosa

franzmohr commented 4 years ago

Hi Rosa,

Maybe try to install the development version for now: devtools::install_github("franzmohr/bvartools") Except for the version number it is idential to the new CRAN version.

I am not sure how to deal with the Fortran issue at the moment. To me it seems that you miss the library. However, the package was updated today and I think that not all versions for Linux/Windows/Mac have been updated on CRAN yet. Maybe check the table on https://cran.r-project.org/web/checks/check_results_bvartools.html during the next 12-48 hours. Once every version is 0.1.0, try the update again (or deinstall the development version and reinstall the package from CRAN).

Best, Franz

franzmohr commented 4 years ago

Hi Rosa, Just checking: Does the installation work now on your device? Most of the new versions of bvartools should now be on CRAN and no installation from source should be necessary. Best, Franz

Rosavanderdrift commented 4 years ago

Hi Franz,

On my macbook it still does not seem to work. I tried to install the development version but I received an error. Maybe because I don't have the most recent version of Xcode? On my windows laptop bvartools works perfectly fine, thank you so much for your help!

Kind regards, Rosa

franzmohr commented 4 years ago

Thank you for the update, Rosa!

After taking a brief look at https://cran.r-project.org/bin/macosx/ there really seems to be an issue with Xcode or something Mac-related on your device. I think the "tools" directory of the site contains some useful information for you.

Best, Franz