Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build wheel after #394 on macos arm64 #398

Closed
b4rdos opened this issue Dec 2, 2024 · 16 comments · Fixed by #399
Closed

Unable to build wheel after #394 on macos arm64 #398

b4rdos opened this issue Dec 2, 2024 · 16 comments · Fixed by #399

Comments

@b4rdos
Copy link

b4rdos commented Dec 2, 2024

Machine

$ uname -vm
Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:45 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T8112 arm6

Version

$ git rev-parse HEAD
778502a21eb9c6e813df72ce9518acfdfeb8e966

Diff

$ git diff
diff --git a/setup.py b/setup.py
index 242882a..b352381 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,8 @@ setuptools.setup(
                                         '-DCALL_FROM_SETUP_PY:BOOL=ON',
                                         '-DBUILD_SHARED_LIBS:BOOL=OFF',
                                         '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
-                                        '-DWITH_PYTHON=ON'
+                                        '-DWITH_PYTHON=ON',
+                                        '-DBUILD_TESTS=OFF',
                                     ]
         )
     ],

Python

/opt/homebrew/bin/python3.13 -m venv brew313
source brew313/bin/activate
pip install cmake_build_extension wheel build -qq
python -m build .

Error

ld: symbol(s) not found for architecture arm64
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

I started going back commits using

git checkout HEAD~1
python -m build .

The version that produced a wheel successfully was #388. So something broke with #394 unless the approach is now different.

@jmr
Copy link
Member

jmr commented Dec 2, 2024

@andyneff

@andyneff
Copy link
Contributor

andyneff commented Dec 2, 2024

I'm trying to look into this now. What is the output of pip freeze for your venv?

@b4rdos
Copy link
Author

b4rdos commented Dec 2, 2024

I'm trying to look into this now. What is the output of pip freeze for your venv?

❯ pip freeze
build==1.2.2.post1
cmake==3.31.1
cmake-build-extension==0.6.1
gitdb==4.0.11
GitPython==3.1.43
ninja==1.11.1.2
packaging==24.2
pyproject_hooks==1.2.0
setuptools==75.6.0
setuptools-scm==8.1.0
smmap==5.0.1
wheel==0.45.1

@b4rdos
Copy link
Author

b4rdos commented Dec 2, 2024

Also, I have abseil installed via homebrew.

$ brew info abseil
==> abseil: stable 20240722.0 (bottled), HEAD
C++ Common Libraries
https://abseil.io
Installed
/opt/homebrew/Cellar/abseil/20240722.0 (772 files, 11.8MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-12-02 at 19:49:03
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/a/abseil.rb
License: Apache-2.0
==> Dependencies
Build: cmake ✔, googletest ✔
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 74,913 (30 days), 224,079 (90 days), 609,348 (365 days)
install-on-request: 505 (30 days), 1,914 (90 days), 10,121 (365 days)
build-error: 132 (30 days)

@andyneff
Copy link
Contributor

andyneff commented Dec 2, 2024

I'm afraid none of my notes really apply to mac. All I did was change the minimum version of cmake (which you exceed, so we're good there) and change this one line. If you change that back (but leave the other change), does it start working?

If that really fixes it, it sounds like a cmake problem to me that we'll have to work around.

find_package(Python3 COMPONENTS Interpreter Development)

According to my notes, here's a summary of how I had to test this:

Base Environment: docker run -it --rm quay.io/pypa/manylinux_2_28_x86_64

dnf install -y openssl-devel  https://dl.fedoraproject.org/pub/epel/8/Modular/x86_64/Packages/s/swig-4.0.2-9.module_el8+12710+46f2eec2.x86_64.rpm

/opt/python/cp313-cp313/bin/python -m venv /venv
. /venv/bin/activate
pip install cmake_build_extension wheel build -qq

git clone https://github.com/abseil/abseil-cpp.git /absl -b 20240722.0
cd /absl
cmake -B /absl/build \
      -DCMAKE_PREFIX_PATH=/usr/local \
      -DCMAKE_INSTALL_PREFIX=/usr/local \
      -DABSL_ENABLE_INSTALL=ON \
      -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
      -DBUILD_TESTING=OFF \
      -DCMAKE_CXX_STANDARD=20 \
      -DABSL_BUILD_TESTING=OFF; \
cmake --build /absl/build --target install

git clone https://github.com/google/s2geometry /s2geometry -b v0.11.1
cd /s2geometry
python -m build --wheel . "-C--global-option=build_ext" "-C--global-option=-DBUILD_TESTS=OFF;CMAKE_CXX_STANDARD=20"

I had a lot of problem building s2geometry without C++20. I get tons of error with C++17 (the default in gcc 13). I don't know if any of that is relavent to llvm or mac hardware

Also using the python:3.13 image

apt-get update
apt-get install -y swig

python -m venv /venv
# ... The rest is the same

Works on v0.11.1, but gave Syntax error in input(3)., on master both before and after #394. I wasn't able to make sense of that, and went with the manylinux environment.

@andyneff
Copy link
Contributor

andyneff commented Dec 3, 2024

Machine

$ uname -vm
Darwin Kernel Version 22.6.0: Mon Feb 19 19:48:53 PST 2024; root:xnu-8796.141.3.704.6~1/RELEASE_X86_64 x86_64

Version

$ git rev-parse HEAD
778502a21eb9c6e813df72ce9518acfdfeb8e966

Environment

brew install python abseil
/usr/local/opt/python@3.13/bin/python3 -m venv ~/venv
. ~/venv/bin/activate
pip install cmake_build_extension wheel build
python -m build . --wheel "-C--global-option=build_ext" "-C--global-option=-DBUILD_TESTS=OFF"

Result

It worked.

Successfully built s2geometry-0.0.0-cp313-cp313-macosx_13_0_x86_64.whl

So the major difference here is I'm not on an ARM, but an x86.

@b4rdos
Copy link
Author

b4rdos commented Dec 3, 2024

It works for me if I remove the .Module part in find_package

❯ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6fb81e..49ac75c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,7 +67,7 @@ if (WITH_PYTHON)
     find_package(SWIG 4.0)
     # Use Python3_ROOT_DIR to help find python3, if the correct location is not
     # being found by default.
-    find_package(Python3 COMPONENTS Interpreter Development.Module)
+    find_package(Python3 COMPONENTS Interpreter Development)
 endif()

 if (MSVC)
diff --git a/setup.py b/setup.py
index 242882a..b352381 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,8 @@ setuptools.setup(
                                         '-DCALL_FROM_SETUP_PY:BOOL=ON',
                                         '-DBUILD_SHARED_LIBS:BOOL=OFF',
                                         '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
-                                        '-DWITH_PYTHON=ON'
+                                        '-DWITH_PYTHON=ON',
+                                        '-DBUILD_TESTS=OFF',
                                     ]
         )
     ],

