asl / rssa

R package for Singular Spectrum Analysis
55 stars 27 forks source link

Installation issue in Linux #224

Closed SenseMaster closed 8 years ago

SenseMaster commented 8 years ago

Rstudio 0.99.902 R 3.3.1 (2016-06-21) OS Ubuntu 16.04.1

Can't install Rssa package:

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I. -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c hbhankel.c -o hbhankel.o hbhankel.c: In function ‘initialize_hbhmat’: hbhankel.c:469:47: warning: passing argument 4 of ‘initialize_circulant’ makes integer from pointer without a cast [-Wint-conversion] initialize_circulant(h, REAL(F), length(N), INTEGER(N), INTEGER(window), LOGICAL(circular)); ^ hbhankel.c:351:13: note: expected ‘R_lent {aka int}’ but argument is of type ‘int ’ static void initialize_circulant(hbhankel_matrix h, ^ hbhankel.c:469:59: warning: passing argument 5 of ‘initialize_circulant’ makes integer from pointer without a cast [-Wint-conversion] initialize_circulant(h, REAL(F), length(N), INTEGER(N), INTEGER(window), LOGICAL(circular)); ^ hbhankel.c:351:13: note: expected ‘R_len_t {aka int}’ but argument is of type ‘int ’ static void initialize_circulant(hbhankel_matrix h, ^ hbhankel.c:469:76: warning: passing argument 6 of ‘initialize_circulant’ makes integer from pointer without a cast [-Wint-conversion] initialize_circulant(h, REAL(F), length(N), INTEGER(N), INTEGER(window), LOGICAL(circular)); ^ hbhankel.c:351:13: note: expected ‘R_len_t {aka int}’ but argument is of type ‘int ’ static void initialize_circulant(hbhankel_matrix h, ^ hbhankel.c:469:3: error: too few arguments to function ‘initialize_circulant’ initialize_circulant(h, REAL(F), length(N), INTEGER(N), INTEGER(window), LOGICAL(circular)); ^ hbhankel.c:351:13: note: declared here static void initialize_circulant(hbhankel_matrix h, ^ hbhankel.c: In function ‘hbhmatmul’: hbhankel.c:579:5: warning: implicit declaration of function ‘matmul’ [-Wimplicit-function-declaration] matmul(REAL(Y), REAL(v), h, LOGICAL(transposed)[0]); ^ hbhankel.c: In function ‘convolveN’: hbhankel.c:631:3: error: unknown type name ‘fftw_complex’ fftw_complex ox, oy; ^ hbhankel.c:632:3: error: unknown type name ‘fftw_plan’ fftw_plan r2c_plan, c2r_plan; ^ hbhankel.c:637:20: warning: implicit declaration of function ‘fftwmalloc’ [-Wimplicit-function-declaration] circ = (double) fftwmalloc(pN * sizeof(double)); ^ hbhankel.c:637:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] circ = (double) fftw_malloc(pN * sizeof(double)); ^ hbhankel.c:638:9: error: ‘fftw_complex’ undeclared (first use in this function) ox = (fftwcomplex) fftw_malloc(phN * sizeof(fftw_complex)); ^ hbhankel.c:638:9: note: each undeclared identifier is reported only once for each function it appears in hbhankel.c:638:22: error: expected expression before ‘)’ token ox = (fftwcomplex) fftw_malloc(phN * sizeof(fftw_complex)); ^ hbhankel.c:639:22: error: expected expression before ‘)’ token oy = (fftwcomplex) fftw_malloc(phN * sizeof(fftw_complex)); ^ hbhankel.c:646:14: warning: implicit declaration of function ‘fftw_plan_dft_r2c’ [-Wimplicit-function-declaration] r2c_plan = fftw_plan_dft_r2c(rank, revN, circ, ox, FFTW_ESTIMATE); ^ hbhankel.c:646:54: error: ‘FFTW_ESTIMATE’ undeclared (first use in this function) r2c_plan = fftw_plan_dft_r2c(rank, revN, circ, ox, FFTW_ESTIMATE); ^ hbhankel.c:647:14: warning: implicit declaration of function ‘fftw_plan_dft_c2r’ [-Wimplicit-function-declaration] c2r_plan = fftw_plan_dft_c2r(rank, revN, ox, circ, FFTW_ESTIMATE); ^ hbhankel.c:652:3: warning: implicit declaration of function ‘fill_subarray’ [-Wimplicit-function-declaration] fill_subarray(circ, REAL(x), rank, N, INTEGER(x_dim), 1); ^ hbhankel.c:655:3: warning: implicit declaration of function ‘fftw_execute_dft_r2c’ [-Wimplicit-function-declaration] fftw_execute_dft_r2c(r2c_plan, circ, ox); ^ hbhankel.c:674:3: warning: implicit declaration of function ‘fftw_execute_dft_c2r’ [-Wimplicit-function-declaration] fftw_execute_dft_c2r(c2r_plan, oy, circ); ^ hbhankel.c:684:3: warning: implicit declaration of function ‘fftw_free’ [-Wimplicit-function-declaration] fftw_free(ox); ^ /usr/lib/R/etc/Makeconf:132: ошибка выполнения рецепта для цели «hbhankel.o» make: *\ [hbhankel.o] Ошибка 1 ERROR: compilation failed for package ‘Rssa’

asl commented 8 years ago

Please consider installing FFTW headers / libraries. Usually this is done by installing libfftw-dev or similar package.

SenseMaster commented 8 years ago

Thanks! This helps: sudo apt-get install libfftw3-dev