kuwisdelu / matter

Out-of-core statistical computing and signal processing
http://www.cardinalmsi.org
54 stars 4 forks source link

Installation fails with version 2.2.0, from Bioconductor and from github #15

Closed Woosah closed 1 year ago

Woosah commented 1 year ago

Hello!

I struggle to install matter on my arch-linux machine. I tried with BiocManager::install("matter") (Version 3.17 as I am running R 4.3), and I tried with remotes::install_github("https://github.com/kuwisdelu/matter/"), but both gave me the same error message:

Bioconductor version 3.17 (BiocManager 1.30.21), R 4.3.0 (2023-04-21)
Installing package(s) 'matter'
trying URL 'https://bioconductor.org/packages/3.17/bioc/src/contrib/matter_2.2.0.tar.gz'
Content type 'application/x-gzip' length 360010 bytes (351 KB)
==================================================
downloaded 351 KB

* installing *source* package ‘matter’ ...
** using staged installation
** libs
using C++ compiler: ‘g++ (GCC) 13.1.1 20230429’
g++ -std=gnu++17 -I"/usr/include/R/" -DNDEBUG   -I/usr/local/include    -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/r/src=/usr/src/debug/r -flto=auto -ffat-lto-objects  -c altrep.cpp -o altrep.o
In file included from atoms.h:8,
                 from matter.h:5,
                 from altrep.cpp:3:
