-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add macOS support #151
Merged
Merged
Add macOS support #151
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lzaoral
force-pushed
the
add-macos-support
branch
2 times, most recently
from
December 9, 2023 14:15
d905fbc
to
552e07f
Compare
TODO:
edit: done |
Ok, I forgot that sanitizers and GitHub's macOS machines do not like each other:
No idea why though, it works perfectly fine on my machine... |
... to fix the following build error on macOS: ``` [ 86%] Linking CXX shared library pycsdiff_py3/pycsdiff.dylib ld: Undefined symbols: _PyUnicode_FromStringAndSize, referenced from: boost::python::detail::caller_arity<2u>::impl<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>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&), boost::python::default_call_policies, boost::mpl::vector3<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>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>>::operator()(_object*, _object*) in pycsdiff.cc.o boost::python::objects::caller_py_function_impl<boost::python::detail::caller<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> (*)(), boost::python::default_call_policies, boost::mpl::vector1<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>::operator()(_object*, _object*) in pycsdiff.cc.o _PyUnicode_Type, referenced from: boost::python::detail::converter_target_type<boost::python::to_python_value<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>>::get_pytype() in pycsdiff.cc.o __Py_Dealloc, referenced from: boost::python::api::slice_nil::~slice_nil() in pycsdiff.cc.o void boost::python::def<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>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)>(char const*, 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>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)) in pycsdiff.cc.o void boost::python::def<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> (*)()>(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> (*)()) in pycsdiff.cc.o boost::python::api::object::~object() in pycsdiff.cc.o __Py_NoneStruct, referenced from: __GLOBAL__sub_I_pycsdiff.cc in pycsdiff.cc.o clang: error: linker command failed with exit code 1 (use -v to see invocation) ```
lzaoral
force-pushed
the
add-macos-support
branch
from
December 10, 2023 08:25
552e07f
to
e320e67
Compare
... to mark the intent that it is meant to be used by `dlopen` only. Consequently, this forces the library to always use the `.so` suffix which fixes the following test failure on macOS because Python ignores shared libraries with the native `.dylib` suffix. ``` pycsdiff_py3......................................***Failed 0.02 sec Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'pycsdiff' ```
lzaoral
force-pushed
the
add-macos-support
branch
from
December 10, 2023 08:39
e320e67
to
3d48602
Compare
lzaoral
force-pushed
the
add-macos-support
branch
from
December 10, 2023 09:36
3d48602
to
56ceca8
Compare
kdudka
approved these changes
Dec 11, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.