asl / rssa

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

Error during installation #215

Closed torm89 closed 8 years ago

torm89 commented 8 years ago

I'm try to install Rssa in R but I got error during compilation.

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_len_t {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 ‘fftw_malloc’ [-Wimplicit-function-declaration]
   circ = (double*) fftw_malloc(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 = (fftw_complex*) 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 = (fftw_complex*) fftw_malloc(phN * sizeof(fftw_complex));
                      ^
hbhankel.c:639:22: error: expected expression before ‘)’ token
   oy = (fftw_complex*) 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/lib64/R/etc/Makeconf:134: recipe for target 'hbhankel.o' failed
make: *** [hbhankel.o] Error 1
ERROR: compilation failed for package ‘Rssa’
asl commented 8 years ago

Hello

Thank you for your interest in Rssa.

Could you please post the full installation log?

torm89 commented 8 years ago

Of course.

> install.packages("Rssa")
Installing package into ‘/home/torm/FIBR/maszynka/packrat/lib/x86_64-unknown-linux-gnu/3.2.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/Rssa_0.13.tar.gz'
Content type 'application/x-gzip' length 1033189 bytes (1008 KB)
==================================================
downloaded 1008 KB

* installing *source* package ‘Rssa’ ...
** package ‘Rssa’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fftw3.h usability... no
checking fftw3.h presence... no
checking for fftw3.h... no
checking for fftw_execute in -lfftw3... no
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/init.R
config.status: creating src/config.h
** libs
gcc -I/usr/include/R/ -DNDEBUG  -D_FORTIFY_SOURCE=2   -I. -I. -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4  -c extmat.c -o extmat.o
gcc -I/usr/include/R/ -DNDEBUG  -D_FORTIFY_SOURCE=2   -I. -I. -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4  -c hankel.c -o hankel.o
gcc -I/usr/include/R/ -DNDEBUG  -D_FORTIFY_SOURCE=2   -I. -I. -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4  -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_len_t {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 ‘fftw_malloc’ [-Wimplicit-function-declaration]
   circ = (double*) fftw_malloc(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 = (fftw_complex*) 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 = (fftw_complex*) fftw_malloc(phN * sizeof(fftw_complex));
                      ^
hbhankel.c:639:22: error: expected expression before ‘)’ token
   oy = (fftw_complex*) 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/lib64/R/etc/Makeconf:134: recipe for target 'hbhankel.o' failed
make: *** [hbhankel.o] Error 1
ERROR: compilation failed for package ‘Rssa’
* removing ‘/home/ffff/rrrr/gggg/packrat/lib/x86_64-unknown-linux-gnu/3.2.1/Rssa’
Warning in install.packages :
  installation of package ‘Rssa’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmp4EvIig/downloaded_packages’
asl commented 8 years ago

Oh, ok. It's a bug we fixed afterwards. You'd either wait for the next version, or instal FFTW (via libfftw-dev or similar package)

torm89 commented 8 years ago

I've installed fftw that Rssa.

большо́е спаси́бо!