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

[MacOS] Python Build Fails #195

Closed
sukritkalra opened this issue Jan 26, 2022 · 6 comments
Closed

[MacOS] Python Build Fails #195

sukritkalra opened this issue Jan 26, 2022 · 6 comments

Comments

@sukritkalra
Copy link
Collaborator

We started seeing the following error while linking after restructuring the project layout in #189.

The error is as follows:

note: Undefined symbols for architecture x86_64:
            "_PyList_Append", referenced from:
                pyo3::types::list::PyList::append::_$u7b$$u7b$closure$u7d$$u7d$::hb3ee2e9f284d525d in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.11.rcgu.o)
            "_PyBytes_FromStringAndSize", referenced from:
                pyo3::types::bytes::PyBytes::new::h2346bc142757f449 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.10.rcgu.o)
            "_PyGILState_Release", referenced from:
                _$LT$pyo3..gil..GILGuard$u20$as$u20$core..ops..drop..Drop$GT$::drop::h0875490cce98b755 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.8.rcgu.o)
            "_Py_IsInitialized", referenced from:
                pyo3::gil::GILGuard::acquire::_$u7b$$u7b$closure$u7d$$u7d$::hd3c8560dc835bafa in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.8.rcgu.o)
            "_PyExc_ValueError", referenced from:
                _$LT$pyo3..exceptions..PyValueError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h203baf438139c41f in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
            "_PyEval_ThreadsInitialized", referenced from:
                pyo3::gil::GILGuard::acquire::_$u7b$$u7b$closure$u7d$$u7d$::hd3c8560dc835bafa in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.8.rcgu.o)
            "_PyExc_RuntimeError", referenced from:
                _$LT$pyo3..exceptions..PyRuntimeError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h5d98c20758e049cf in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
            "_PyExc_OverflowError", referenced from:
                _$LT$pyo3..exceptions..PyOverflowError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h1264959a788b625e in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
            "_PyExc_AttributeError", referenced from:
                _$LT$pyo3..exceptions..PyAttributeError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h444faae03f915602 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
            "_PyExc_BaseException", referenced from:
                _$LT$pyo3..exceptions..PyBaseException$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::hf9a5e6af9086ad35 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
            "_PyNumber_Index", referenced from:
                pyo3::types::num::_$LT$impl$u20$pyo3..conversion..FromPyObject$u20$for$u20$u64$GT$::extract::h98d5978ac258bae4 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PySequence_Check", referenced from:
                _$LT$pyo3..types..sequence..PySequence$u20$as$u20$pyo3..conversion..PyTryFrom$GT$::try_from::h2dc65b78675b0ceb in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyGILState_Ensure", referenced from:
                pyo3::gil::GILGuard::acquire_unchecked::hc686c27195a27bb3 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.8.rcgu.o)
            "_PyCFunction_NewEx", referenced from:
                pyo3::types::function::PyCFunction::internal_new_from_pointers::h3dfba0bb2114f4ef in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyErr_Print", referenced from:
                pyo3::err::panic_after_error::hf97c212b8c021511 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyErr_NormalizeException", referenced from:
                pyo3::err::PyErr::normalized::h40e8f4bd4677a4be in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyErr_GivenExceptionMatches", referenced from:
                pyo3::err::PyErr::is_instance::h6d8c078c385141c4 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyErr_PrintEx", referenced from:
                pyo3::err::PyErr::take::h5624bb2bfe614f3f in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
                pyo3::err::PyErr::print::h94540702bdf29637 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyObject_Str", referenced from:
                pyo3::types::any::PyAny::str::hc6e5d7ce429ff947 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
            "_PyObject_Repr", referenced from:
                pyo3::types::any::PyAny::repr::h2e828644f171a29c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
            "_PyObject_SetAttrString", referenced from:
                pyo3::type_object::initialize_tp_dict::h85474ffa22186f1c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.9.rcgu.o)
            "_PyLong_AsUnsignedLongLong", referenced from:
                pyo3::types::num::_$LT$impl$u20$pyo3..conversion..FromPyObject$u20$for$u20$u64$GT$::extract::h98d5978ac258bae4 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyBool_Type", referenced from:
                pyo3::ffi::boolobject::PyBool_Check::he43343da1f685b26 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
            "_PyImport_AddModule", referenced from:
                pyo3::python::Python::run_code::hcdebb70890cc601b in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.3.rcgu.o)
            "_PyUnicode_FromStringAndSize", referenced from:
                pyo3::types::string::PyString::new::ha54147c354b58f93 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.13.rcgu.o)
            "_PyObject_GenericSetDict", referenced from:
                pyo3::pyclass::push_dict_getset::h1f5b8f42adcfeda9 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.14.rcgu.o)
            "_PyDict_New", referenced from:
                pyo3::types::dict::PyDict::new::he5971f940984fcf9 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.6.rcgu.o)
            "_PyBaseObject_Type", referenced from:
                _$LT$pyo3..types..any..PyAny$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h8201a6fbce7cd3d2 in erdos_python.252pvga0nl19qj44.rcgu.o
                _$LT$pyo3..pyclass_init..PyNativeTypeInitializer$LT$T$GT$$u20$as$u20$pyo3..pyclass_init..PyObjectInit$LT$T$GT$$GT$::into_new_object::h8e220cd96ee46e30 in erdos_python.2ze6cujhuouzjoit.rcgu.o
                _$LT$pyo3..pycell..PyCellBase$LT$U$GT$$u20$as$u20$pyo3..pycell..PyCellLayout$LT$T$GT$$GT$::tp_dealloc::h17cb07af0edd0e70 in erdos_python.xm8924r44o4qwn0.rcgu.o
            "_PyImport_Import", referenced from:
                pyo3::types::module::PyModule::import::h12ce7f05bb31e648 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.2.rcgu.o)
            "__Py_Dealloc", referenced from:
                pyo3::ffi::object::Py_DECREF::hd1cf0d0adcd38b6f in erdos_python.flqabfgcxz43r2.rcgu.o
                pyo3::ffi::object::Py_DECREF::h1249eddce9b41e89 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyIter_Next", referenced from:
                _$LT$$RF$pyo3..types..iterator..PyIterator$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::h26f75ab62926198b in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.2.rcgu.o)
            "__Py_NoneStruct", referenced from:
                pyo3::ffi::object::Py_None::h4bb72b47c0c5129b in erdos_python.flqabfgcxz43r2.rcgu.o
                pyo3::ffi::object::Py_None::h32f1dc2ca1a0868c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyType_IsSubtype", referenced from:
                pyo3::ffi::object::PyObject_TypeCheck::h3da3a145cdfbe1b5 in erdos_python.flqabfgcxz43r2.rcgu.o
            "_PyEval_SaveThread", referenced from:
                pyo3::python::Python::allow_threads::h105c4d9ad13befb9 in erdos_python.47v7y8yi72iy0ab7.rcgu.o
                pyo3::python::Python::allow_threads::h69605b42ca1ef95b in erdos_python.47v7y8yi72iy0ab7.rcgu.o
                pyo3::python::Python::allow_threads::h7824bca5b6f5f49d in erdos_python.47v7y8yi72iy0ab7.rcgu.o
                pyo3::python::Python::allow_threads::hfd1a779d7cdd9773 in erdos_python.47v7y8yi72iy0ab7.rcgu.o
            "_PyObject_Free", referenced from:
                pyo3::pyclass::tp_init_additional::h07f065dc15e0fac8 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h0a1fb2a3f3c89217 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h1a0fe46809097c9c in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h2ebe2ca40cef899e in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h9383fcab93ae7dbd in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h9bab9da1bcf38e80 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::hbf26ca353ae9dd4a in erdos_python.bisr1ua0raercj2.rcgu.o
                ...
            "_PyObject_GetIter", referenced from:
                pyo3::types::iterator::PyIterator::from_object::h76aed69c8e87d3de in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.2.rcgu.o)
            "_PyDict_Next", referenced from:
                _$LT$pyo3..types..dict..PyDictIterator$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::h4cd638da7f9214e0 in erdos_python.4w86bcgc2lc4wulx.rcgu.o
            "_PyObject_Malloc", referenced from:
                pyo3::pyclass::tp_init_additional::h07f065dc15e0fac8 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h0a1fb2a3f3c89217 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h1a0fe46809097c9c in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h2ebe2ca40cef899e in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h9383fcab93ae7dbd in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::h9bab9da1bcf38e80 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::tp_init_additional::hbf26ca353ae9dd4a in erdos_python.bisr1ua0raercj2.rcgu.o
                ...
            "_PyObject_SetAttr", referenced from:
                pyo3::types::any::PyAny::setattr::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h5b3c6bc73b3bdf20 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
                pyo3::types::any::PyAny::setattr::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hc162aa0ccbde8787 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
            "_PyEval_RestoreThread", referenced from:
                _$LT$pyo3..python..Python..allow_threads..RestoreGuard$u20$as$u20$core..ops..drop..Drop$GT$::drop::h79064b282515ab41 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.3.rcgu.o)
            "_PyObject_GenericGetDict", referenced from:
                pyo3::pyclass::push_dict_getset::h1f5b8f42adcfeda9 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.14.rcgu.o)
            "_PyErr_Fetch", referenced from:
                pyo3::err::PyErr::take::h5624bb2bfe614f3f in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "__Py_NotImplementedStruct", referenced from:
                pyo3::ffi::object::Py_NotImplemented::h9a3eb059dd172efc in erdos_python.flqabfgcxz43r2.rcgu.o
            "_PyUnicode_AsUTF8AndSize", referenced from:
                pyo3::types::string::PyString::to_str::hcb33794189cc9c57 in erdos_python.6zhjd1eskm0r3j3.rcgu.o
                pyo3::types::string::PyString::to_str::h99a9ffeded43257e in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.13.rcgu.o)
            "_PyExc_TypeError", referenced from:
                _$LT$pyo3..exceptions..PyTypeError$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::hebc536565292a07c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.0.rcgu.o)
            "_PyErr_NewException", referenced from:
                pyo3::err::PyErr::new_type::hb9190e49e1c74123 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "__Py_TrueStruct", referenced from:
                pyo3::ffi::boolobject::Py_True::h685a8e11c1f9a93c in erdos_python.18yekmqo97jwh5vu.rcgu.o
                pyo3::ffi::boolobject::Py_True::hc99fcef93ce2dd43 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
            "_PyObject_GetAttr", referenced from:
                pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::h2515ddd9bd89d8a4 in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::h577f4c78d15d3649 in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::ha861ea35d8e3fe9f in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::hfdc7f67ae598d8dd in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::instance::Py$LT$T$GT$::getattr::_$u7b$$u7b$closure$u7d$$u7d$::h3f71a55a17e1edb5 in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::types::any::PyAny::getattr::_$u7b$$u7b$closure$u7d$$u7d$::hd9c9066e5cbf8344 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.7.rcgu.o)
            "_PyEval_EvalCode", referenced from:
                pyo3::python::Python::run_code::hcdebb70890cc601b in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.3.rcgu.o)
            "_PyModule_GetName", referenced from:
                pyo3::types::module::PyModule::name::h62b90ec1e5c09e4c in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.2.rcgu.o)
            "_PyTuple_SetItem", referenced from:
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$$RP$$GT$::into_py::h641f4545f1f0d914 in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h148c64488e997267 in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$C$T2$RP$$GT$::into_py::hdc86ffabd05cec8d in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..any..PyAny$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h2008c562eea6cf75 in erdos_python.8sejcmq4e5nz023.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$$RP$$GT$::into_py::h7a4bfbe9345af1ec in erdos_python.cegfz3138195vk1.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h036143c23271057d in erdos_python.drmlcrq1aamodz1.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$C$T2$RP$$GT$::into_py::h507b191e1a71e8d4 in erdos_python.drmlcrq1aamodz1.rcgu.o
                ...
            "_PyErr_Restore", referenced from:
                pyo3::err::PyErr::restore::h9927ce6bbda65927 in erdos_python.4qjcay4yuyg1tqjv.rcgu.o
                pyo3::err::PyErr::take::h5624bb2bfe614f3f in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
                pyo3::err::PyErr::restore::h3b8e8880de9cd0f6 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.15.rcgu.o)
            "_PyBytes_AsString", referenced from:
                pyo3::types::bytes::PyBytes::as_bytes::h5ea66dda28d9eac9 in erdos_python.47b46rh3qn2mwosw.rcgu.o
                pyo3::types::bytes::PyBytes::as_bytes::h099652a35b3bdc12 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.10.rcgu.o)
            "_PyType_FromSpec", referenced from:
                pyo3::pyclass::create_type_object::h181fe10035563334 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::create_type_object::h34f4e0969eb9a036 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::create_type_object::h60ccaad2d05d21e5 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::create_type_object::h7e75473202f0e72c in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::create_type_object::h800d89c5a27df072 in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::create_type_object::h95336a2d8ddd0a5e in erdos_python.bisr1ua0raercj2.rcgu.o
                pyo3::pyclass::create_type_object::haa61076de53ecc77 in erdos_python.bisr1ua0raercj2.rcgu.o
                ...
            "__Py_FalseStruct", referenced from:
                pyo3::ffi::boolobject::Py_False::ha783acfd459976ba in erdos_python.18yekmqo97jwh5vu.rcgu.o
            "_PyType_GenericAlloc", referenced from:
                _$LT$pyo3..pyclass_init..PyNativeTypeInitializer$LT$T$GT$$u20$as$u20$pyo3..pyclass_init..PyObjectInit$LT$T$GT$$GT$::into_new_object::h8e220cd96ee46e30 in erdos_python.2ze6cujhuouzjoit.rcgu.o
            "_PyBytes_Size", referenced from:
                pyo3::types::bytes::PyBytes::as_bytes::h5ea66dda28d9eac9 in erdos_python.47b46rh3qn2mwosw.rcgu.o
                pyo3::types::bytes::PyBytes::as_bytes::h099652a35b3bdc12 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.10.rcgu.o)
            "_PyLong_FromUnsignedLongLong", referenced from:
                pyo3::types::num::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..any..PyAny$GT$$GT$$u20$for$u20$u64$GT$::into_py::hc88d51cb7e9e88ee in erdos_python.3creat87iwuzxe8.rcgu.o
            "_PyModule_Create2", referenced from:
                pyo3::ffi::modsupport::PyModule_Create::hff6a74f055b5e865 in erdos_python.3cap3utahqi1jyp0.rcgu.o
            "_PyObject_Call", referenced from:
                pyo3::types::any::PyAny::call::h130601c19f73817f in erdos_python.2v9ruangams3xknl.rcgu.o
                pyo3::types::any::PyAny::call::h5986e7ee6bd0ea9d in erdos_python.2v9ruangams3xknl.rcgu.o
                pyo3::types::any::PyAny::call::hd4b2f85fd2143aec in erdos_python.2v9ruangams3xknl.rcgu.o
                pyo3::types::any::PyAny::call::hdf92234573a52e47 in erdos_python.2v9ruangams3xknl.rcgu.o
                pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::h2515ddd9bd89d8a4 in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::h577f4c78d15d3649 in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::instance::Py$LT$T$GT$::call_method::_$u7b$$u7b$closure$u7d$$u7d$::ha861ea35d8e3fe9f in erdos_python.4o69xy5l91ev29mc.rcgu.o
                ...
            "_PyUnicode_AsEncodedString", referenced from:
                pyo3::types::string::PyString::to_string_lossy::h99ed9dd46021602b in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.13.rcgu.o)
            "_PyDict_SetItem", referenced from:
                pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h09184eb549aeac8d in erdos_python.1gxqznnivutptqz0.rcgu.o
                pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h105b85e719a64457 in erdos_python.1gxqznnivutptqz0.rcgu.o
                pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h10dbc39666f1ce96 in erdos_python.1gxqznnivutptqz0.rcgu.o
                pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h82681fffbe929671 in erdos_python.1gxqznnivutptqz0.rcgu.o
                pyo3::types::dict::PyDict::set_item::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb0c73846b22b590f in erdos_python.1gxqznnivutptqz0.rcgu.o
            "_Py_CompileStringExFlags", referenced from:
                pyo3::ffi::cpython::pythonrun::Py_CompileString::h5bfa27fc58620660 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.9.rcgu.o)
            "_PyTuple_New", referenced from:
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$$RP$$GT$::into_py::h641f4545f1f0d914 in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h148c64488e997267 in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$T1$C$T2$RP$$GT$::into_py::hdc86ffabd05cec8d in erdos_python.4o69xy5l91ev29mc.rcgu.o
                pyo3::types::tuple::PyTuple::new::h2e150a5ca7556a94 in erdos_python.555cx17egk1h4r95.rcgu.o
                pyo3::types::tuple::PyTuple::new::h57a2cd2bab15c7e9 in erdos_python.555cx17egk1h4r95.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..any..PyAny$GT$$GT$$u20$for$u20$$LP$T0$C$T1$RP$$GT$::into_py::h2008c562eea6cf75 in erdos_python.8sejcmq4e5nz023.rcgu.o
                pyo3::types::tuple::_$LT$impl$u20$pyo3..conversion..IntoPy$LT$pyo3..instance..Py$LT$pyo3..types..tuple..PyTuple$GT$$GT$$u20$for$u20$$LP$T0$C$$RP$$GT$::into_py::h7a4bfbe9345af1ec in erdos_python.cegfz3138195vk1.rcgu.o
                ...
            "_PySequence_Size", referenced from:
                pyo3::types::sequence::PySequence::len::hfc6ab9ea310fc9ec in erdos_python.2091xl2n4rgokxox.rcgu.o
            "_PyExc_Exception", referenced from:
                _$LT$pyo3..exceptions..PyException$u20$as$u20$pyo3..type_object..PyTypeInfo$GT$::type_object_raw::h7c4f62a11ebdcf87 in erdos_python.2hgwowqwktp2ewkg.rcgu.o
            "_PyModule_GetDict", referenced from:
                pyo3::python::Python::run_code::_$u7b$$u7b$closure$u7d$$u7d$::habb39b51ba033263 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.3.rcgu.o)
            "_PyList_New", referenced from:
                pyo3::types::list::new_from_iter::h9b38ca1132715523 in erdos_python.4yq4p61w6u6q9tze.rcgu.o
                pyo3::types::list::PyList::empty::he2dc7cfee39014a8 in libpyo3-5c021ee12bba24f4.rlib(pyo3-5c021ee12bba24f4.pyo3.fc75e33f-cgu.11.rcgu.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

System details as follows:

Python version: 3.7.12
MacOS version: 12.1
Command Line Tools version: 13.2.0.0.1.1638488800
@sukritkalra
Copy link
Collaborator Author

@objorkman Can you let us know your Python, MacOS and Command Line tools version if the build succeeds on your Mac?

@objorkman
Copy link
Contributor

Potential workaround: PyO3/rust-numpy#223
Tested on M1 mac

@pschafhalter pschafhalter changed the title Python Build Fails on x86-64 Mac [MacOS] Python Build Fails Jan 26, 2022
@pschafhalter
Copy link
Member

pschafhalter commented Jan 26, 2022

PyO3/pyo3#341 might be related. Can someone on MacOS try the workaround proposed in the PyO3 FAQ?

Would be happy to merge that change if it fixes MacOS support.

@pschafhalter
Copy link
Member

pschafhalter commented Jan 26, 2022

They also suggest another fix (similar to the workaround @objorkman found), which involves adding a build.rs file:
https://pyo3.rs/latest/building_and_distribution.html#macos

@objorkman
Copy link
Contributor

If building on M1, create a file .cargo/config.toml with

[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

to fix this build issue (cc. PyO3/rust-numpy#223)

@sukritkalra
Copy link
Collaborator Author

Closing because building using maturin on Mac solves the linker issues.

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

No branches or pull requests

3 participants