coerce.h:71:19: error: ‘uint16_t’ was not declared in this scope
   71 | Rbyte coerce_cast(uint16_t x) {
      |                   ^~~~~~~~
coerce.h:1:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  +++ |+#include <cstdint>
    1 | #ifndef COERCE
coerce.h:71:7: warning: too many template headers for ‘coerce_cast’ (should be 0)
   71 | Rbyte coerce_cast(uint16_t x) {
      |       ^~~~~~~~~~~
coerce.h:71:30: error: expected ‘;’ before ‘{’ token
   71 | Rbyte coerce_cast(uint16_t x) {
      |                              ^~
      |                              ;
coerce.h:94:19: error: ‘uint32_t’ was not declared in this scope
   94 | Rbyte coerce_cast(uint32_t x) {
      |                   ^~~~~~~~
coerce.h:94:19: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h:94:7: warning: too many template headers for ‘coerce_cast’ (should be 0)
   94 | Rbyte coerce_cast(uint32_t x) {
      |       ^~~~~~~~~~~
coerce.h:94:30: error: expected ‘;’ before ‘{’ token
   94 | Rbyte coerce_cast(uint32_t x) {
      |                              ^~
      |                              ;
In file included from altrep.cpp:2:
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = unsigned char; Tin = long int]’:
matterDefines.h:115:17: error: ‘INT64_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  115 | #define NA_LONG INT64_MIN
      |                 ^~~~~~~~~
coerce.h:107:27: note: in expansion of macro ‘NA_LONG’
  107 |                 if ( x == NA_LONG )
      |                           ^~~~~~~
coerce.h: At global scope:
coerce.h:118:19: error: ‘uint64_t’ was not declared in this scope
  118 | Rbyte coerce_cast(uint64_t x) {
      |                   ^~~~~~~~
coerce.h:118:19: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h:118:7: warning: too many template headers for ‘coerce_cast’ (should be 0)
  118 | Rbyte coerce_cast(uint64_t x) {
      |       ^~~~~~~~~~~
coerce.h:118:30: error: expected ‘;’ before ‘{’ token
  118 | Rbyte coerce_cast(uint64_t x) {
      |                              ^~
      |                              ;
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = short int; Tin = int]’:
matterDefines.h:101:24: error: ‘INT16_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  101 | #define R_SHORT_MIN (1+INT16_MIN)
      |                        ^~~~~~~~~
coerce.h:155:18: note: in expansion of macro ‘R_SHORT_MIN’
  155 |         if ( x < R_SHORT_MIN || x > R_SHORT_MAX )
      |                  ^~~~~~~~~~~
matterDefines.h:102:21: error: ‘INT16_MAX’ was not declared in this scope
  102 | #define R_SHORT_MAX INT16_MAX
      |                     ^~~~~~~~~
coerce.h:155:37: note: in expansion of macro ‘R_SHORT_MAX’
  155 |         if ( x < R_SHORT_MIN || x > R_SHORT_MAX )
      |                                     ^~~~~~~~~~~
matterDefines.h:102:21: note: ‘INT16_MAX’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  102 | #define R_SHORT_MAX INT16_MAX
      |                     ^~~~~~~~~
coerce.h:155:37: note: in expansion of macro ‘R_SHORT_MAX’
  155 |         if ( x < R_SHORT_MIN || x > R_SHORT_MAX )
      |                                     ^~~~~~~~~~~
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = short int; Tin = double]’:
matterDefines.h:101:24: error: ‘INT16_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  101 | #define R_SHORT_MIN (1+INT16_MIN)
      |                        ^~~~~~~~~
coerce.h:166:18: note: in expansion of macro ‘R_SHORT_MIN’
  166 |         if ( x < R_SHORT_MIN || x > R_SHORT_MAX || !R_FINITE(x) )
      |                  ^~~~~~~~~~~
matterDefines.h:102:21: error: ‘INT16_MAX’ was not declared in this scope
  102 | #define R_SHORT_MAX INT16_MAX
      |                     ^~~~~~~~~
coerce.h:166:37: note: in expansion of macro ‘R_SHORT_MAX’
  166 |         if ( x < R_SHORT_MIN || x > R_SHORT_MAX || !R_FINITE(x) )
      |                                     ^~~~~~~~~~~
matterDefines.h:102:21: note: ‘INT16_MAX’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  102 | #define R_SHORT_MAX INT16_MAX
      |                     ^~~~~~~~~
coerce.h:166:37: note: in expansion of macro ‘R_SHORT_MAX’
  166 |         if ( x < R_SHORT_MIN || x > R_SHORT_MAX || !R_FINITE(x) )
      |                                     ^~~~~~~~~~~
coerce.h: At global scope:
coerce.h:178:1: error: ‘uint16_t’ does not name a type
  178 | uint16_t coerce_cast(int32_t x) {
      | ^~~~~~~~
coerce.h:178:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h:191:1: error: ‘uint16_t’ does not name a type
  191 | uint16_t coerce_cast(double x) {
      | ^~~~~~~~
coerce.h:191:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = int; Tin = short int]’:
matterDefines.h:100:18: error: ‘INT16_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  100 | #define NA_SHORT INT16_MIN
      |                  ^~~~~~~~~
coerce.h:215:19: note: in expansion of macro ‘NA_SHORT’
  215 |         if ( x == NA_SHORT )
      |                   ^~~~~~~~
coerce.h: At global scope:
coerce.h:222:21: error: ‘uint32_t’ was not declared in this scope
  222 | int32_t coerce_cast(uint32_t x) {
      |                     ^~~~~~~~
coerce.h:222:21: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h:222:9: warning: too many template headers for ‘coerce_cast’ (should be 0)
  222 | int32_t coerce_cast(uint32_t x) {
      |         ^~~~~~~~~~~
coerce.h:222:32: error: expected ‘;’ before ‘{’ token
  222 | int32_t coerce_cast(uint32_t x) {
      |                                ^~
      |                                ;
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = int; Tin = long int]’:
matterDefines.h:104:22: error: ‘INT32_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  104 | #define R_INT_MIN (1+INT32_MIN)
      |                      ^~~~~~~~~
coerce.h:233:18: note: in expansion of macro ‘R_INT_MIN’
  233 |         if ( x < R_INT_MIN || x > R_INT_MAX )
      |                  ^~~~~~~~~
matterDefines.h:105:19: error: ‘INT32_MAX’ was not declared in this scope
  105 | #define R_INT_MAX INT32_MAX
      |                   ^~~~~~~~~
coerce.h:233:35: note: in expansion of macro ‘R_INT_MAX’
  233 |         if ( x < R_INT_MIN || x > R_INT_MAX )
      |                                   ^~~~~~~~~
matterDefines.h:105:19: note: ‘INT32_MAX’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  105 | #define R_INT_MAX INT32_MAX
      |                   ^~~~~~~~~
coerce.h:233:35: note: in expansion of macro ‘R_INT_MAX’
  233 |         if ( x < R_INT_MIN || x > R_INT_MAX )
      |                                   ^~~~~~~~~
matterDefines.h:115:17: error: ‘INT64_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  115 | #define NA_LONG INT64_MIN
      |                 ^~~~~~~~~
coerce.h:235:27: note: in expansion of macro ‘NA_LONG’
  235 |                 if ( x != NA_LONG )
      |                           ^~~~~~~
coerce.h: At global scope:
coerce.h:244:21: error: ‘uint64_t’ was not declared in this scope
  244 | int32_t coerce_cast(uint64_t x) {
      |                     ^~~~~~~~
coerce.h:244:21: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h:244:9: warning: too many template headers for ‘coerce_cast’ (should be 0)
  244 | int32_t coerce_cast(uint64_t x) {
      |         ^~~~~~~~~~~
coerce.h:244:32: error: expected ‘;’ before ‘{’ token
  244 | int32_t coerce_cast(uint64_t x) {
      |                                ^~
      |                                ;
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = int; Tin = double]’:
matterDefines.h:104:22: error: ‘INT32_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  104 | #define R_INT_MIN (1+INT32_MIN)
      |                      ^~~~~~~~~
coerce.h:263:18: note: in expansion of macro ‘R_INT_MIN’
  263 |         if ( x < R_INT_MIN || x > R_INT_MAX || !R_FINITE(x) )
      |                  ^~~~~~~~~
matterDefines.h:105:19: error: ‘INT32_MAX’ was not declared in this scope
  105 | #define R_INT_MAX INT32_MAX
      |                   ^~~~~~~~~
coerce.h:263:35: note: in expansion of macro ‘R_INT_MAX’
  263 |         if ( x < R_INT_MIN || x > R_INT_MAX || !R_FINITE(x) )
      |                                   ^~~~~~~~~
matterDefines.h:105:19: note: ‘INT32_MAX’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  105 | #define R_INT_MAX INT32_MAX
      |                   ^~~~~~~~~
coerce.h:263:35: note: in expansion of macro ‘R_INT_MAX’
  263 |         if ( x < R_INT_MIN || x > R_INT_MAX || !R_FINITE(x) )
      |                                   ^~~~~~~~~
coerce.h: At global scope:
coerce.h:275:1: error: ‘uint32_t’ does not name a type
  275 | uint32_t coerce_cast(int32_t x) {
      | ^~~~~~~~
coerce.h:275:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h:288:1: error: ‘uint32_t’ does not name a type
  288 | uint32_t coerce_cast(double x) {
      | ^~~~~~~~
coerce.h:288:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = long int; Tin = int]’:
matterDefines.h:115:17: error: ‘INT64_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  115 | #define NA_LONG INT64_MIN
      |                 ^~~~~~~~~
coerce.h:305:24: note: in expansion of macro ‘NA_LONG’
  305 |                 return NA_LONG;
      |                        ^~~~~~~
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = long int; Tin = double]’:
matterDefines.h:115:17: error: ‘INT64_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  115 | #define NA_LONG INT64_MIN
      |                 ^~~~~~~~~
coerce.h:316:24: note: in expansion of macro ‘NA_LONG’
  316 |                 return NA_LONG;
      |                        ^~~~~~~
coerce.h: At global scope:
coerce.h:324:1: error: ‘uint64_t’ does not name a type
  324 | uint64_t coerce_cast(int32_t x) {
      | ^~~~~~~~
coerce.h:324:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h:338:1: error: ‘uint64_t’ does not name a type
  338 | uint64_t coerce_cast(double x) {
      | ^~~~~~~~
coerce.h:338:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = double; Tin = short int]’:
matterDefines.h:100:18: error: ‘INT16_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  100 | #define NA_SHORT INT16_MIN
      |                  ^~~~~~~~~
coerce.h:364:19: note: in expansion of macro ‘NA_SHORT’
  364 |         if ( x == NA_SHORT )
      |                   ^~~~~~~~
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = double; Tin = long int]’:
matterDefines.h:115:17: error: ‘INT64_MIN’ was not declared in this scope; did you mean ‘INT_MIN’?
  115 | #define NA_LONG INT64_MIN
      |                 ^~~~~~~~~
coerce.h:380:19: note: in expansion of macro ‘NA_LONG’
  380 |         if ( x == NA_LONG )
      |                   ^~~~~~~
atoms.h: In member function ‘size_t Atoms::get_atom(T*, int, index_t, size_t, int)’:
atoms.h:324:58: error: ‘uint16_t’ was not declared in this scope
  324 |                                         return read_atom<uint16_t,T>(ptr, atom, pos, size, stride);
      |                                                          ^~~~~~~~
atoms.h:10:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    9 | #include "drle.h"
  +++ |+#include <cstdint>
   10 | 
atoms.h:328:58: error: ‘uint32_t’ was not declared in this scope
  328 |                                         return read_atom<uint32_t,T>(ptr, atom, pos, size, stride);
      |                                                          ^~~~~~~~
atoms.h:328:58: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
atoms.h:332:58: error: ‘uint64_t’ was not declared in this scope
  332 |                                         return read_atom<uint64_t,T>(ptr, atom, pos, size, stride);
      |                                                          ^~~~~~~~
atoms.h:332:58: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
atoms.h: In member function ‘size_t Atoms::set_atom(T*, int, index_t, size_t, int)’:
atoms.h:353:61: error: ‘uint16_t’ was not declared in this scope
  353 |                                         return write_atom<T,uint16_t>(ptr, atom, pos, size, stride);
      |                                                             ^~~~~~~~
atoms.h:353:61: note: ‘uint16_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
atoms.h:357:61: error: ‘uint32_t’ was not declared in this scope
  357 |                                         return write_atom<T,uint32_t>(ptr, atom, pos, size, stride);
      |                                                             ^~~~~~~~
atoms.h:357:61: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
atoms.h:361:61: error: ‘uint64_t’ was not declared in this scope
  361 |                                         return write_atom<T,uint64_t>(ptr, atom, pos, size, stride);
      |                                                             ^~~~~~~~
atoms.h:361:61: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = int; Tin = short int]’:
coerce.h:219:1: warning: control reaches end of non-void function [-Wreturn-type]
  219 | }
      | ^
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = int; Tin = long int]’:
coerce.h:241:1: warning: control reaches end of non-void function [-Wreturn-type]
  241 | }
      | ^
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = double; Tin = short int]’:
coerce.h:368:1: warning: control reaches end of non-void function [-Wreturn-type]
  368 | }
      | ^
coerce.h: In function ‘Tout coerce_cast(Tin) [with Tout = double; Tin = long int]’:
coerce.h:384:1: warning: control reaches end of non-void function [-Wreturn-type]
  384 | }
      | ^
make: *** [/usr/lib64/R/etc/Makeconf:200: altrep.o] Error 1
ERROR: compilation failed for package ‘matter’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/4.3/matter’

The downloaded source packages are in
    ‘/tmp/Rtmp86H3Mo/downloaded_packages’
Warning message:
In install.packages(...) :
  installation of package ‘matter’ had non-zero exit status

Now I am wondering if my machine is missing some package as a dependency (which is most often the case when I run into such problems), or if anything else is the culprit. All my other packages are up to date, (e.g., Matrix 1.5-4.1), but the final error seems to occure while compiling altrep.cpp in line 200, which, as I can see, is the // ALTINTEGER definition. And to me that seems to be somewhat unlikely...

Do you have an idea?

Thanks a lot!

Woosah commented 1 year ago

This was due to my setup: gcc was updated to 13.1.1, and therefore one include statement was missing to make it compatible, see #16 !