And, after calling python -m build ., in a new venv:

❯ pip install dist/s2geometry-0.0.0-cp313-cp313-macosx_15_0_arm64.whl
Processing ./dist/s2geometry-0.0.0-cp313-cp313-macosx_15_0_arm64.whl
Installing collected packages: s2geometry
Successfully installed s2geometry-0.0.0

[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
❯ python -c "from s2geometry import S2LatLng;print(S2LatLng.FromDegrees(90.0, 90.0).ToPoint())"
<s2geometry.S2Point; proxy of <Swig Object of type 'S2Point *' at 0x102b367c0> >

@jmr
Copy link
Member

jmr commented Dec 3, 2024

 ld: symbol(s) not found for architecture arm64
c++: error: linker command failed with exit code 1 (use -v to see invocation)

What's the full error? What symbols aren't found?

I had a lot of problem building s2geometry without C++20.

Is this because your abseil-cpp was built with C++20? I compile both with C++17 with no problems.

@andyneff
Copy link
Contributor

andyneff commented Dec 3, 2024

I see I did not run brew install swig and my wheel was empty.

I am able to reproduce the error on x86 and arm64 for macos now:

Build Output
[109/109] Linking CXX shared module python/_s2geometry.so
FAILED: python/_s2geometry.so
: && /Library/Developer/CommandLineTools/usr/bin/c++ -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -bundle -Wl,-headerpad_max_install_names  -o python/_s2geometry.so python/CMakeFiles/s2geometry.dir/CMakeFiles/s2geometry.dir/s2PYTHON_wrap.cxx.o  -Wl,-rpath,/usr/local/lib  libs2.a  /usr/local/lib/libssl.dylib  /usr/local/lib/libcrypto.dylib  /usr/local/lib/libabsl_log_internal_check_op.2407.0.0.dylib  /usr/local/lib/libabsl_flags_internal.2407.0.0.dylib  /usr/local/lib/libabsl_flags_marshalling.2407.0.0.dylib  /usr/local/lib/libabsl_flags_reflection.2407.0.0.dylib  /usr/local/lib/libabsl_flags_config.2407.0.0.dylib  /usr/local/lib/libabsl_flags_program_name.2407.0.0.dylib  /usr/local/lib/libabsl_flags_private_handle_accessor.2407.0.0.dylib  /usr/local/lib/libabsl_flags_commandlineflag.2407.0.0.dylib  /usr/local/lib/libabsl_flags_commandlineflag_internal.2407.0.0.dylib  /usr/local/lib/libabsl_raw_hash_set.2407.0.0.dylib  /usr/local/lib/libabsl_hashtablez_sampler.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_conditions.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_message.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_nullguard.2407.0.0.dylib  /usr/local/lib/libabsl_examine_stack.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_format.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_proto.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_log_sink_set.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_globals.2407.0.0.dylib  /usr/local/lib/libabsl_log_globals.2407.0.0.dylib  /usr/local/lib/libabsl_hash.2407.0.0.dylib  /usr/local/lib/libabsl_city.2407.0.0.dylib  /usr/local/lib/libabsl_bad_variant_access.2407.0.0.dylib  /usr/local/lib/libabsl_low_level_hash.2407.0.0.dylib  /usr/local/lib/libabsl_log_sink.2407.0.0.dylib  /usr/local/lib/libabsl_log_entry.2407.0.0.dylib  /usr/local/lib/libabsl_status.2407.0.0.dylib  /usr/local/lib/libabsl_cord.2407.0.0.dylib  /usr/local/lib/libabsl_cordz_info.2407.0.0.dylib  /usr/local/lib/libabsl_cord_internal.2407.0.0.dylib  /usr/local/lib/libabsl_cordz_functions.2407.0.0.dylib  /usr/local/lib/libabsl_exponential_biased.2407.0.0.dylib  /usr/local/lib/libabsl_cordz_handle.2407.0.0.dylib  /usr/local/lib/libabsl_crc_cord_state.2407.0.0.dylib  /usr/local/lib/libabsl_crc32c.2407.0.0.dylib  /usr/local/lib/libabsl_crc_internal.2407.0.0.dylib  /usr/local/lib/libabsl_crc_cpu_detect.2407.0.0.dylib  /usr/local/lib/libabsl_strerror.2407.0.0.dylib  /usr/local/lib/libabsl_str_format_internal.2407.0.0.dylib  /usr/local/lib/libabsl_vlog_config_internal.2407.0.0.dylib  /usr/local/lib/libabsl_bad_optional_access.2407.0.0.dylib  /usr/local/lib/libabsl_synchronization.2407.0.0.dylib  /usr/local/lib/libabsl_stacktrace.2407.0.0.dylib  /usr/local/lib/libabsl_symbolize.2407.0.0.dylib  /usr/local/lib/libabsl_debugging_internal.2407.0.0.dylib  /usr/local/lib/libabsl_demangle_internal.2407.0.0.dylib  /usr/local/lib/libabsl_demangle_rust.2407.0.0.dylib  /usr/local/lib/libabsl_decode_rust_punycode.2407.0.0.dylib  /usr/local/lib/libabsl_utf8_for_code_point.2407.0.0.dylib  /usr/local/lib/libabsl_graphcycles_internal.2407.0.0.dylib  /usr/local/lib/libabsl_malloc_internal.2407.0.0.dylib  /usr/local/lib/libabsl_kernel_timeout_internal.2407.0.0.dylib  /usr/local/lib/libabsl_time.2407.0.0.dylib  /usr/local/lib/libabsl_civil_time.2407.0.0.dylib  /usr/local/lib/libabsl_time_zone.2407.0.0.dylib  -Wl,-framework,CoreFoundation  /usr/local/lib/libabsl_log_internal_fnmatch.2407.0.0.dylib  /usr/local/lib/libabsl_strings.2407.0.0.dylib  /usr/local/lib/libabsl_int128.2407.0.0.dylib  /usr/local/lib/libabsl_strings_internal.2407.0.0.dylib  /usr/local/lib/libabsl_string_view.2407.0.0.dylib  /usr/local/lib/libabsl_base.2407.0.0.dylib  /usr/local/lib/libabsl_spinlock_wait.2407.0.0.dylib  /usr/local/lib/libabsl_throw_delegate.2407.0.0.dylib  /usr/local/lib/libabsl_raw_logging_internal.2407.0.0.dylib  /usr/local/lib/libabsl_log_severity.2407.0.0.dylib && :
Undefined symbols for architecture x86_64:
  "_PyArg_UnpackTuple", referenced from:
      SwigPyObject_own(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyBool_FromLong", referenced from:
      _wrap_SwigPyIterator_equal(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_R1Interval___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_R1Interval___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyBool_Type", referenced from:
      _wrap_S2RegionTermIndexer_set_index_contains_points_only(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2RegionTermIndexer_set_optimize_for_space(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyByteArray_AsString", referenced from:
      _wrap_new_Encoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Decoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_Decoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyByteArray_FromStringAndSize", referenced from:
      _wrap_Encoder_buffer(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyByteArray_Size", referenced from:
      _wrap_new_Encoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Decoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_Decoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyByteArray_Type", referenced from:
      _wrap_new_Encoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Decoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_Decoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyBytes_AsString", referenced from:
      _wrap_Decoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_Decoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyBytes_Size", referenced from:
      _wrap_Decoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_Decoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyCapsule_GetPointer", referenced from:
      SWIG_Python_TypeQuery(char const*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_DestroyModule(_object*) in s2PYTHON_wrap.cxx.o
  "_PyCapsule_Import", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
      SWIG_Python_TypeQuery(char const*) in s2PYTHON_wrap.cxx.o
  "_PyCapsule_New", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
      SWIG_Python_TypeQuery(char const*) in s2PYTHON_wrap.cxx.o
  "_PyDict_GetItem", referenced from:
      SWIG_Python_TypeQuery(char const*) in s2PYTHON_wrap.cxx.o
  "_PyDict_New", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
      SWIG_Python_NewPointerObj(_object*, void*, swig_type_info*, int) in s2PYTHON_wrap.cxx.o
      SWIG_Python_TypeQuery(char const*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_DestroyModule(_object*) in s2PYTHON_wrap.cxx.o
  "_PyDict_SetItem", referenced from:
      SWIG_Python_TypeQuery(char const*) in s2PYTHON_wrap.cxx.o
  "_PyDict_SetItemString", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
  "_PyErr_Clear", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_advance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___iadd__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyErr_ExceptionMatches", referenced from:
      _wrap_SwigPyIterator___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___add__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___sub__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_R1Interval___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_R1Interval___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyErr_Fetch", referenced from:
      _wrap_S2Polygon_InitNested(_object*, _object*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_RaiseOrModifyTypeError(char const*) in s2PYTHON_wrap.cxx.o
      SwigPyObject_dealloc(_object*) in s2PYTHON_wrap.cxx.o
  "_PyErr_Format", referenced from:
      _wrap_SwigPyIterator_distance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_equal(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_advance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___iadd__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___isub__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___add__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_Encoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyErr_GivenExceptionMatches", referenced from:
      SWIG_Python_RaiseOrModifyTypeError(char const*) in s2PYTHON_wrap.cxx.o
  "_PyErr_Occurred", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_advance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___iadd__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyErr_Restore", referenced from:
      SWIG_Python_RaiseOrModifyTypeError(char const*) in s2PYTHON_wrap.cxx.o
      SwigPyObject_dealloc(_object*) in s2PYTHON_wrap.cxx.o
  "_PyErr_SetObject", referenced from:
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_SetErrorObj(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyErr_SetString", referenced from:
      _wrap_delete_SwigPyIterator(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_value(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_distance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_equal(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_copy(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyErr_WriteUnraisable", referenced from:
      SwigPyObject_dealloc(_object*) in s2PYTHON_wrap.cxx.o
  "_PyExc_AttributeError", referenced from:
      swig_varlink_getattr(_object*, char*) in s2PYTHON_wrap.cxx.o
      swig_varlink_setattr(_object*, char*, _object*) in s2PYTHON_wrap.cxx.o
      l_switch.table._ZL24_wrap_new_S2Loop__SWIG_3P7_objectlPS0_.2149 in s2PYTHON_wrap.cxx.o
  "_PyExc_IOError", referenced from:
      l_switch.table._ZL24_wrap_new_S2Loop__SWIG_3P7_objectlPS0_.2149 in s2PYTHON_wrap.cxx.o
  "_PyExc_IndexError", referenced from:
      l_switch.table._ZL24_wrap_new_S2Loop__SWIG_3P7_objectlPS0_.2149 in s2PYTHON_wrap.cxx.o
  "_PyExc_MemoryError", referenced from:
      l_switch.table._ZL24_wrap_new_S2Loop__SWIG_3P7_objectlPS0_.2149 in s2PYTHON_wrap.cxx.o
  "_PyExc_OverflowError", referenced from:
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_advance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___iadd__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___isub__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___add__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___sub__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyExc_RuntimeError", referenced from:
      _wrap_delete_SwigPyIterator(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_value(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_distance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_equal(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_copy(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_next(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___next__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyExc_StopIteration", referenced from:
      _wrap_SwigPyIterator_value(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_next(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___next__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_previous(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_advance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyExc_SyntaxError", referenced from:
      l_switch.table._ZL24_wrap_new_S2Loop__SWIG_3P7_objectlPS0_.2149 in s2PYTHON_wrap.cxx.o
  "_PyExc_SystemError", referenced from:
      _wrap_SwigPyIterator_distance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_equal(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_advance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___iadd__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___isub__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___add__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_S2Point(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyExc_TypeError", referenced from:
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_distance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_equal(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_advance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyExc_ValueError", referenced from:
      _wrap_S2BooleanOperation_Build(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2BufferOperation_Build(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Builder_Build(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Polygon_InitToUnion(_object*, _object*) in s2PYTHON_wrap.cxx.o
      l_switch.table._ZL24_wrap_new_S2Loop__SWIG_3P7_objectlPS0_.2149 in s2PYTHON_wrap.cxx.o
  "_PyExc_ZeroDivisionError", referenced from:
      l_switch.table._ZL24_wrap_new_S2Loop__SWIG_3P7_objectlPS0_.2149 in s2PYTHON_wrap.cxx.o
  "_PyFloat_AsDouble", referenced from:
      _wrap_Encoder_putfloat(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_putdouble(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Point_FromRaw(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2BufferOperationOptions_set_error_fraction(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_R1Interval(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle_Radians(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle_Degrees(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyFloat_FromDouble", referenced from:
      _wrap_Decoder_getfloat(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Decoder_getdouble(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Point_x(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Point_y(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Point_z(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Point_Norm(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_R1Interval_GetLength(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyFloat_Type", referenced from:
      _wrap_Encoder_putfloat(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_putdouble(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Point_FromRaw(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2BufferOperationOptions_set_error_fraction(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_R1Interval(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle_Radians(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle_Degrees(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyImport_AddModule", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
  "_PyIter_Next", referenced from:
      _wrap_S2Polygon_InitNested(_object*, _object*) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2Point, std::__1::allocator<S2Point>>, S2Point>::assign(_object*, std::__1::vector<S2Point, std::__1::allocator<S2Point>>*) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2Point, std::__1::allocator<S2Point>>, S2Point>::check(_object*) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2LatLng, std::__1::allocator<S2LatLng>>, S2LatLng>::assign(_object*, std::__1::vector<S2LatLng, std::__1::allocator<S2LatLng>>*) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2LatLng, std::__1::allocator<S2LatLng>>, S2LatLng>::check(_object*) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2CellId, std::__1::allocator<S2CellId>>, S2CellId>::assign(_object*, std::__1::vector<S2CellId, std::__1::allocator<S2CellId>>*) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2CellId, std::__1::allocator<S2CellId>>, S2CellId>::check(_object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyList_Append", referenced from:
      _wrap_S2CellId_GetCenterSiTi(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_ToFaceIJOrientation(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Polyline_GetSuffix(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Polyline_Project(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyList_New", referenced from:
      _wrap_S2CellId_GetCenterSiTi(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_GetEdgeNeighbors(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_ToFaceIJOrientation(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Polygon_IntersectWithPolyline(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Polyline_GetSuffix(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Polyline_Project(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyLong_AsDouble", referenced from:
      _wrap_Encoder_putfloat(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_putdouble(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Point_FromRaw(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2BufferOperationOptions_set_error_fraction(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_R1Interval(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle_Radians(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle_Degrees(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyLong_AsLong", referenced from:
      _wrap_SwigPyIterator_advance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___iadd__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___isub__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___add__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___sub__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2PolygonLayerOptions_set_edge_type(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle_E5(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyLong_AsUnsignedLong", referenced from:
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_put8(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_put16(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_put32(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_Ensure(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle_UnsignedE6(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyLong_AsUnsignedLongLong", referenced from:
      _wrap_Encoder_put64(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_S2CellId(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_FromFacePosLevel(_object*, _object*) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long>>, unsigned long long>::check(_object*) in s2PYTHON_wrap.cxx.o
      swig::traits_as<unsigned long long, swig::value_category>::as(_object*) in s2PYTHON_wrap.cxx.o
  "_PyLong_FromLong", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_distance(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___sub__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_length(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_avail(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Decoder_get8(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Decoder_get16(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyLong_FromSize_t", referenced from:
      _wrap_Decoder_get32(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyLong_FromUnsignedLong", referenced from:
      _wrap_Encoder_length(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_avail(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Decoder_pos(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Decoder_avail(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId___hash__(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyLong_FromUnsignedLongLong", referenced from:
      _wrap_Decoder_get64(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_id(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyLong_FromVoidPtr", referenced from:
      SwigPyObject_long(SwigPyObject*) in s2PYTHON_wrap.cxx.o
  "_PyModule_AddObject", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
  "_PyModule_Create2", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
  "_PyModule_GetDict", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
  "_PyOS_snprintf", referenced from:
      _wrap_S2Polygon_InitNested(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyObject_Call", referenced from:
      SWIG_Python_NewPointerObj(_object*, void*, swig_type_info*, int) in s2PYTHON_wrap.cxx.o
  "_PyObject_CallFunctionObjArgs", referenced from:
      SWIG_Python_ConvertPtrAndOwn(_object*, void**, swig_type_info*, int, int*) in s2PYTHON_wrap.cxx.o
      SwigPyObject_dealloc(_object*) in s2PYTHON_wrap.cxx.o
  "_PyObject_Free", referenced from:
      SwigPyPacked_dealloc(_object*) in s2PYTHON_wrap.cxx.o
      SwigPyObject_dealloc(_object*) in s2PYTHON_wrap.cxx.o
  "_PyObject_GenericGetAttr", referenced from:
      l___const._ZL21SwigPyPacked_TypeOncev.slots in s2PYTHON_wrap.cxx.o
      l___const._ZL21SwigPyObject_TypeOncev.slots in s2PYTHON_wrap.cxx.o
  "_PyObject_GetAttr", referenced from:
      SWIG_Python_GetSwigThis(_object*) in s2PYTHON_wrap.cxx.o
  "_PyObject_GetAttrString", referenced from:
      SwigPyClientData_New(_object*) in s2PYTHON_wrap.cxx.o
  "_PyObject_GetIter", referenced from:
      _wrap_S2Polygon_InitNested(_object*, _object*) in s2PYTHON_wrap.cxx.o
      swig::traits_asptr_stdseq<std::__1::vector<S2Point, std::__1::allocator<S2Point>>, S2Point>::asptr(_object*, std::__1::vector<S2Point, std::__1::allocator<S2Point>>**) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2Point, std::__1::allocator<S2Point>>, S2Point>::assign(_object*, std::__1::vector<S2Point, std::__1::allocator<S2Point>>*) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2Point, std::__1::allocator<S2Point>>, S2Point>::check(_object*) in s2PYTHON_wrap.cxx.o
      swig::traits_asptr_stdseq<std::__1::vector<S2LatLng, std::__1::allocator<S2LatLng>>, S2LatLng>::asptr(_object*, std::__1::vector<S2LatLng, std::__1::allocator<S2LatLng>>**) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2LatLng, std::__1::allocator<S2LatLng>>, S2LatLng>::assign(_object*, std::__1::vector<S2LatLng, std::__1::allocator<S2LatLng>>*) in s2PYTHON_wrap.cxx.o
      swig::IteratorProtocol<std::__1::vector<S2LatLng, std::__1::allocator<S2LatLng>>, S2LatLng>::check(_object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyObject_IsInstance", referenced from:
      SwigPyClientData_New(_object*) in s2PYTHON_wrap.cxx.o
  "_PyObject_IsTrue", referenced from:
      _wrap_S2RegionTermIndexer_set_index_contains_points_only(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2RegionTermIndexer_set_optimize_for_space(_object*, _object*) in s2PYTHON_wrap.cxx.o
      SwigPyObject_own(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyObject_SetAttr", referenced from:
      SWIG_Python_NewPointerObj(_object*, void*, swig_type_info*, int) in s2PYTHON_wrap.cxx.o
      SWIG_Python_InitShadowInstance(_object*) in s2PYTHON_wrap.cxx.o
  "_PyObject_Str", referenced from:
      _wrap_S2Polygon_InitNested(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyTuple_New", referenced from:
      SWIG_Python_NewPointerObj(_object*, void*, swig_type_info*, int) in s2PYTHON_wrap.cxx.o
      SwigPyClientData_New(_object*) in s2PYTHON_wrap.cxx.o
      swig::traits_from_stdseq<std::__1::vector<S2CellId, std::__1::allocator<S2CellId>>, S2CellId>::from(std::__1::vector<S2CellId, std::__1::allocator<S2CellId>> const&) in s2PYTHON_wrap.cxx.o
      swig::traits_from_stdseq<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::from(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) in s2PYTHON_wrap.cxx.o
  "_PyTuple_SetItem", referenced from:
      swig::traits_from_stdseq<std::__1::vector<S2CellId, std::__1::allocator<S2CellId>>, S2CellId>::from(std::__1::vector<S2CellId, std::__1::allocator<S2CellId>> const&) in s2PYTHON_wrap.cxx.o
      swig::traits_from_stdseq<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::from(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) in s2PYTHON_wrap.cxx.o
  "_PyType_FromSpec", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
      SWIG_Python_GetSwigThis(_object*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_NewPointerObj(_object*, void*, swig_type_info*, int) in s2PYTHON_wrap.cxx.o
      SwigPyObject_append(_object*, _object*) in s2PYTHON_wrap.cxx.o
      SwigPyPacked_dealloc(_object*) in s2PYTHON_wrap.cxx.o
      SwigPyObject_dealloc(_object*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_DestroyModule(_object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyType_IsSubtype", referenced from:
      _wrap_new_Encoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_putfloat(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Encoder_putdouble(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_Decoder_reset(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_new_Decoder(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Point_FromRaw(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyType_Modified", referenced from:
      SWIG_Python_NewPointerObj(_object*, void*, swig_type_info*, int) in s2PYTHON_wrap.cxx.o
  "_PyType_Type", referenced from:
      SwigPyClientData_New(_object*) in s2PYTHON_wrap.cxx.o
  "_PyUnicode_AsUTF8", referenced from:
      _wrap_S2CellId_FromToken(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_FromDebugString(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2RegionTermIndexer_GetIndexTerms(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2RegionTermIndexer_GetQueryTerms(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2RegionTermIndexer_GetIndexTermsForCanonicalCovering(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2RegionTermIndexer_GetQueryTermsForCanonicalCovering(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyUnicode_AsUTF8AndSize", referenced from:
      _wrap_S2Polygon_InitNested(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2RegionTermIndexer_GetIndexTerms(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2RegionTermIndexer_GetQueryTerms(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2RegionTermIndexer_set_marker_character(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "_PyUnicode_Concat", referenced from:
      SwigPyObject_repr(SwigPyObject*) in s2PYTHON_wrap.cxx.o
      swig_varlink_str(_object*) in s2PYTHON_wrap.cxx.o
  "_PyUnicode_DecodeUTF8", referenced from:
      _wrap_S1Angle___str__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Interval___str__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_ToToken(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_ToString(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId___str__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Cap___str__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2LatLng_ToStringInDegrees(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyUnicode_FromFormat", referenced from:
      SWIG_Python_RaiseOrModifyTypeError(char const*) in s2PYTHON_wrap.cxx.o
      SwigPyPacked_repr(SwigPyPacked*) in s2PYTHON_wrap.cxx.o
      SwigPyPacked_str(SwigPyPacked*) in s2PYTHON_wrap.cxx.o
      SwigPyObject_repr(SwigPyObject*) in s2PYTHON_wrap.cxx.o
  "_PyUnicode_FromString", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
      SWIG_Python_GetSwigThis(_object*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_NewPointerObj(_object*, void*, swig_type_info*, int) in s2PYTHON_wrap.cxx.o
      SWIG_Python_InitShadowInstance(_object*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_TypeQuery(char const*) in s2PYTHON_wrap.cxx.o
      SwigPyPacked_str(SwigPyPacked*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_DestroyModule(_object*) in s2PYTHON_wrap.cxx.o
      ...
  "_PyUnicode_InternFromString", referenced from:
      swig_varlink_repr(_object*) in s2PYTHON_wrap.cxx.o
      swig_varlink_str(_object*) in s2PYTHON_wrap.cxx.o
  "_Py_BuildValue", referenced from:
      _wrap_S2Point_ToRaw(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2Polygon_GetOverlapFractions(_object*, _object*) in s2PYTHON_wrap.cxx.o
  "__PyObject_New", referenced from:
      SWIG_Python_NewPointerObj(_object*, void*, swig_type_info*, int) in s2PYTHON_wrap.cxx.o
      SwigPyObject_dealloc(_object*) in s2PYTHON_wrap.cxx.o
      SWIG_Python_DestroyModule(_object*) in s2PYTHON_wrap.cxx.o
  "__Py_Dealloc", referenced from:
      _PyInit__s2geometry in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_GetCenterSiTi(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_GetEdgeNeighbors(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_GetVertexNeighbors(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S2CellId_GetAllNeighbors(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "__Py_NoneStruct", referenced from:
      _wrap_delete_SwigPyIterator(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_value(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_incr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_decr(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_next(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___next__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator_previous(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
  "__Py_NotImplementedStruct", referenced from:
      _wrap_SwigPyIterator___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___add__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_SwigPyIterator___sub__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_R1Interval___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_R1Interval___ne__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      _wrap_S1Angle___eq__(_object*, _object*) in s2PYTHON_wrap.cxx.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/Users/andy/venv/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
    main()
    ~~~~^^
  File "/Users/andy/venv/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/andy/venv/lib/python3.13/site-packages/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
    return hook(config_settings)
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
    self.run_setup()
    ~~~~~~~~~~~~~~^^
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup
    exec(code, locals())
    ~~~~^^^^^^^^^^^^^^^^
  File "<string>", line 8, in <module>
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 183, in setup
    return run_commands(dist)
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
    dist.run_commands()
    ~~~~~~~~~~~~~~~~~^^
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
    self.run_command(cmd)
    ~~~~~~~~~~~~~~~~^^^^^
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/setuptools/dist.py", line 995, in run_command
    super().run_command(command)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
    ~~~~~~~~~~~^^
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/cmake_build_extension/build_extension.py", line 114, in run
    self.build_extension(ext)
    ~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/private/var/folders/n5/wxkcs4_x3qs61yd3chrd7x180000gn/T/build-env-0fzgpnns/lib/python3.13/site-packages/cmake_build_extension/build_extension.py", line 242, in build_extension
    subprocess.check_call(build_command)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 419, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '/Users/andy/s2geometry/build/temp.macosx-13.0-x86_64-cpython-313_SwigBindings', '--config', 'Release']' returned non-zero exit status 1.

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel

Here is the link line that is Failing on Mac:

[109/109] Linking CXX shared module python/_s2geometry.so
FAILED: python/_s2geometry.so
: && /Library/Developer/CommandLineTools/usr/bin/c++ -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -bundle -Wl,-headerpad_max_install_names  -o python/_s2geometry.so python/CMakeFiles/s2geometry.dir/CMakeFiles/s2geometry.dir/s2PYTHON_wrap.cxx.o  -Wl,-rpath,/usr/local/lib  libs2.a  /usr/local/lib/libssl.dylib  /usr/local/lib/libcrypto.dylib  /usr/local/lib/libabsl_log_internal_check_op.2407.0.0.dylib  /usr/local/lib/libabsl_flags_internal.2407.0.0.dylib  /usr/local/lib/libabsl_flags_marshalling.2407.0.0.dylib  /usr/local/lib/libabsl_flags_reflection.2407.0.0.dylib  /usr/local/lib/libabsl_flags_config.2407.0.0.dylib  /usr/local/lib/libabsl_flags_program_name.2407.0.0.dylib  /usr/local/lib/libabsl_flags_private_handle_accessor.2407.0.0.dylib  /usr/local/lib/libabsl_flags_commandlineflag.2407.0.0.dylib  /usr/local/lib/libabsl_flags_commandlineflag_internal.2407.0.0.dylib  /usr/local/lib/libabsl_raw_hash_set.2407.0.0.dylib  /usr/local/lib/libabsl_hashtablez_sampler.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_conditions.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_message.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_nullguard.2407.0.0.dylib  /usr/local/lib/libabsl_examine_stack.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_format.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_proto.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_log_sink_set.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_globals.2407.0.0.dylib  /usr/local/lib/libabsl_log_globals.2407.0.0.dylib  /usr/local/lib/libabsl_hash.2407.0.0.dylib  /usr/local/lib/libabsl_city.2407.0.0.dylib  /usr/local/lib/libabsl_bad_variant_access.2407.0.0.dylib  /usr/local/lib/libabsl_low_level_hash.2407.0.0.dylib  /usr/local/lib/libabsl_log_sink.2407.0.0.dylib  /usr/local/lib/libabsl_log_entry.2407.0.0.dylib  /usr/local/lib/libabsl_status.2407.0.0.dylib  /usr/local/lib/libabsl_cord.2407.0.0.dylib  /usr/local/lib/libabsl_cordz_info.2407.0.0.dylib  /usr/local/lib/libabsl_cord_internal.2407.0.0.dylib  /usr/local/lib/libabsl_cordz_functions.2407.0.0.dylib  /usr/local/lib/libabsl_exponential_biased.2407.0.0.dylib  /usr/local/lib/libabsl_cordz_handle.2407.0.0.dylib  /usr/local/lib/libabsl_crc_cord_state.2407.0.0.dylib  /usr/local/lib/libabsl_crc32c.2407.0.0.dylib  /usr/local/lib/libabsl_crc_internal.2407.0.0.dylib  /usr/local/lib/libabsl_crc_cpu_detect.2407.0.0.dylib  /usr/local/lib/libabsl_strerror.2407.0.0.dylib  /usr/local/lib/libabsl_str_format_internal.2407.0.0.dylib  /usr/local/lib/libabsl_vlog_config_internal.2407.0.0.dylib  /usr/local/lib/libabsl_bad_optional_access.2407.0.0.dylib  /usr/local/lib/libabsl_synchronization.2407.0.0.dylib  /usr/local/lib/libabsl_stacktrace.2407.0.0.dylib  /usr/local/lib/libabsl_symbolize.2407.0.0.dylib  /usr/local/lib/libabsl_debugging_internal.2407.0.0.dylib  /usr/local/lib/libabsl_demangle_internal.2407.0.0.dylib  /usr/local/lib/libabsl_demangle_rust.2407.0.0.dylib  /usr/local/lib/libabsl_decode_rust_punycode.2407.0.0.dylib  /usr/local/lib/libabsl_utf8_for_code_point.2407.0.0.dylib  /usr/local/lib/libabsl_graphcycles_internal.2407.0.0.dylib  /usr/local/lib/libabsl_malloc_internal.2407.0.0.dylib  /usr/local/lib/libabsl_kernel_timeout_internal.2407.0.0.dylib  /usr/local/lib/libabsl_time.2407.0.0.dylib  /usr/local/lib/libabsl_civil_time.2407.0.0.dylib  /usr/local/lib/libabsl_time_zone.2407.0.0.dylib  -Wl,-framework,CoreFoundation  /usr/local/lib/libabsl_log_internal_fnmatch.2407.0.0.dylib  /usr/local/lib/libabsl_strings.2407.0.0.dylib  /usr/local/lib/libabsl_int128.2407.0.0.dylib  /usr/local/lib/libabsl_strings_internal.2407.0.0.dylib  /usr/local/lib/libabsl_string_view.2407.0.0.dylib  /usr/local/lib/libabsl_base.2407.0.0.dylib  /usr/local/lib/libabsl_spinlock_wait.2407.0.0.dylib  /usr/local/lib/libabsl_throw_delegate.2407.0.0.dylib  /usr/local/lib/libabsl_raw_logging_internal.2407.0.0.dylib  /usr/local/lib/libabsl_log_severity.2407.0.0.dylib && :

Here is it succeeding (without .Modules):

[109/109] : && /Library/Developer/CommandLineTools/usr/bin/c++ -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -bundle -Wl,-headerpad_max_install_names  -o python/_s2geometry.so python/CMakeFiles/s2geometry.dir/CMakeFiles/s2geometry.dir/s2PYTHON_wrap.cxx.o  -Wl,-rpath,/usr/local/lib  /usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/lib/libpython3.13.dylib  libs2.a  /usr/local/lib/libssl.dylib  /usr/local/lib/libcrypto.dylib  /usr/local/lib/libabsl_log_internal_check_op.2407.0.0.dylib  /usr/local/lib/libabsl_flags_internal.2407.0.0.dylib  /usr/local/lib/libabsl_flags_marshalling.2407.0.0.dylib  /usr/local/lib/libabsl_flags_reflection.2407.0.0.dylib  /usr/local/lib/libabsl_flags_config.2407.0.0.dylib  /usr/local/lib/libabsl_flags_program_name.2407.0.0.dylib  /usr/local/lib/libabsl_flags_private_handle_accessor.2407.0.0.dylib  /usr/local/lib/libabsl_flags_commandlineflag.2407.0.0.dylib  /usr/local/lib/libabsl_flags_commandlineflag_internal.2407.0.0.dylib  /usr/local/lib/libabsl_raw_hash_set.2407.0.0.dylib  /usr/local/lib/libabsl_hashtablez_sampler.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_conditions.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_message.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_nullguard.2407.0.0.dylib  /usr/local/lib/libabsl_examine_stack.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_format.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_proto.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_log_sink_set.2407.0.0.dylib  /usr/local/lib/libabsl_log_internal_globals.2407.0.0.dylib  /usr/local/lib/libabsl_log_globals.2407.0.0.dylib  /usr/local/lib/libabsl_hash.2407.0.0.dylib  /usr/local/lib/libabsl_city.2407.0.0.dylib  /usr/local/lib/libabsl_bad_variant_access.2407.0.0.dylib  /usr/local/lib/libabsl_low_level_hash.2407.0.0.dylib  /usr/local/lib/libabsl_log_sink.2407.0.0.dylib  /usr/local/lib/libabsl_log_entry.2407.0.0.dylib  /usr/local/lib/libabsl_status.2407.0.0.dylib  /usr/local/lib/libabsl_cord.2407.0.0.dylib  /usr/local/lib/libabsl_cordz_info.2407.0.0.dylib  /usr/local/lib/libabsl_cord_internal.2407.0.0.dylib  /usr/local/lib/libabsl_cordz_functions.2407.0.0.dylib  /usr/local/lib/libabsl_exponential_biased.2407.0.0.dylib  /usr/local/lib/libabsl_cordz_handle.2407.0.0.dylib  /usr/local/lib/libabsl_crc_cord_state.2407.0.0.dylib  /usr/local/lib/libabsl_crc32c.2407.0.0.dylib  /usr/local/lib/libabsl_crc_internal.2407.0.0.dylib  /usr/local/lib/libabsl_crc_cpu_detect.2407.0.0.dylib  /usr/local/lib/libabsl_strerror.2407.0.0.dylib  /usr/local/lib/libabsl_str_format_internal.2407.0.0.dylib  /usr/local/lib/libabsl_vlog_config_internal.2407.0.0.dylib  /usr/local/lib/libabsl_bad_optional_access.2407.0.0.dylib  /usr/local/lib/libabsl_synchronization.2407.0.0.dylib  /usr/local/lib/libabsl_stacktrace.2407.0.0.dylib  /usr/local/lib/libabsl_symbolize.2407.0.0.dylib  /usr/local/lib/libabsl_debugging_internal.2407.0.0.dylib  /usr/local/lib/libabsl_demangle_internal.2407.0.0.dylib  /usr/local/lib/libabsl_demangle_rust.2407.0.0.dylib  /usr/local/lib/libabsl_decode_rust_punycode.2407.0.0.dylib  /usr/local/lib/libabsl_utf8_for_code_point.2407.0.0.dylib  /usr/local/lib/libabsl_graphcycles_internal.2407.0.0.dylib  /usr/local/lib/libabsl_malloc_internal.2407.0.0.dylib  /usr/local/lib/libabsl_kernel_timeout_internal.2407.0.0.dylib  /usr/local/lib/libabsl_time.2407.0.0.dylib  /usr/local/lib/libabsl_civil_time.2407.0.0.dylib  /usr/local/lib/libabsl_time_zone.2407.0.0.dylib  -Wl,-framework,CoreFoundation  /usr/local/lib/libabsl_log_internal_fnmatch.2407.0.0.dylib  /usr/local/lib/libabsl_strings.2407.0.0.dylib  /usr/local/lib/libabsl_int128.2407.0.0.dylib  /usr/local/lib/libabsl_strings_internal.2407.0.0.dylib  /usr/local/lib/libabsl_string_view.2407.0.0.dylib  /usr/local/lib/libabsl_base.2407.0.0.dylib  /usr/local/lib/libabsl_spinlock_wait.2407.0.0.dylib  /usr/local/lib/libabsl_throw_delegate.2407.0.0.dylib  /usr/local/lib/libabsl_raw_logging_internal.2407.0.0.dylib  /usr/local/lib/libabsl_log_severity.2407.0.0.dylib && :

The only difference is /usr/local/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/lib/libpython3.13.dylib is there, which is where mac gets these symbols.


Here is Linux for reference:

[109/109] : && /opt/rh/gcc-toolset-13/root/usr/bin/c++ -fPIC -O3 -DNDEBUG   -shared  -o python/_s2geometry.so python/CMakeFiles/s2geometry.dir/CMakeFiles/s2geometry.dir/s2PYTHON_wrap.cxx.o  libs2.a  /usr/lib64/libssl.so  /usr/lib64/libcrypto.so  /usr/local/lib64/libabsl_log_internal_check_op.a  /usr/local/lib64/libabsl_flags_internal.a  /usr/local/lib64/libabsl_flags_marshalling.a  /usr/local/lib64/libabsl_flags_reflection.a  /usr/local/lib64/libabsl_flags_config.a  /usr/local/lib64/libabsl_flags_program_name.a  /usr/local/lib64/libabsl_flags_private_handle_accessor.a  /usr/local/lib64/libabsl_flags_commandlineflag.a  /usr/local/lib64/libabsl_flags_commandlineflag_internal.a  /usr/local/lib64/libabsl_raw_hash_set.a  /usr/local/lib64/libabsl_hashtablez_sampler.a  /usr/local/lib64/libabsl_log_internal_conditions.a  /usr/local/lib64/libabsl_log_internal_message.a  /usr/local/lib64/libabsl_log_internal_nullguard.a  /usr/local/lib64/libabsl_examine_stack.a  /usr/local/lib64/libabsl_log_internal_format.a  /usr/local/lib64/libabsl_log_internal_proto.a  /usr/local/lib64/libabsl_log_internal_log_sink_set.a  /usr/local/lib64/libabsl_log_internal_globals.a  /usr/local/lib64/libabsl_log_globals.a  /usr/local/lib64/libabsl_hash.a  /usr/local/lib64/libabsl_city.a  /usr/local/lib64/libabsl_bad_variant_access.a  /usr/local/lib64/libabsl_low_level_hash.a  /usr/local/lib64/libabsl_log_sink.a  /usr/local/lib64/libabsl_log_entry.a  /usr/local/lib64/libabsl_status.a  /usr/local/lib64/libabsl_cord.a  /usr/local/lib64/libabsl_cordz_info.a  /usr/local/lib64/libabsl_cord_internal.a  /usr/local/lib64/libabsl_cordz_functions.a  /usr/local/lib64/libabsl_exponential_biased.a  /usr/local/lib64/libabsl_cordz_handle.a  /usr/local/lib64/libabsl_crc_cord_state.a  /usr/local/lib64/libabsl_crc32c.a  /usr/local/lib64/libabsl_crc_internal.a  /usr/local/lib64/libabsl_crc_cpu_detect.a  /usr/local/lib64/libabsl_strerror.a  /usr/local/lib64/libabsl_str_format_internal.a  /usr/local/lib64/libabsl_vlog_config_internal.a  /usr/local/lib64/libabsl_bad_optional_access.a  /usr/local/lib64/libabsl_synchronization.a  /usr/local/lib64/libabsl_stacktrace.a  /usr/local/lib64/libabsl_symbolize.a  /usr/local/lib64/libabsl_debugging_internal.a  /usr/local/lib64/libabsl_demangle_internal.a  /usr/local/lib64/libabsl_demangle_rust.a  /usr/local/lib64/libabsl_decode_rust_punycode.a  /usr/local/lib64/libabsl_utf8_for_code_point.a  /usr/local/lib64/libabsl_graphcycles_internal.a  /usr/local/lib64/libabsl_malloc_internal.a  /usr/local/lib64/libabsl_kernel_timeout_internal.a  /usr/local/lib64/libabsl_time.a  /usr/local/lib64/libabsl_civil_time.a  /usr/local/lib64/libabsl_time_zone.a  /usr/local/lib64/libabsl_log_internal_fnmatch.a  /usr/local/lib64/libabsl_strings.a  /usr/local/lib64/libabsl_int128.a  /usr/local/lib64/libabsl_strings_internal.a  /usr/local/lib64/libabsl_string_view.a  /usr/local/lib64/libabsl_base.a  /usr/local/lib64/libabsl_spinlock_wait.a  -lrt  /usr/local/lib64/libabsl_throw_delegate.a  /usr/local/lib64/libabsl_raw_logging_internal.a  /usr/local/lib64/libabsl_log_severity.a  -lpthread && :

So if we do something like this, it should work on both platforms:

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  find_package(Python3 COMPONENTS Interpreter Development)
else()
  find_package(Python3 COMPONENTS Interpreter Development.Module)
endif()

I don't know if this behavior is routed in cmake or swig, but this should make it work for both platforms. Would this be acceptable?

I'm checking windows now...

@andyneff
Copy link
Contributor

andyneff commented Dec 3, 2024

 ld: symbol(s) not found for architecture arm64
c++: error: linker command failed with exit code 1 (use -v to see invocation)

What's the full error? What symbols aren't found?

I had a lot of problem building s2geometry without C++20.

Is this because your abseil-cpp was built with C++20? I compile both with C++17 with no problems.

I'll open a separate issue for this

@jmr
Copy link
Member

jmr commented Dec 3, 2024

I don't know if this behavior is routed in cmake or swig

Seems like it should be cmake. Swig doesn't manage the paths. Could you file a bug with cmake and/or ask for help from them?

Would this be acceptable?

Yes, that's fine. Put a comment explaining why it's a special case and pointing to this issue.

@andyneff
Copy link
Contributor

andyneff commented Dec 3, 2024

Can confirm, Development.Module works on Windows

Windows setup
choco install openssl swig

python -m venv %USERPROFILE%\venv
%USERPROFILE%\venv\Scripts\activate.bat
pip install build cmake_build_extension wheel build

git clone https://github.com/abseil/abseil-cpp.git %USERPROFILE%\src\absl -b 20240722.0
cd %USERPROFILE%\absl
cmake -B %USERPROFILE%\src\absl\build -DCMAKE_PREFIX_PATH=%USERPROFILE%\src\absl\install -DCMAKE_INSTALL_PREFIX=%USERPROFILE%\src\absl\install -DABSL_ENABLE_INSTALL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_CXX_STANDARD=20 -DBUILD_TESTING=OFF -DABSL_BUILD_TESTING=OFF
cmake --build %USERPROFILE%\src\absl\build --config Release --target install

git clone https://github.com/google/s2geometry %USERPROFILE%\src\s2geometry -b v0.11.1
cd %USERPROFILE%\src\s2geometry
python -m build --wheel . "-C--global-option=build_ext" "-C--global-option=-DBUILD_TESTS=OFF;CMAKE_CXX_STANDARD=20;CMAKE_PREFIX_PATH=%USERPROFILE%\src\absl\install"

andyneff added a commit to andyneff/s2geometry that referenced this issue Dec 3, 2024
- Closes google#398

Signed-off-by: Andy Neff <andy@visionsystemsinc.com>
@andyneff
Copy link
Contributor

andyneff commented Dec 3, 2024

 ld: symbol(s) not found for architecture arm64
c++: error: linker command failed with exit code 1 (use -v to see invocation)

What's the full error? What symbols aren't found?

I had a lot of problem building s2geometry without C++20.

Is this because your abseil-cpp was built with C++20? I compile both with C++17 with no problems.

Can confirm, that when I set both to C++17, it behaves. It's possible I wasn't setting C++XX at all in absl, thinking it was 17 by default, and that was messing things up. I'll chalk it up to user error and focus on the input(3) error

jmr pushed a commit that referenced this issue Dec 4, 2024
Mac seems to use dynamic linking more for making modules than Linux and
Windows do. Thus the common python symbols were missing and it requires
libpython3.13.dylib for these symbols. If this is a different in the mac
"Framework" then cmake should probably include that for the
Development.Module component. But this is a workaround in the meantime
while we wait for any upstream fixes.

Closes #398

Signed-off-by: Andy Neff <andy@visionsystemsinc.com>
@jmr jmr closed this as completed in #399 Dec 4, 2024
@jmr
Copy link
Member

jmr commented Dec 4, 2024

@andyneff Do you think you can reproduce this with some minimal example like https://github.com/Mizux/cmake-swig and file an upstream bug report?

@andyneff
Copy link
Contributor

andyneff commented Dec 4, 2024

Upstream bug report is filed here: https://gitlab.kitware.com/cmake/cmake/-/issues/26503

@b4rdos
Copy link
Author

b4rdos commented Dec 5, 2024

Thanks @jmr and @andyneff for fixing this!

jmr pushed a commit that referenced this issue Dec 6, 2024
Replace `$Python3_LIBRARIES` with `Python3::Module` in`swig_link_libraries`.

This is a better resolution to #398

Tested on Linux (in python and manylinux docker images), Windows 11 w/
VS 2022, and macOS.

The
[officially suggested fix](https://gitlab.kitware.com/cmake/cmake/-/issues/26503#note_1600940)
works, and feels much better than my initial workaround.

Signed-off-by: Andy Neff <andy@visionsystemsinc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants