tembo-io / pg_vectorize

The simplest way to build AI workloads on Postgres
https://tembo.io/pg_vectorize/
739 stars 33 forks source link

Does not compile on MacOS with ARM64 #75

Closed Amandrs closed 8 months ago

Amandrs commented 8 months ago

pg_vectorize fails at linking step on macos with arm64 cpu

MacOS Ventura 13.5.2 postresql@16 from brew cargo-pgrx 0.11.3 pg_vectorize on main is πŸ“¦ v0.12.0 via 🐍 v3.12.2 via πŸ¦€ v1.76.0

❯ cargo build -F pg16 --no-default-features --release Compiling vectorize v0.12.0 (/Users/amand/Code/rust/pg_vectorize) error: linking with cc failed: exit status: 1 | = note: env -u IPHONEOS_DEPLOYMENT_TARGET -u TVOS_DEPLOYMENT_TARGET LC_ALL="C" PATH="/Users/amand/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/amand/.nvm/versions/node/v21.4.0/bin:/Users/amand/.pyenv/plugins/pyenv-virtualenv/shims:/Users/amand/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Applications/Little Snitch.app/Contents/Components:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/amand/.cargo/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-Wl,-exported_symbols_list,/var/folders/mj/84nrvbm95mg4cjj35nzbkf8m0000gn/T/rustcjGJnxU/list" "-arch" "arm64" "/var/folders/mj/84nrvbm95mg4cjj35nzbkf8m0000gn/T/rustcjGJnxU/symbols.o" "/Users/amand/Code/rust/pg_vectorize/target/release/deps/vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o" "-L" "/Users/amand/Code/rust/pg_vectorize/target/release/deps" "-L" "/Users/amand/Code/rust/pg_vectorize/target/release/build/ring-bc7e01ed46da9ba3/out" "-L" "/Users/amand/Code/rust/pg_vectorize/target/release/build/pgrx-pg-sys-54e242d0c42e4451/out/cshim" "-L" "/Users/amand/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/var/folders/mj/84nrvbm95mg4cjj35nzbkf8m0000gn/T/rustcjGJnxU/libring-fc8b8899eb8144c7.rlib" "/var/folders/mj/84nrvbm95mg4cjj35nzbkf8m0000gn/T/rustcjGJnxU/libpgrx_pg_sys-d04e234c3518a98c.rlib" "/Users/amand/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-4010f8e9d1f7f9aa.rlib" "-framework" "SystemConfiguration" "-framework" "CoreFoundation" "-framework" "SystemConfiguration" "-framework" "Security" "-framework" "CoreFoundation" "-liconv" "-lSystem" "-lc" "-lm" "-L" "/Users/amand/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/Users/amand/Code/rust/pg_vectorize/target/release/deps/libvectorize.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-dylib" "-nodefaultlibs" = note: Undefined symbols for architecture arm64: "_AllocSetContextCreateInternal", referenced from: pgrx_pg_sys::include::pg16::AllocSetContextCreateInternal::h48e753d60e68ecb3 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_ArrayGetNItems", referenced from: pgrx::fcinfo::pg_12_13_14_15::pg_getarg::h7bf79eafb0c8f3bb in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_BackgroundWorkerUnblockSignals", referenced from: vectorize::workers::pg_bgw::background_worker_main::background_worker_main_inner::hac0782903ca83151 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_CacheMemoryContext", referenced from: pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::h8c3b9035194c8c65 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::he9c03f8bb07a1e00 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::value::h72786915d7442637 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_CopyErrorData", referenced from: pgrx_pg_sys::include::pg16::CopyErrorData::hf142ced09afb694d in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_CurTransactionContext", referenced from: pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::h8c3b9035194c8c65 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::he9c03f8bb07a1e00 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::value::h72786915d7442637 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_CurrentMemoryContext", referenced from: pgrx_pg_sys::submodules::panic::run_guarded::h0a9c46ae8db910ab in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx_pg_sys::submodules::panic::run_guarded::h9626df21590488fa in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx_pg_sys::submodules::panic::run_guarded::hac4aa4b1638e3983 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx_pg_sys::submodules::panic::run_guarded::hcf6f2763052aa628 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx_pg_sys::submodules::panic::run_guarded::hd816676536c6544e in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::spi::tuple::SpiTupleTable::get::h67abb0906328494f in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::spi::tuple::SpiTupleTable::get::ha6a211ca3f3774c9 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o ... "_DefineCustomIntVariable", referenced from: pgrx::guc::GucRegistry::define_int_guc::hefba8b86c826dae4 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_DefineCustomStringVariable", referenced from: pgrx::guc::GucRegistry::define_string_guc::hb4c74f06405a0a6d in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_ErrorContext", referenced from: pgrx_pg_sys::submodules::panic::run_guarded::h0a9c46ae8db910ab in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::h8c3b9035194c8c65 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::he9c03f8bb07a1e00 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o _table_wrapper in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o _search_wrapper in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o _transform_embeddings_wrapper in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o ... "_FreeErrorData", referenced from: pgrx_pg_sys::include::pg16::FreeErrorData::h6a47c66d19238b6f in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_GetCurrentTransactionId", referenced from: pgrx::spi::Spi::mark_mutable::h94fc36dcab4373f2 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_GetCurrentTransactionIdIfAny", referenced from: pgrx_pg_sys::include::pg16::GetCurrentTransactionIdIfAny::h0cb3c5756dbc166f in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_GetDatabaseEncoding", referenced from: core::ops::function::FnOnce::call_once::hcc72009a59efa014 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_InterruptPending", referenced from: vectorize::workers::pg_bgw::background_worker_main::background_worker_main_inner::hac0782903ca83151 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_IsBinaryCoercible", referenced from: pgrx_pg_sys::include::pg16::IsBinaryCoercible::hb090d15f76c79844 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_MemoryContextAlloc", referenced from: pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_MemoryContextDelete", referenced from: pgrx_pg_sys::include::pg16::MemoryContextDelete::hf3a54630298bb39e in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_MemoryContextGetParent", referenced from: pgrx::memcxt::PgMemoryContexts::parent::h948067b320db4d7c in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_MemoryContextRegisterResetCallback", referenced from: pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_MemoryContextStrdup", referenced from: pgrx::memcxt::PgMemoryContexts::pstrdup::ha9c71121e713203d in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_MessageContext", referenced from: pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::h8c3b9035194c8c65 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::he9c03f8bb07a1e00 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::value::h72786915d7442637 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_MyBgworkerEntry", referenced from: vectorize::workers::pg_bgw::background_worker_main::background_worker_main_inner::hac0782903ca83151 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_MyLatch", referenced from: vectorize::workers::pg_bgw::background_worker_main::background_worker_main_inner::hac0782903ca83151 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::bgworkers::worker_spi_sighup::h196273ce5714b1fc in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::bgworkers::worker_spi_sigterm::hc6119632695b7041 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_PG_exception_stack", referenced from: pgrx_pg_sys::submodules::panic::run_guarded::hd816676536c6544e in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::fcinfo::pg_12_13_14_15::pg_getarg::h7bf79eafb0c8f3bb in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o vectorize::workers::pg_bgw::background_worker_main::background_worker_main_inner::hac0782903ca83151 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::bgworkers::worker_spi_sighup::h196273ce5714b1fc in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o core::ops::function::FnOnce::call_once::hcc72009a59efa014 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::lookup_type_name::hbc7dc8a67d7ce77b in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o ... "_PortalContext", referenced from: pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::h8c3b9035194c8c65 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::he9c03f8bb07a1e00 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::value::h72786915d7442637 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_PostmasterContext", referenced from: pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::h8c3b9035194c8c65 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::he9c03f8bb07a1e00 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::value::h72786915d7442637 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_ProcessConfigFile", referenced from: pgrx::bgworkers::worker_spi_sighup::h196273ce5714b1fc in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_ProcessInterrupts", referenced from: vectorize::workers::pg_bgw::background_worker_main::background_worker_main_inner::hac0782903ca83151 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_RegisterBackgroundWorker", referenced from: pgrx_pg_sys::submodules::panic::run_guarded::hd816676536c6544e in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_ReleaseSysCache", referenced from: pgrx::enum_helper::lookup_enum_by_oid::ha0012aad1dc0b4d0 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_ResetLatch", referenced from: pgrx_pg_sys::include::pg16::ResetLatch::h5d5489f405bbe5ff in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SPI_connect", referenced from: pgrx::spi::client::SpiConnection::connect::h21754503c3f2624f in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SPIexecute", referenced from: $LT$$RF$str$u20$as$u20$pgrx..spi..query..Query$GT$::execute::h340f806afccfcffe in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SPI_execute_withargs", referenced from: $LT$$RF$str$u20$as$u20$pgrx..spi..query..Query$GT$::execute::h340f806afccfcffe in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SPIfinish", referenced from: $LT$pgrx..spi..client..SpiConnection$u20$as$u20$core..ops..drop..Drop$GT$::drop::hfbf407dcd04d0e54 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SPI_fnumber", referenced from: pgrx_pg_sys::include::pg16::SPI_fnumber::hb59994bf15efa72f in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SPI_getbinval", referenced from: pgrx_pg_sys::include::pg16::SPI_getbinval::hd275528c0dacad7c in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SPI_gettypeid", referenced from: pgrx_pg_sys::include::pg16::SPI_gettypeid::h0b1f37f3504ede50 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SPIprocessed", referenced from: $LT$$RF$str$u20$as$u20$pgrx..spi..query..Query$GT$::execute::h340f806afccfcffe in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SPItuptable", referenced from: $LT$$RF$str$u20$as$u20$pgrx..spi..query..Query$GT$::execute::h340f806afccfcffe in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SearchSysCache", referenced from: pgrx::enum_helper::lookup_enum_by_oid::ha0012aad1dc0b4d0 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_SetLatch", referenced from: pgrx_pg_sys::include::pg16::SetLatch::hea1f93833f79a884 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_TopMemoryContext", referenced from: pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::h8c3b9035194c8c65 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::he9c03f8bb07a1e00 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::pstrdup::ha9c71121e713203d in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::value::h72786915d7442637 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_TopTransactionContext", referenced from: pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::h8c3b9035194c8c65 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::FromDatum::try_from_datum_in_memory_context::he9c03f8bb07a1e00 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::value::h72786915d7442637 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_WaitLatch", referenced from: pgrx_pg_sys::include::pg16::WaitLatch::hf6036168e1b7644c in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_accumArrayResult", referenced from: pgrx_pg_sys::include::pg16::accumArrayResult::hdf887cafc053c52c in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_end_MultiFuncCall", referenced from: pgrx_pg_sys::include::pg16::end_MultiFuncCall::hdc1b904418d0ea06 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_errcode", referenced from: pgrx_pg_sys::submodules::panic::do_ereport::h8fe2dc6e49456c20 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_errdetail", referenced from: pgrx_pg_sys::submodules::panic::do_ereport::h8fe2dc6e49456c20 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_errfinish", referenced from: pgrx_pg_sys::submodules::panic::do_ereport::h8fe2dc6e49456c20 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_errhint", referenced from: pgrx_pg_sys::submodules::panic::do_ereport::h8fe2dc6e49456c20 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_errmsg", referenced from: pgrx_pg_sys::submodules::panic::do_ereport::h8fe2dc6e49456c20 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_error_context_stack", referenced from: pgrx_pg_sys::submodules::panic::run_guarded::hd816676536c6544e in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::fcinfo::pg_12_13_14_15::pg_getarg::h7bf79eafb0c8f3bb in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::memcxt::PgMemoryContexts::leak_and_drop_on_delete::h98414528d3bf5549 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o vectorize::workers::pg_bgw::background_worker_main::background_worker_main_inner::hac0782903ca83151 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::bgworkers::worker_spi_sighup::h196273ce5714b1fc in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o core::ops::function::FnOnce::call_once::hcc72009a59efa014 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o pgrx::datum::from::lookup_type_name::hbc7dc8a67d7ce77b in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o ... "_errstart", referenced from: pgrx_pg_sys::submodules::panic::do_ereport::h8fe2dc6e49456c20 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_format_type_extended", referenced from: pgrx::datum::from::lookup_type_name::hbc7dc8a67d7ce77b in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_get_typlenbyvalalign", referenced from: pgrx::fcinfo::pg_12_13_14_15::pg_getarg::h7bf79eafb0c8f3bb in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_initArrayResult", referenced from: pgrx_pg_sys::include::pg16::initArrayResult::h87949852a227b9f4 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_init_MultiFuncCall", referenced from: pgrx_pg_sys::include::pg16::init_MultiFuncCall::hbf4c180bcbe2b2b2 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_jsonbin", referenced from: $LT$pgrx..datum..json..JsonB$u20$as$u20$pgrx..datum..into..IntoDatum$GT$::into_datum::hcdf313a2c6fda154 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_jsonbout", referenced from: $LT$pgrx..datum..json..JsonB$u20$as$u20$pgrx..datum..from..FromDatum$GT$::from_polymorphic_datum::h86598e8ef1f14265 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_makeArrayResult", referenced from: pgrx_pg_sys::include::pg16::makeArrayResult::h456bb5995cf07b1e in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_palloc", referenced from: pgrx_pg_sys::include::pg16::palloc::hfabbbe2f1829ec1c in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_palloc0", referenced from: pgrx_pg_sys::include::pg16::palloc0::hf706540d3b4c4c21 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_per_MultiFuncCall", referenced from: pgrx_pg_sys::include::pg16::per_MultiFuncCall::h787a2ccf94e8220b in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_pfree", referenced from: pgrx_pg_sys::include::pg16::pfree::hd7ae83ce9e27f1eb in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_pg_detoast_datum", referenced from: pgrx_pg_sys::include::pg16::pg_detoast_datum::hbc1a0e5d6552a344 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_pg_detoast_datum_packed", referenced from: pgrx_pg_sys::include::pg16::pg_detoast_datum_packed::h7a6a884365d136f8 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_pg_re_throw", referenced from: pgrx_pg_sys::submodules::panic::run_guarded::h0a9c46ae8db910ab in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o _table_wrapper in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o _search_wrapper in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o _transform_embeddings_wrapper in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o _init_rag_wrapper in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o _rag_wrapper in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o _job_execute_wrapper in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o ... "_pqsignal", referenced from: pgrx_pg_sys::include::pg16::pqsignal::h3c1654599947d607 in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o "_shmem_startup_hook", referenced from: pgrx_pg_sys::submodules::panic::run_guarded::hd816676536c6544e in vectorize.vectorize.5748552f13b70325-cgu.0.rcgu.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

ChuckHend commented 8 months ago

Hi @Amandrs ,

Thank you for raising the issue. What is in your ~/.cargo/config.toml? I think I resolved by adding some flags as shown below. There might be a better way to do this.

[target.'cfg(target_os="macos")']
rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"]
Amandrs commented 8 months ago

I had nothing into my "~/.cargo/config.toml", but with your tip, I can now build this project.

I tried to put this into the project's "cargo.toml", but this does not work. It would be nice to have a project specific (cargo.toml) tip :) Thanks

ChuckHend commented 8 months ago

Thats a good idea @Amandrs ! We'd accept a PR if you'd be so kind to take it. Otherwise we can get it pushed up too.

Amandrs commented 8 months ago

A project centric solution seems to :

this will provide a project centric rustflags information to be able to link the project

Amandrs commented 8 months ago

diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..132d9fd --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,3 @@ +[target.'cfg(target_os="macos")'] +rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"] +

ChuckHend commented 8 months ago

@Amandrs - are you going to contribute that in a PR? I can copy/paste that in if not...