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

inventory breaks linking #341

Open
ckaran opened this issue Feb 6, 2019 · 15 comments · May be fixed by #2135
Open

inventory breaks linking #341

ckaran opened this issue Feb 6, 2019 · 15 comments · May be fixed by #2135

Comments

@ckaran
Copy link

ckaran commented Feb 6, 2019

🐛 Bug Reports

I'm having linking errors when using v0.6.0-alpha.2 which I didn't have when using v0.6.0-alpha.1. The complete set of errors is at the end of this post, but the summary is that many python symbols are missing. I ran git bisect for all revisions between v0.6.0-alpha.1 and v0.6.0-alpha.2, and found that the first bad commit was ae8a37c.

🌍 Environment

  • Your operating system and version:
    Linux EMANE 4.15.0-45-generic some of PyNumberProtocol methods are broken #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux, Ubuntu 18.04.
  • Your python version:
    Python 3.7.1 [GCC 7.3.0]
  • How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?:
    Built from source, installed it to the default system location (/usr/local/bin/python3)
  • Your rust version (rustc --version):
    rustc 1.34.0-nightly (4b1e39b7b 2019-02-05)
  • Are you using the latest pyo3 version? Have you tried using latest master (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?
    I did try the latest master (9e53418) and the problem persisted (may have gotten worse, I didn't check the outputs between v0.6.0-alpha.2 and 9e53418).

💥 Reproducing

I tried creating a minimal example, but the minimal example fails to compile under v0.6.0-alpha.1 with the following:

error[E0119]: conflicting implementations of trait `pyo3::class::methods::PyMethodsProtocolImpl` for type `PyChannelIdentifier`:
  --> src/lib.rs:14:1
   |
14 | #[pymethods]
   | ^^^^^^^^^^^^
   |
   = note: conflicting implementation in crate `pyo3`:
           - impl<T> pyo3::class::methods::PyMethodsProtocolImpl for T;

error: aborting due to previous error

For more information about this error, try `rustc --explain E0119`.
error: Could not compile `pyo3_bug_report`.

And the same example compiles under v0.6.0-alpha.2, but fails to lead into python with the following
error:

cfkaran2@EMANE:~/Desktop/pyo3_bug_report/target/release$ python3
Python 3.7.1 (default, Nov 13 2018, 16:55:45) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyo3_bug_report
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define module export function (PyInit_pyo3_bug_report)
>>> 

This is all very weird, because I can compile and load my regular code without any trouble. If you can tell me what to do to get around these bugs, I can create a new minimal example to show you.

Compiler output:

    Updating git repository `https://github.com/SergiusIW/collider-rs`
    Updating crates.io index
   Compiling semver-parser v0.7.0
   Compiling libc v0.2.48
   Compiling autocfg v0.1.2
   Compiling proc-macro2 v0.4.27
   Compiling memchr v2.1.3
   Compiling rand_core v0.4.0
   Compiling arrayvec v0.4.10
   Compiling cfg-if v0.1.6
   Compiling spin v0.4.10
   Compiling unicode-xid v0.1.0
   Compiling ucd-util v0.1.3
   Compiling nodrop v0.1.13
   Compiling regex v1.1.0
   Compiling proc-macro-hack-impl v0.4.1
   Compiling memoffset v0.2.1
   Compiling utf8-ranges v1.0.2
   Compiling scopeguard v0.3.3
   Compiling num-traits v0.2.6
   Compiling version_check v0.1.5
   Compiling remove_dir_all v0.5.1
   Compiling rayon-core v1.4.1
   Compiling byteorder v1.3.1
   Compiling fnv v1.0.6
   Compiling bit-vec v0.5.0
   Compiling quick-error v1.2.2
   Compiling rayon v1.0.3
   Compiling either v1.5.0
   Compiling bitflags v1.0.4
   Compiling spin v0.5.0
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
   Compiling semver v0.9.0
   Compiling crossbeam-utils v0.2.2
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.3
   Compiling lazy_static v1.2.0
   Compiling regex-syntax v0.6.5
   Compiling proc-macro-hack v0.4.1
   Compiling collider v0.3.1 (https://github.com/SergiusIW/collider-rs#56b667fb)
   Compiling bit-set v0.5.0
   Compiling rand_xorshift v0.1.1
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
   Compiling thread_local v0.3.6
   Compiling rustc_version v0.2.3
   Compiling rand_os v0.1.2
   Compiling wait-timeout v0.1.5
   Compiling num_cpus v1.9.0
   Compiling quote v0.6.11
   Compiling mashup-impl v0.1.9
   Compiling crossbeam-epoch v0.3.1
   Compiling rand_pcg v0.1.1
   Compiling aho-corasick v0.6.9
   Compiling noisy_float v0.1.9
   Compiling syn v0.15.26
   Compiling mashup v0.1.9
   Compiling crossbeam-deque v0.2.0
   Compiling tempfile v3.0.5
   Compiling uuid v0.7.2
   Compiling pyo3 v0.6.0-alpha.2
   Compiling rusty-fork v0.2.1
   Compiling proptest v0.9.0
   Compiling ctor v0.1.7
   Compiling pyo3-derive-backend v0.6.0-alpha.2
   Compiling inventory-impl v0.1.3
   Compiling ghost v0.1.0
   Compiling proptest-derive v0.1.0
   Compiling inventory v0.1.3
   Compiling pyo3cls v0.6.0-alpha.2
   Compiling py_disc_model v0.1.0 (/home/cfkaran2/Documents/rust_learning/py_disc_model)
warning: unused import: `proptest_derive::Arbitrary`
 --> src/node.rs:2:5
  |
2 | use proptest_derive::Arbitrary;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default

warning: unused import: `std::u128`
   --> src/py_broadcast.rs:161:9
    |
161 |     use std::u128;
    |         ^^^^^^^^^

warning: unreachable expression
   --> src/broadcast.rs:270:9
    |
270 |         Ok(())
    |         ^^^^^^
    |
    = note: #[warn(unreachable_code)] on by default

warning: unreachable expression
   --> src/broadcast.rs:283:9
    |
283 |         self.cancel()
    |         ^^^^^^^^^^^^^

warning: method is never used: `peek`
   --> src/broadcast_queue.rs:238:5
    |
238 |     pub fn peek(&mut self) -> Option<sync::Weak<sync::RwLock<Broadcast>>> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: #[warn(dead_code)] on by default

warning: struct is never constructed: `ChannelMap`
  --> src/channel_map.rs:18:1
   |
18 | pub struct ChannelMap {
   | ^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `add_channel`
  --> src/channel_map.rs:35:5
   |
35 | /     pub fn add_channel(
36 | |         &mut self,
37 | |         identifier: &PyChannelIdentifier,
38 | |         disc_radius: N64,
...  |
54 | |         }
55 | |     }
   | |_____^

warning: method is never used: `time`
  --> src/channel_map.rs:57:5
   |
57 |     pub fn time(&self, identifier: &PyChannelIdentifier) -> R64 {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `min_time`
  --> src/channel_map.rs:61:5
   |
61 |     pub fn min_time(&self) -> R64 {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `next_time`
  --> src/channel_map.rs:68:5
   |
68 |     pub fn next_time(&mut self, identifier: &PyChannelIdentifier) -> N64 {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `min_next_time`
  --> src/channel_map.rs:75:5
   |
75 |     pub fn min_next_time(&mut self) -> N64 {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `set_time`
  --> src/channel_map.rs:82:5
   |
82 |     pub fn set_time(&mut self, time: R64) {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `add_object`
   --> src/channel_map.rs:86:5
    |
86  | /     pub fn add_object(
87  | |         &mut self,
88  | |         id: HbId,
89  | |         x: R64,
...   |
105 | |         output
106 | |     }
    | |_____^

warning: method is never used: `remove_object`
   --> src/channel_map.rs:108:5
    |
108 |     pub fn remove_object(&mut self, id: HbId) -> HashMap<PyChannelIdentifier, Vec<HbId>> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `set_velocity`
   --> src/channel_map.rs:123:5
    |
123 |     pub fn set_velocity(&mut self, id: HbId, dx: R64, dy: R64) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `overlaps_for`
   --> src/channel_map.rs:129:5
    |
129 | /     pub fn overlaps_for(
130 | |         &mut self,
131 | |         id: HbId,
132 | |     ) -> Result<HashMap<PyChannelIdentifier, Vec<HbId>>, &'static str> {
...   |
144 | |         Ok(output)
145 | |     }
    | |_____^

warning: method is never used: `is_overlapping`
   --> src/channel_map.rs:147:5
    |
147 | /     pub fn is_overlapping(
148 | |         &mut self,
149 | |         id_1: HbId,
150 | |         id_2: HbId,
...   |
163 | |         Ok(output)
164 | |     }
    | |_____^

warning: method is never used: `next`
   --> src/channel_map.rs:166:5
    |
166 |     pub fn next(&mut self) -> Result<HashMap<PyChannelIdentifier, DiscModelEvent>, &'static str> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `active_broadcast_id`
   --> src/node.rs:155:5
    |
155 |     pub fn active_broadcast_id(&self) -> Option<Uuid> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.11863sguj591joq5.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.11cxq1hreicjj7gu.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.11ic285evicmowry.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.13yrd4yc0p5v0ff2.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1501axo31ei5uuz0.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.155emv662l6szgvc.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.155rho0zawa015wt.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.176jqvwlvraja6et.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.17rotn05m7h7jcs6.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.17zycgwy6gft99q6.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.19i3ll30992la9px.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1ajvpl3yde5eealj.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1an4rusj6bv6gxlc.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1e52iayhsi7rwug5.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1k1ywnr8q7cr8iig.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1lcgwf0iod0g2zzc.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1o9vb60d1li1pm4h.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1p86csc1vxk48oky.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1pglx40c8jnp5xyl.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1pvorwtsb83dl9e1.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1qqr1l9k8ys007qo.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1wroyhqoh9fkip54.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1ygf080y1yymimen.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1zc3m85jws6x0sdp.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.21ynecyym8iuq06z.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.22syivj9rn8rezz9.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.23qzc7ncpumh087k.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.258d7v431paaby05.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.267n4soka23hqpvs.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2837lp2tl4pss0f3.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2aev66ydot86kiar.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2drpt7yombk2w3o8.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2exnzmqn73x1s0s1.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2isg34jgg7rqvfhi.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2jicmktlki7g2gio.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2johmtjod3g7ywt6.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2mbj98tiiegn59qb.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2ngzlc8c69ygya3d.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2nk1uqi0hjog9fgk.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2qip636wpwfn7vfq.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2tu6ybbui0i9sxez.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2w5i7kxomamnvtfz.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2wuimohfs287gfvl.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2xbxyzkb8sn8kr9j.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2z85lvmu6kce2d73.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.324o27sltro53fc5.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.32m8beb66zmshjj6.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.33smqrn20fdwsajo.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.355dmqu1k616rg57.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.37krjfh0xkxs5j2q.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.39j0yqq9t6r32j56.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.39ujyzy31emrpbx4.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3al1m8w8jec3j556.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3awqdhlx2o70b9ck.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3c04lz9zavoxerup.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3c8jeyyk115kznnk.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3cojxwfz61dwaezk.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3f7ph1w8z54424vq.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3ffcdnoijubrgf5h.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3g0tubbbz8e0bvo6.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3hv8y0p7ygc3qjpr.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3icte7r38c65hah3.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3iw4gp94v5rv00yn.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3ixnl9o04yzhz63w.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3j97326z696yj1wi.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3k0iysqhdjzqsxri.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3mc1njyle3sqpgc0.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3napop561lglzmh1.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3owwoo2f8rb3g3lp.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3p1wqi1qpd5d9bkg.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3pzzol15336dsgo7.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3rhy9rtt7luyfqwx.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3s81mxczanjpvg4r.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3sbq65zk4pti6kne.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3ttz3hce6ugmkzo7.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3v08gh03o2o26gx4.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3w3nvvupvcg06fus.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3x3o2zdas1bj3vu2.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3yf0zk0tcpx58l5l.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.401ukfrh47br0aba.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.407dyr48g5qd7b05.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.40tbvrzwfep0hb.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.43oc5dsua8zt3sfz.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.441kr8lfwx5szle5.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.44d2klnfdn5g6bxm.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.45x8qjpupp1j39rk.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.46pc7pgoqlafpeqx.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.47ig2rl4t6rqnxg8.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.48851r4v4qiiws44.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.48p9mbffhvvgxxpc.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.49a595puqd7pn7yq.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4b6ecoq8xb2s0he2.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4br55a0hysx33z0t.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4cqcj1xh0rq0e0ub.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4e1ue0vygpdwvsah.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4eg8rqtomz6ihp8a.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4f36km9ksed2ihd0.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4gw87x675t8xg4qp.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4hv10w6t34kcrefn.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4ip4tga08auexgdn.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4mquofgwx9e66aq5.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4q5p5ts4t254n5ip.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4u1wevt3vt8exttz.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4u6yb77fve7zblp4.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4u91bupkq6qs3gim.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4uf9d4seugbm2n9x.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4uuk3srsnzok3lx7.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4v09n8rd8e3aocep.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4w1bn2k03xrf6j5w.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4wwt5lnztr6iqpad.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4ylwjiq3udo2rqps.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4ysdr4xesn2og4pn.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4zercxi2q9e2ej6w.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.56tcywxsh0dyavl6.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.5alv85wq4e0j8rsg.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.5fglczp3yoqx22fu.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.9kbzoz76i9869x7.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.ahrpp9tps93jy39.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.ao1rxp113kk6h3t.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.cnevmtap9o7hon3.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.ehewsncz9258kxc.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.ejf5rkmfpvb0ewp.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.fp5melrp5iri0il.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.gfaeteb7h3swjrw.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.h79w4s2c5sexx8g.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.hi3wp7eygi7g1uh.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.i8rwnwgyjhe5i9i.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.j3pyrqz5km6kme7.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.joe5gm1i1twptah.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.ld61efwdqyk7ty5.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.ldc8fszv7l3i9zk.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.n40nbvitlo9xz51.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.qk6fr6scwfa2xzl.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.s4aj9yui6xumy9i.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.tdvqqp86klu188i.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.teshh7axn24yvgi.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.vvfjm6ky3rzzu76.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.w9uf5oisr9ln6iz.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.xafzhhxw9fig49p.rcgu.o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.zm7d75mvi6f1hpk.rcgu.o" "-o" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4jedok3gwhomc3qo.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps" "-L" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-77a61bb913498ca7.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm-c82f775b5f503228.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-45826689e5432c05.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libproptest-b0501ba84db241e3.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libregex_syntax-f31956ac74fd2769.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libucd_util-fbca67434a15a8b4.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libbyteorder-233a45cad45230bf.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librusty_fork-d81e8dfa281e9f06.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libwait_timeout-0149bb1f9ba5926f.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libtempfile-b037e9bb4e74760d.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libremove_dir_all-5a0019b3a10d161f.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libquick_error-f85ff08711a248cf.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libbit_set-1ba919992255845c.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libbit_vec-6941aa2cb97c052d.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libbitflags-fada309b8ba4f961.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librayon-1e71fbafb49e52f7.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libeither-b8f7191ad0de8578.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librayon_core-e1c7c8959a0a6e7d.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libnum_cpus-c7f89e77dbd3e3cc.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libcrossbeam_deque-c66a10d50fe42ace.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libcrossbeam_epoch-a94309e7d245124c.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libscopeguard-09e3cd6ff793862f.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libmemoffset-1fb8db1bb1438ddf.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/liblazy_static-34e477cc2e9b2f34.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libspin-ab82208b79b5e76c.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libcrossbeam_utils-8ab4f5b4bb2c4e69.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libcfg_if-7046494b599724cf.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libarrayvec-335a85449b3e9711.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libnodrop-b3520e1863281dfc.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libuuid-3ad16e39a3ba8b98.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand-e2c4a9a1ca31ff10.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand_xorshift-20ad256cc726628b.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand_pcg-b7ca5b85e84d77b0.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand_hc-1008f569fba68665.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand_chacha-d1daa0a7b08b7377.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand_isaac-a8646a6b63958477.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand_core-e15483ea7f6c006f.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand_os-35bd6218496a7379.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand_jitter-664a0bcb95174613.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/librand_core-e7bb5d08e084b1da.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libnoisy_float-0f566d8bef2c8c98.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libnum_traits-89bb9efae8c731c6.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libspin-bfdf2c364d8ce8f0.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/liblibc-62f3314758714d6e.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libinventory-763b3efbd4762086.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libmashup-8f4322355b9f65c8.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libproc_macro_hack-d77e3f798c996ba7.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libcollider-8e490b6d3e0914f8.rlib" "/home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libfnv-f792d1128a10d2ca.rlib" "-Wl,--start-group" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-a13cd66768f941c6.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-46563dbf5da3e42a.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-941ee6414db90fe9.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-92f73dc0e683dfdc.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-96be814f0b7865d0.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-b1bdd7a426b859e7.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-8ce6216fe629a68c.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6ee32c21a3bdba5d.rlib" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-846734e93868e52c.rlib" "-Wl,--end-group" "/home/cfkaran2/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-05f9079cfd1746c1.rlib" "-Wl,-Bdynamic" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.11cxq1hreicjj7gu.rcgu.o: In function `pyo3::types::sequence::PySequence::len':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/sequence.rs:22: undefined reference to `PySequence_Size'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.13yrd4yc0p5v0ff2.rcgu.o: In function `pyo3::buffer::PyBuffer::to_vec_impl':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/buffer.rs:511: undefined reference to `PyBuffer_ToContiguous'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.155emv662l6szgvc.rcgu.o: In function `pyo3::types::iterator::PyIterator::from_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/iterator.rs:41: undefined reference to `PyObject_GetIter'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.1o9vb60d1li1pm4h.rcgu.o: In function `pyo3::err::PyErr::restore':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/err.rs:313: undefined reference to `PyErr_Restore'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.2nk1uqi0hjog9fgk.rcgu.o: In function `<pyo3::types::PyObjectRef as pyo3::typeob::PyTypeInfo>::type_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/mod.rs:120: undefined reference to `PyBaseObject_Type'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.355dmqu1k616rg57.rcgu.o: In function `pyo3::typeob::initialize_type':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/typeob.rs:431: undefined reference to `PyType_Ready'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3c04lz9zavoxerup.rcgu.o: In function `pyo3::types::num3::<impl pyo3::conversion::IntoPyObject for u64>::into_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/num3.rs:83: undefined reference to `PyLong_FromUnsignedLongLong'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3k0iysqhdjzqsxri.rcgu.o: In function `pyo3::ffi3::boolobject::Py_True':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/ffi3/boolobject.rs:24: undefined reference to `_Py_TrueStruct'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3k0iysqhdjzqsxri.rcgu.o: In function `pyo3::ffi3::boolobject::Py_False':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/ffi3/boolobject.rs:19: undefined reference to `_Py_FalseStruct'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3p1wqi1qpd5d9bkg.rcgu.o: In function `pyo3::ffi3::object::PyObject_TypeCheck':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/ffi3/object.rs:633: undefined reference to `PyType_IsSubtype'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.3p1wqi1qpd5d9bkg.rcgu.o: In function `pyo3::ffi3::object::Py_DECREF':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/ffi3/object.rs:807: undefined reference to `_Py_Dealloc'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.40tbvrzwfep0hb.rcgu.o: In function `pyo3::types::list::<impl pyo3::conversion::IntoPyObject for alloc::vec::Vec<T>>::into_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/list.rs:177: undefined reference to `PyList_New'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/list.rs:180: undefined reference to `PyList_SetItem'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4q5p5ts4t254n5ip.rcgu.o: In function `pyo3::typeob::PyObjectAlloc::alloc':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/typeob.rs:(.text._ZN4pyo36typeob13PyObjectAlloc5alloc17h2167861739c26820E+0x1e): undefined reference to `PyType_GenericAlloc'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.4q5p5ts4t254n5ip.rcgu.o: In function `pyo3::typeob::PyObjectAlloc::dealloc':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/typeob.rs:217: undefined reference to `PyObject_CallFinalizerFromDealloc'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/typeob.rs:227: undefined reference to `PyObject_GC_Del'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/typeob.rs:229: undefined reference to `PyObject_Free'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/py_disc_model-4ba71619013ee10c.j3pyrqz5km6kme7.rcgu.o: In function `pyo3::ffi3::objectabstract::PyIter_Check':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/ffi3/objectabstract.rs:(.text._ZN4pyo34ffi314objectabstract12PyIter_Check17h87fd7b6d38df1f18E+0x4a): undefined reference to `_PyObject_NextNotImplemented'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.0.rcgu.o): In function `pyo3::err::PyErr::occurred':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/err.rs:143: undefined reference to `PyErr_Occurred'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.0.rcgu.o): In function `pyo3::err::PyErr::fetch':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/err.rs:154: undefined reference to `PyErr_Fetch'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.0.rcgu.o): In function `pyo3::err::panic_after_error':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/err.rs:507: undefined reference to `PyErr_Print'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.1.rcgu.o): In function `pyo3::ffi3::object::Py_DECREF':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/ffi3/object.rs:807: undefined reference to `_Py_Dealloc'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.1.rcgu.o): In function `pyo3::ffi3::object::Py_None':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/ffi3/object.rs:845: undefined reference to `_Py_NoneStruct'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.11.rcgu.o): In function `pyo3::buffer::PyBuffer::get':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/buffer.rs:171: undefined reference to `PyObject_GetBuffer'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.11.rcgu.o): In function `pyo3::buffer::PyBuffer::release':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/buffer.rs:589: undefined reference to `PyBuffer_Release'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.11.rcgu.o): In function `<pyo3::buffer::PyBuffer as core::ops::drop::Drop>::drop':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/buffer.rs:610: undefined reference to `PyBuffer_Release'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.13.rcgu.o): In function `pyo3::types::list::PyList::len':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/list.rs:40: undefined reference to `PyList_Size'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.13.rcgu.o): In function `pyo3::types::list::PyList::get_item':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/list.rs:54: undefined reference to `PyList_GetItem'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.15.rcgu.o): In function `pyo3::pythonrun::prepare_freethreaded_python::{{closure}}':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/pythonrun.rs:39: undefined reference to `Py_IsInitialized'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/pythonrun.rs:42: undefined reference to `PyEval_ThreadsInitialized'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/pythonrun.rs:53: undefined reference to `Py_InitializeEx'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/pythonrun.rs:54: undefined reference to `PyEval_InitThreads'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/pythonrun.rs:59: undefined reference to `PyEval_SaveThread'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.15.rcgu.o): In function `<pyo3::pythonrun::GILGuard as core::ops::drop::Drop>::drop':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/pythonrun.rs:104: undefined reference to `PyGILState_Release'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.15.rcgu.o): In function `pyo3::pythonrun::GILGuard::acquire':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/pythonrun.rs:249: undefined reference to `PyGILState_Ensure'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.15.rcgu.o): In function `<pyo3::types::iterator::PyIterator<'p> as core::iter::traits::iterator::Iterator>::next':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/iterator.rs:64: undefined reference to `PyIter_Next'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.15.rcgu.o): In function `<pyo3::types::sequence::PySequence as pyo3::conversion::PyTryFrom>::try_from':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/sequence.rs:281: undefined reference to `PySequence_Check'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.4.rcgu.o): In function `pyo3::typeob::PyRawObject::new':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/typeob.rs:103: undefined reference to `PyType_GenericAlloc'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.4.rcgu.o): In function `pyo3::types::dict::PyDict::len':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/dict.rs:59: undefined reference to `PyDict_Size'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.4.rcgu.o): In function `pyo3::types::dict::PyDict::get_item::{{closure}}':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/dict.rs:90: undefined reference to `PyDict_GetItem'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.4.rcgu.o): In function `pyo3::types::dict::PyDict::items':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/dict.rs:142: undefined reference to `PyDict_Items'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `pyo3::types::exceptions::UnicodeDecodeError::new_err':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/exceptions.rs:350: undefined reference to `PyUnicodeDecodeError_Create'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `<pyo3::types::exceptions::BufferError as pyo3::typeob::PyTypeObject>::type_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/exceptions.rs:252: undefined reference to `PyExc_BufferError'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `<pyo3::types::exceptions::OverflowError as pyo3::typeob::PyTypeObject>::type_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/exceptions.rs:252: undefined reference to `PyExc_OverflowError'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `<pyo3::types::exceptions::SystemError as pyo3::typeob::PyTypeObject>::type_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/exceptions.rs:252: undefined reference to `PyExc_SystemError'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `<pyo3::types::exceptions::TypeError as pyo3::typeob::PyTypeObject>::type_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/exceptions.rs:252: undefined reference to `PyExc_TypeError'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `<pyo3::types::exceptions::ValueError as pyo3::typeob::PyTypeObject>::type_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/exceptions.rs:252: undefined reference to `PyExc_ValueError'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `pyo3::types::num3::<impl pyo3::conversion::IntoPyObject for u8>::into_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/num3.rs:42: undefined reference to `PyLong_FromLong'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `pyo3::types::num3::<impl pyo3::conversion::FromPyObject<'source> for u8>::extract':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/num3.rs:51: undefined reference to `PyNumber_Index'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/num3.rs:55: undefined reference to `PyLong_AsLong'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `pyo3::types::num3::<impl pyo3::conversion::FromPyObject<'source> for u64>::extract':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/num3.rs:92: undefined reference to `PyNumber_Index'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/num3.rs:96: undefined reference to `PyLong_AsUnsignedLongLong'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `pyo3::types::num3::<impl pyo3::conversion::IntoPyObject for u128>::into_object':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/num_common.rs:64: undefined reference to `_PyLong_FromByteArray'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.5.rcgu.o): In function `pyo3::types::num3::<impl pyo3::conversion::FromPyObject<'source> for u128>::extract':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/num_common.rs:77: undefined reference to `PyNumber_Index'
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/num_common.rs:82: undefined reference to `_PyLong_AsByteArray'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.9.rcgu.o): In function `pyo3::types::string::PyString::new':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/string.rs:33: undefined reference to `PyUnicode_FromStringAndSize'
          /home/cfkaran2/Documents/rust_learning/py_disc_model/target/debug/deps/libpyo3-c9684dc350cc0a40.rlib(pyo3-c9684dc350cc0a40.pyo3.b3slq90h-cgu.9.rcgu.o): In function `pyo3::types::string::PyString::as_bytes':
          /home/cfkaran2/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.6.0-alpha.2/src/types/string.rs:56: undefined reference to `PyUnicode_AsUTF8AndSize'
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: Could not compile `py_disc_model`.

To learn more, run the command again with --verbose.
cfkaran2@EMANE:~/Documents/rust_learning/py_disc_model$ 
@konstin
Copy link
Member

konstin commented Feb 7, 2019

I think we need to differentiate these problems more.

First you're writing:

I'm having linking errors when using v0.6.0-alpha.2 which I didn't have when using v0.6.0-alpha.1.

Then you say:

I tried creating a minimal example, but the minimal example fails to compile under v0.6.0-alpha.1 with the following:

This seems contradictory to me. It should always be possible to minimize without getting a specialization error.

Then you write about the following, which looks like it's a binary compiled with the wrong module name:

And the same example compiles under v0.6.0-alpha.2, but fails to lead into python with the following

ImportError: dynamic module does not define module export function (PyInit_pyo3_bug_report)

For the final linker error, please include the output of cargo build -vvv.

@ckaran
Copy link
Author

ckaran commented Feb 7, 2019

I created a new project, completely separate from my original code-base, in the hopes of generating a truly minimal example. I'll start over again using my original codebase and culling down to the smallest amount of code that I can. I will send you the complete output, and once I have truly minimal example that shows the problems, I'll upload everything to GitHub.

@ckaran
Copy link
Author

ckaran commented Feb 8, 2019

@konstin I've created a repository that explains and illustrates the bug that I'm having at https://github.com/ckaran/pyo3_issue_report_341. Please let me know if I can help further with this.

@kngwyu
Copy link
Member

kngwyu commented Feb 9, 2019

@ckaran
Could you please copy&paste the output of rustc -V?

@konstin
Copy link
Member

konstin commented Feb 10, 2019

With the help of the repo, I could minize it to the following code:

[package]
name = "py_disc_model"
version = "0.1.0"
authors = ["Cem Karan <cem.f.karan.civ@mail.mil>"]
edition = "2018"

[dependencies]
pyo3 = {version="=0.6.0-alpha.2", features = ["extension-module"] }

[lib]
name = "py_disc_model"
crate-type = ["cdylib"]
#![feature(specialization)]

use pyo3::prelude::*;

#[pyclass]
pub struct PyChannelIdentifier {}

#[pymethods]
impl PyChannelIdentifier {
    #[new]
    pub fn __new__(_obj: &PyRawObject) -> PyResult<()> {
        unimplemented!()
    }
}

#[pymodule]
fn py_disc_model(_py: Python, m: &PyModule) -> PyResult<()> {
    m.add_class::<PyChannelIdentifier>()?;

    Ok(())
}

So it seems that "invoking" inventory seems to break cargo test. This is actually the same issue as #340 with the same workaround. I'm confused that this did work before as there have always been problems with linking and tests. How inventory is able to break the linking is not explicable to me.

@konstin konstin changed the title error: linking with cc failed: exit code: 1 inventory breaks linking Feb 10, 2019
@konstin konstin added the bug label Feb 10, 2019
@ckaran
Copy link
Author

ckaran commented Feb 11, 2019

@konstin Thank you for the prompt response and the work-around. I have no idea how it was working before, and stopped working. I know that when I did git bisect to find the bug, at each commit after ae8a37c the number of missing symbols increased. It may be useful to look at that commit to see if it did anything special.

That said, the workaround does work for me, even on my complete project (not just the minimized project).

@kngwyu rustc -V gives rustc 1.34.0-nightly (d17318011 2019-02-07)

@konstin konstin mentioned this issue Mar 21, 2019
1 task
@konstin
Copy link
Member

konstin commented Mar 28, 2019

I've gathered some more information on the problem. The following code block is the trimmed down macro expansion. cargo test with the extension-module feature will lead to to linking errors, unless we either remove the #[link_section = ".ctors"] or remove the content of the __wrap method. I think that we need to somehow submit references to the wrap functions in the ctors part, but without the linker believing that we need to resolve the python c api symbols for ctors.

#![feature(specialization)]

use pyo3::prelude::*;

pub struct PyChannelIdentifier {}

impl pyo3::type_object::PyTypeInfo for PyChannelIdentifier {
    type Type = PyChannelIdentifier;
    const NAME: &'static str = "PyChannelIdentifier";
    const DESCRIPTION: &'static str = "\u{0}";
    const SIZE: usize =
        { Self::OFFSET as usize + ::std::mem::size_of::<PyChannelIdentifier>() + 0 + 0 };
    const OFFSET: isize = {
        ((<pyo3::types::PyAny as pyo3::type_object::PyTypeInfo>::SIZE
            + ::std::mem::align_of::<PyChannelIdentifier>()
            - 1)
            / ::std::mem::align_of::<PyChannelIdentifier>()
            * ::std::mem::align_of::<PyChannelIdentifier>()) as isize
    };
    const FLAGS: usize = 0;
    type BaseType = pyo3::types::PyAny;
    #[inline]
    unsafe fn type_object() -> &'static mut pyo3::ffi::PyTypeObject {
        static mut TYPE_OBJECT: pyo3::ffi::PyTypeObject = pyo3::ffi::PyTypeObject_INIT;
        &mut TYPE_OBJECT
    }
}

impl pyo3::IntoPyObject for PyChannelIdentifier {
    fn into_object(self, py: pyo3::Python) -> pyo3::PyObject {
        pyo3::Py::new(py, self).unwrap().into_object(py)
    }
}

impl pyo3::type_object::PyObjectAlloc for PyChannelIdentifier {}

pub struct PyChannelIdentifierGeneratedPyo3Inventory {
    methods: &'static [pyo3::class::PyMethodDefType],
}

impl pyo3::class::methods::PyMethodsInventory for PyChannelIdentifierGeneratedPyo3Inventory {
    fn new(methods: &'static [pyo3::class::PyMethodDefType]) -> Self {
        Self { methods }
    }
    fn get_methods(&self) -> &'static [pyo3::class::PyMethodDefType] {
        self.methods
    }
}

impl pyo3::class::methods::PyMethodsInventoryDispatch for PyChannelIdentifier {
    type InventoryType = PyChannelIdentifierGeneratedPyo3Inventory;
}

impl ::inventory::Collect for PyChannelIdentifierGeneratedPyo3Inventory {
    fn registry() -> &'static ::inventory::Registry<Self> {
        static REGISTRY: ::inventory::Registry<PyChannelIdentifierGeneratedPyo3Inventory> =
            ::inventory::Registry::new();
        &REGISTRY
    }
}

impl PyChannelIdentifier {
    pub fn foo(&self) -> PyResult<()> {
        unimplemented!()
    }
}

unsafe extern "C" fn __wrap(_slf: *mut pyo3::ffi::PyObject) -> *mut pyo3::ffi::PyObject {
    let _pool = pyo3::GILPool::new();
    let _py = pyo3::Python::assume_gil_acquired();
    let _slf = _py.mut_from_borrowed_ptr::<PyChannelIdentifier>(_slf);
    let _result = { pyo3::derive_utils::IntoPyResult::into_py_result(_slf.foo()) };
    pyo3::callback::cb_convert(pyo3::callback::PyObjectCallbackConverter, _py, _result)
}

#[used]
#[allow(non_upper_case_globals)]
#[link_section = ".ctors"]
static __init8310110886103380135: extern "C" fn() = {
    extern "C" fn __init8310110886103380135() {
        pyo3::inventory::submit({
            {
                type TyInventory = <PyChannelIdentifier as pyo3::class::methods::PyMethodsInventoryDispatch>::InventoryType;
                <TyInventory as pyo3::class::methods::PyMethodsInventory>::new(&[
                    pyo3::class::PyMethodDefType::Method({
                        pyo3::class::PyMethodDef {
                            ml_name: "foo",
                            ml_meth: pyo3::class::PyMethodType::PyNoArgsFunction(__wrap),
                            ml_flags: pyo3::ffi::METH_NOARGS,
                            ml_doc: "\u{0}",
                        }
                    }),
                ])
            }
        });
    }
    __init8310110886103380135
};

#[cfg(test)]
mod tests {
    #[test]
    fn test() {}
}

@joshtriplett
Copy link

We're running into this in the wasmtime project: bytecodealliance/wasmtime#468

@jmwielandt
Copy link

jmwielandt commented Aug 30, 2020

Hi!
I'm having the same bug here, but only on linux.

The lib:
Is a crate-type = ["cdylib", "rlib"].

The cli app:
Consumes the lib adding:

[dependencies.my-lib]
path = "path/to/my/lib"

I can build the lib without problems in windows 10 and linux (wsl2), but when i try to build it on linux (wsl2) it fails on the last step (build my cli-app).

(I'm consuming the pyclass and the pymethods on rust on my cli app).

The error:

undefined reference to `PyExc_UnicodeDecodeError'
collect2: error: ld returned 1 exit status

@davidhewitt
Copy link
Member

We're still actively exploring ways to fix this. For now, please see the FAQ.

@kmod-midori
Copy link

kmod-midori commented Sep 25, 2020

I'm running into this problem in cargo build (with or without --release)
Output of cargo build -vvv 2>&1 | tee log.txt:
log.txt

[package]
name = "gomoku-rs"
version = "0.1.0"
authors = ["Harry Cheng <chengyuhui1@gmail.com>"]
edition = "2018"

[lib]
name = "gomoku_rs"
crate-type = ["cdylib", "rlib"]

[dependencies]
numpy = "0.11.0"
ndarray = "0.13"
indextree = "4.3.1"

[dependencies.pyo3]
version = "0.11.1"
features = ["extension-module"]

Eric-Arellano added a commit to Eric-Arellano/pants that referenced this issue May 24, 2021
# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@nitsky
Copy link

nitsky commented Jul 28, 2021

With the release of PyO3 v0.14, the dependency on inventory is now enabled only when the feature multiple-pymethods is enabled. Therefore, this issue should only affect those who require multiple-pymethods.

@sun-rs
Copy link

sun-rs commented Jan 1, 2023

With the release of PyO3 v0.14, the dependency on inventory is now enabled only when the feature multiple-pymethods is enabled. Therefore, this issue should only affect those who require multiple-pymethods.

I have to maintain a python extension using pyo3 both on windows and linux. I have no problem with both multiple-pymethods and extension-module features used on windows, but I must remove multiple-pymethods on linux, otherwise it would cause the linking error.

Why windows do not has this problem?

@davidhewitt
Copy link
Member

@longilacus the two operating systems have different linking convenstions, in particular Python extensions on Windows always link to libpython, but on Linux they must not.

@mert-kurttutan
Copy link

mert-kurttutan commented Jun 4, 2023

Might be related to the followings (in case it puts some new perspective)

I also experienced the same type of error when I try to statically compile against C libraries, it runs ok with cargo build and cargo run --example main; but fails for cargo build --tests (or cargo test)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants