Ironholds / rgeolocate

Generalised IP geolocation through R
https://cran.r-project.org/web/packages/rgeolocate/index.html
Other
66 stars 22 forks source link

Undefined symbol "shm_open" #59

Closed scriptkitty closed 4 years ago

scriptkitty commented 4 years ago

Hi, loading rgeolocate fails with the following error:

rgeolocate.so: undefined symbol: shm_open

Apparently, this is due to R changing the default linking flags, and there's already a pull request for it, but applying these changes locally does not resolve the issue for me.

Any help would be greatly appreciated.

ivokwee commented 4 years ago

Yes. I have the same issue. Is there a solution?

ivokwee commented 4 years ago

Compiling the shared library by hand, adding the -lrt, then copying the library to /usr/local/lib seems to work. How to put it in the R package code?

g++ -shared -L/usr/lib64/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o rgeolocate.so IP2Loc_DBInterface.o IP2Location.o RcppExports.o ip2.o ip_to_df.o maxmind.o maxminddb.o rgeolocate.o -L/usr/lib64/R/lib -lR -lrt

cp rgeolocate.so /usr/local/lib/R/site-library/rgeolocate/libs/rgeolocate.so

Ironholds commented 4 years ago

Should now be fixed.