sulewicz / redis-s2geo

Simple Redis Module for geospatial queries, which utilizes S2 Region Coverer algorithm for indexing. Allows point with polygon and polygon with polygon overlap tests in constant time.
MIT License
24 stars 4 forks source link

Link error on linux #2

Open spendres opened 1 year ago

spendres commented 1 year ago

I had to remove s2testing from target_link_libraries in CMakeFiles.txt to build on amazon linux 2 or Mac OSX 13:

target_link_libraries( redis-s2geo ${OPENSSL_LIBRARIES} c s2) commented out line with "s2testing)"

Otherwise, this error is reported during linking: ld cannot find -ls2testing. I'm building using CMake 3.24.3 on amazon linux 2. Any ideas? ... [ 87%] Linking CXX shared library libs2.so [ 87%] Built target s2 [ 88%] Building CXX object CMakeFiles/redis-s2geo.dir/src/module.cc.o [ 89%] Building CXX object CMakeFiles/redis-s2geo.dir/src/parser.cc.o [ 89%] Building CXX object CMakeFiles/redis-s2geo.dir/src/geo.cc.o [ 90%] Building CXX object CMakeFiles/redis-s2geo.dir/src/index.cc.o [ 91%] Building CXX object CMakeFiles/redis-s2geo.dir/src/redistest/redistest.cc.o [ 92%] Linking CXX shared library libredis-s2geo.so /usr/bin/ld: cannot find -ls2testing collect2: error: ld returned 1 exit status make[2]: [libredis-s2geo.so.0.0.2] Error 1 make[1]: [CMakeFiles/redis-s2geo.dir/all] Error 2 make: *** [all] Error 2

sunhailin-Leo commented 1 year ago

@spendres Did you solve this problem?

spendres commented 1 year ago

In short, No. I am able to use the node install without a problem and I haven't seen any issues with the library.

The problem looks like an OSX 12ā†’13 migration problem with Brew for the google C++ test environment. Brew doesn't support OSX 13 yet, and since the CI build works without problems, I thought it best to test this again after they have worked out their kinks.

sunhailin-Leo commented 1 year ago

In short, No. I am able to use the node install without a problem and I haven't seen any issues with the library.

The problem looks like an OSX 12ā†’13 migration problem with Brew for the google C++ test environment. Brew doesn't support OSX 13 yet, and since the CI build works without problems, I thought it best to test this again after they have worked out their kinks.

spendres commented 1 year ago

Thanks for putting together the Dockerfile!

executor failed running [/bin/sh -c apt update && apt install -y gcc g++ cmake libgtest-dev openssl libssl-dev git]: exit code: 100

ERROR: failed to solve: process "/bin/sh -c apt update && apt install -y gcc g++ cmake libgtest-dev openssl libssl-dev git" did not complete successfully: exit code: 100

sulewicz commented 1 year ago

Hello! It seems that there were some updates to absl and S2 since the last time I was working on this project. I will make sure all library versions are pinned to a specific tag and will try to address the linker errors. Work in progress PR can be found here: https://github.com/sulewicz/redis-s2geo/pull/4

sulewicz commented 1 year ago

It seems that https://github.com/sulewicz/redis-s2geo/commit/a7e8429a2fcac3b476c046a6ce300407be71dd94#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5 fixed the problem. Please take a look at the new instructions (README and GitHub CI workflow).