r-spatial / spdep

Spatial Dependence: Weighting Schemes and Statistics
https://r-spatial.github.io/spdep/
116 stars 26 forks source link

error:"max_align_t"is not the member of "std"(Linux Redhat centos7) #130

Closed ScrtH closed 11 months ago

ScrtH commented 11 months ago

when I ### install.packages('s2') in Linux centos7 redhat, I receive many error,example: 1/ error:"max_align_t"is not the member of "std" 2/ ./src/absl/container/internal/inlined vector.h:224:35:error: invalid type in declaration before '(' token MallocAdapter::Deallocate( GetAllocator(),GetData(),GetCapacity()); 3/ ./src/absl/container/internal/inlined vector.h:224:76: error:expression list treated as compound expression in initializer [-fpermissive] MallocAdapter::Deallocate( GetAllocator(), GetData(), GetCapacity()); ..... I have no idea how to resolve those error,please help me if you know how to deal

edzer commented 11 months ago

This would be an issue with the s2 package, not with the spdep package.

ScrtH commented 11 months ago

yes,issue with the s2 packages,Do you know how to solve it

edzer commented 11 months ago

Start searching the s2 issues: https://github.com/r-spatial/s2/issues

rsbivand commented 11 months ago

The C and C++ compilers in Centos 7 are ancient, it may well be that s2 @paleolimbot requires more recent versions of the build train?

paleolimbot commented 11 months ago

ScrtH also opened the issue in s2 (thanks!), but for others' collective knowledge/the googlers that end up here, s2 no longer supports gcc 4.8 but there is a workaround if you have admin access to your machine ( https://github.com/r-spatial/s2/issues/240 ).

ScrtH commented 11 months ago

thanks for your help, I true to install devtoolset8 and update gcc c c++ from4.8.5 to8.3.1. I install s2 in R, I think I'm one step closer to success, because the running time has been much longer~ But I still receive error: Unable to load shared target object'/usr/local/lib64/R/library/00LOCK-s2/00new/s2/libs/s2.so' undefined symbol:_ZTVN10_cxxabiv117_class_type_infoE error:Loading failed