-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Labels
Description
Description
Description
I try run cargo test
, and got error from build.rs about linking c.
I try run my fork, and original code. and got error both variants.
OS: ArchLinux
Compiling ext-php-rs v0.14.1 (/home/{user_name}/projects/ext-php-rs)
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" "/tmp/rustcXEh4wi/symbols.o" "<138 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "-lwrapper" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libtest-*,libgetopts-*,libunicode_width-*,librustc_std_workspace_std-*}.rlib" "/home/{user_name}/projects/ext-php-rs/target/debug/deps/{libparking_lot-4bd72f997ae16b5f.rlib,libparking_lot_core-590bfbfc57363a6c.rlib,liblibc-43066812c4c8251c.rlib,libsmallvec-64644a303f428ad8.rlib,liblock_api-637d68a6fe4443b7.rlib,libscopeguard-a63bb725de1bd702.rlib,libonce_cell-207bdd8dc13c14cd.rlib,libbitflags-f11fa94b971383c4.rlib,libcfg_if-e73cad4973762a27.rlib}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,libcfg_if-*,liblibc-*,liballoc-*,librustc_std_workspace_core-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/tmp/rustcXEh4wi/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/{user_name}/Repos/ext-php-rs/target/debug/build/ext-php-rs-bf22dea1c6de9801/out" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/{user_name}/Repos/ext-php-rs/target/debug/deps/ext_php_rs-074bb141aec48be7" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-Wl,-undefined,dynamic_lookup" "-Wl,-undefined,dynamic_lookup"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: /sbin/ld: /home/{user_name}/projects/ext-php-rs/target/debug/deps/ext_php_rs-074bb141aec48be7.0ejtlvbnsjv7lxgclmjurp13q.0c7ut9v.rcgu.o: in function `ext_php_rs::types::callable::ZendCallable::try_call':
/home/{user_name}/projects/ext-php-rs/src/types/callable.rs:133:(.text._ZN10ext_php_rs4args5tests22test_try_call_no_value17h0c9a8da015cdf543E+0x6ea): undefined reference to `_call_user_function_impl'
/sbin/ld: /home/{user_name}/projects/ext-php-rs/target/debug/deps/ext_php_rs-074bb141aec48be7.40tno150dkyj7ld9zlc8b16kz.0c7ut9v.rcgu.o: in function `ext_php_rs::types::zval::<impl ext_php_rs::ffi::_zval_struct>::is_callable':
/home/{user_name}/projects/ext-php-rs/src/types/zval.rs:444:(.text._ZN10ext_php_rs5types4zval47_$LT$impl$u20$ext_php_rs..ffi.._zval_struct$GT$11is_callable17h25fee64da5e76b93E+0x1a): undefined reference to `zend_is_callable'
/sbin/ld: /home/{user_name}/projects/ext-php-rs/target/debug/deps/ext_php_rs-074bb141aec48be7.40tno150dkyj7ld9zlc8b16kz.0c7ut9v.rcgu.o: in function `ext_php_rs::types::zval::<impl ext_php_rs::ffi::_zval_struct>::change_type':
/home/{user_name}/projects/ext-php-rs/src/types/zval.rs:671:(.text._ZN10ext_php_rs5types4zval47_$LT$impl$u20$ext_php_rs..ffi.._zval_struct$GT$11change_type17h536ce1bd47bb1a13E+0x13): undefined reference to `zval_ptr_dtor'
/sbin/ld: /home/{user_name}/projects/ext-php-rs/target/debug/build/ext-php-rs-bf22dea1c6de9801/out/libwrapper.a(ea708c7824d36062-wrapper.o): in function `zend_object_release':
/home/{user_name}/.phpbrew/php/php-8.4.10/include/php/Zend/zend_objects_API.h:77:(.text.ext_php_rs_zend_object_release+0x4e): undefined reference to `zend_objects_store_del'
/sbin/ld: /home/{user_name}/.phpbrew/php/php-8.4.10/include/php/Zend/zend_objects_API.h:79:(.text.ext_php_rs_zend_object_release+0x75): undefined reference to `gc_possible_root'
/sbin/ld: /home/{user_name}/projects/ext-php-rs/target/debug/build/ext-php-rs-bf22dea1c6de9801/out/libwrapper.a(ea708c7824d36062-wrapper.o): in function `ext_php_rs_executor_globals':
/home/{user_name}/projects/ext-php-rs/src/wrapper.c:39:(.text.ext_php_rs_executor_globals+0x7): undefined reference to `executor_globals'
collect2: error: ld returned 1 exit status
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)
warning: `ext-php-rs` (lib test) generated 1 warning (1 duplicate)
error: could not compile `ext-php-rs` (lib test) due to 1 previous error; 1 warning emitted
Repository
No response
I have already tried
- Searching the documentation and guide
- Searching existing issues