s-u / fastmatch

Fast hashing functions and replacement of match()
18 stars 7 forks source link

On the latest R-4.2.1, is there a conflicting type with R_xlen_t? #10

Closed rafalcode closed 2 years ago

rafalcode commented 2 years ago

Hi Simon In hand compiling R-4.2.1 just out 6 days ago, there could be an issue with R_xlen_t, making the package fails, ie.

In file included from fasthash.c:19:
common.h:13:17: error: conflicting types for ‘R_xlen_t’; have ‘R_len_t’ {aka ‘int’}
   13 | typedef R_len_t R_xlen_t;
      |                 ^~~~~~~~
In file included from common.h:8,
                 from fasthash.c:19:
/opt/R-4.2.1/lib/R/include/Rinternals.h:72:23: note: previous declaration of ‘R_xlen_t’ with type ‘R_xlen_t’ {aka ‘long int’}
   72 |     typedef ptrdiff_t R_xlen_t;
rafalcode commented 2 years ago

Hmm, it's happening on R-4.2.0 hand compiled as well. I'm on Debian bookworm, compiling via ./configure --prefix=/opt --enable-R-shlib --enable-memory-profiling --with-blas --with-lapack --with-tcltk which links with my libopenblas instead of R's own blas.

rafalcode commented 2 years ago

Well, it's pretty tricky working it out. R-4.1.3 didn't give me any problems I have to say, then I noticed git version was slightly 1.1.0-2 instead of just 1.1.0 ... so i installed via install_github() which actually worked. Previously, Debian bullseye didn't have a problem with it. Hard to tell what the underlying issue is, but there's a good chance it's just Debian bookworm, unfort I won't be trying any root cause analysis.

s-u commented 2 years ago

It looks like you just used an older version - what you describe has been fixed in d3e41ff9.