Qiskit / rustworkx

A high performance Python graph library implemented in Rust.
https://www.rustworkx.org
Apache License 2.0
1.11k stars 151 forks source link

Fails to build: failed to parse manifest at `/disk-samsung/freebsd-ports/math/py-retworkx/work-py39/retworkx-0.11.0/Cargo.toml` #653

Closed yurivict closed 2 years ago

yurivict commented 2 years ago
===>   Updating Cargo.lock
cd /disk-samsung/freebsd-ports/math/py-retworkx/work-py39/retworkx-0.11.0; /usr/bin/env CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 /usr/bin/env XDG_DATA_HOME=/disk-samsung/freebsd-ports/math/py-retworkx/work-py39  XDG_CONFIG_HOME=/disk-samsung/freebsd-ports/math/py-retworkx/work-py39  XDG_CACHE_HOME=/disk-samsung/freebsd-ports/math/py-retworkx/work-py39/.cache  HOME=/disk-samsung/freebsd-ports/math/py-retworkx/work-py39 TMPDIR="/disk-samsung/freebsd-ports/math/py-retworkx/work-py39" PATH=/disk-samsung/freebsd-ports/math/py-retworkx/work-py39/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PKG_CONFIG_LIBDIR=/disk-samsung/freebsd-ports/math/py-retworkx/work-py39/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LDSHARED="cc -shared" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS="-fno-omit-frame-pointer"  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer  "  MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" CARGO_HOME=/disk-samsung/freebsd-ports/math/py-retworkx/work-py39/cargo-home  CARGO_BUILD_JOBS=6  CARGO_BUILD_TARGET=x86_64-unknown-freebsd  CARGO_TARGET_DIR=/disk-samsung/freebsd-ports/math/py-retworkx/work-py39/target  CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER="cc"  RUSTC=/usr/local/bin/rustc  RUSTDOC=/usr/local/bin/rustdoc  RUSTFLAGS=" -C link-arg=-fstack-protector-strong" RUST_BACKTRACE=1 /usr/local/bin/cargo update  --manifest-path /disk-samsung/freebsd-ports/math/py-retworkx/work-py39/retworkx-0.11.0/Cargo.toml  --verbose  --verbose  
error: failed to parse manifest at `/disk-samsung/freebsd-ports/math/py-retworkx/work-py39/retworkx-0.11.0/Cargo.toml`

Caused by:
  virtual manifests must be configured with [workspace]
*** Error code 101

Information

mtreinish commented 2 years ago

I'm not exactly sure what the issue is here, Do you have a link to the freebsd port source for retworkx to see how they're bundling the source code? The python package builds fine from our source distribution release on pypi, because we bundled the retworkx-core rust crate source as part of the sdist. So I'm wondering if something is going wrong in the local copy used for the freebsd port.

That being said we also have made some changes to how the linking to the retworkx-core/rustworkx-core crate was don in: https://github.com/Qiskit/rustworkx/commit/a0aaa1f93ef21fe77dccee63cd37fdb8f43c7cee which might fix the issue too. Can you check that it fixes the issue.

yurivict commented 2 years ago

The problem is gone in the current head e9edfdc.

It looks like the project was renamed into rustworkx. Now it isn't clear how to integrate it into qiskit-terra because it still expects retworkx.

mtreinish commented 2 years ago

Right, we renamed the project in https://github.com/Qiskit/rustworkx/commit/7d253cea366484d7d1b33504fe30e4775aadce85 due to a request from the maintainers of NetworkX. The way the migration is being handled is that for the rest of the 0.x.y release series retworkx will still be published but as just a small python redirect shim. So if you import retworkx it redirects all of the calls to rustworkx under the covers. This should give downstream users (including qiskit) a sufficient chance to migrate. For the 1.0.0 release we're planning to drop the retworkx name from the rustworkx tree (but I plan to make the final retworkx release still just be a redirect shim that should work with any future version of rustworkx, it just won't be actively maintained). So for downstream packaging of retworkx from main (and 0.12.0 which hopefully should be released in a month or so) moving forward you can just build rustworkx as the base package (which only has a python dependency on numpy) then retworkx depends on rustworkx, and qiskit depends on retworkx.