snipsco/snips-nlu-rs

undefined reference to `crfsuite_instance_init_n'

walpoletim-bjss opened this issue · 10 comments

I am trying to compile on an AWS EC2 Instance, and the code fails to compile with the following error:

/home/ec2-user/snips-nlu-rs/snips-nlu-lib/target/debug/deps/libsnips_nlu_lib-81442700a8c7b248.rlib(snips_nlu_lib-81442700a8c7b248.g4ocvkiolag6no4.rcgu.o): In function crfsuite::Tagger::set::h2f0968d9babb3c13': /home/ec2-user/.cargo/git/checkouts/crfsuite-rs-88ab7cb8bdb2b2f2/b18d95c/src/lib.rs:145: undefined reference to crfsuite_instance_init_n'
/home/ec2-user/snips-nlu-rs/snips-nlu-lib/target/debug/deps/libsnips_nlu_lib-81442700a8c7b248.rlib(snips_nlu_lib-81442700a8c7b248.g4ocvkiolag6no4.rcgu.o): In function crfsuite::Tagger::set::h2f0968d9babb3c13': g4ocvkiolag6no4-c308c9baf1e779a490d159873856ad7a.rs:(.text._ZN8crfsuite6Tagger3set17h2f0968d9babb3c13E+0x320): undefined reference to crfsuite_item_init'
g4ocvkiolag6no4-c308c9baf1e779a490d159873856ad7a.rs:(.text._ZN8crfsuite6Tagger3set17h2f0968d9babb3c13E+0x647): undefined reference to crfsuite_attribute_set' g4ocvkiolag6no4-c308c9baf1e779a490d159873856ad7a.rs:(.text._ZN8crfsuite6Tagger3set17h2f0968d9babb3c13E+0x659): undefined reference to crfsuite_item_append_attribute'
g4ocvkiolag6no4-c308c9baf1e779a490d159873856ad7a.rs:(.text._ZN8crfsuite6Tagger3set17h2f0968d9babb3c13E+0x6c0): undefined reference to crfsuite_instance_finish' g4ocvkiolag6no4-c308c9baf1e779a490d159873856ad7a.rs:(.text._ZN8crfsuite6Tagger3set17h2f0968d9babb3c13E+0x6ce): undefined reference to crfsuite_instance_finish'
/home/ec2-user/snips-nlu-rs/snips-nlu-lib/target/debug/deps/libcrfsuite-ad8b4b3fb39b3a5b.rlib(crfsuite-ad8b4b3fb39b3a5b.crfsuite0.rcgu.o): In function crfsuite::Tagger::create_from_memory::hf43200afd689451e': /home/ec2-user/.cargo/git/checkouts/crfsuite-rs-88ab7cb8bdb2b2f2/b18d95c/src/lib.rs:76: undefined reference to crfsuite_create_instance_from_memory'
collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: Could not compile snips-nlu-lib.

hi @walpoletim-bjss can you give us a few more details the rust version and rustfmt version you are using ?

Hi - Thanks for the swift reply..
cargo 1.26.0 (0e7c5a931 2018-04-06
rustc 1.26.0 (a77568041 2018-05-07)

rustfmt -V gives the following
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not have the binary rustfmt

I am just trying with the nightly build
rustfmt 0.6.1-nightly (0f8029f 2018-05-06)
rustc 1.27.0-nightly (9fae15374 2018-05-13)

Exactly the same problem with this build I am afraid
/home/ec2-user/.cargo/git/checkouts/crfsuite-rs-88ab7cb8bdb2b2f2/b18d95c/src/lib.rs:145: undefined reference to crfsuite_instance_init_n' /home/ec2-user/snips-nlu-rs/snips-nlu-lib/target/debug/deps/libsnips_nlu_lib-6bacb6ee6545aded.rlib(snips_nlu_lib-6bacb6ee6545aded.g4ocvkiolag6no4.rcgu.o): In function crfsuite::Tagger::set::h97adee797a4f6202':
g4ocvkiolag6no4-8139ccb84cae1c07b58a25d9d387127.rs:(.text._ZN8crfsuite6Tagger3set17h97adee797a4f6202E+0x3a0): undefined reference to crfsuite_item_init' g4ocvkiolag6no4-8139ccb84cae1c07b58a25d9d387127.rs:(.text._ZN8crfsuite6Tagger3set17h97adee797a4f6202E+0x758): undefined reference to crfsuite_attribute_set'
g4ocvkiolag6no4-8139ccb84cae1c07b58a25d9d387127.rs:(.text._ZN8crfsuite6Tagger3set17h97adee797a4f6202E+0x76f): undefined reference to crfsuite_item_append_attribute' g4ocvkiolag6no4-8139ccb84cae1c07b58a25d9d387127.rs:(.text._ZN8crfsuite6Tagger3set17h97adee797a4f6202E+0x7e3): undefined reference to crfsuite_instance_finish'
g4ocvkiolag6no4-8139ccb84cae1c07b58a25d9d387127.rs:(.text._ZN8crfsuite6Tagger3set17h97adee797a4f6202E+0x7f2): undefined reference to crfsuite_instance_finish' /home/ec2-user/snips-nlu-rs/snips-nlu-lib/target/debug/deps/libcrfsuite-eebdc463d6bd6aa0.rlib(crfsuite-eebdc463d6bd6aa0.crfsuite0.rcgu.o): In function crfsuite::Tagger::create_from_memory::h7edb415b461f8c61':
/home/ec2-user/.cargo/git/checkouts/crfsuite-rs-88ab7cb8bdb2b2f2/b18d95c/src/lib.rs:76: undefined reference to `crfsuite_create_instance_from_memory'
collect2: error: ld returned 1 exit status

Yep -got it

rustfmt 0.6.1-nightly (0f8029f 2018-05-06)
rustc 1.27.0-nightly (9fae15374 2018-05-13)

I have tried with stable and nightly but still the same issue

Tim

Could you try to clone and build crfsuite-rs https://github.com/snipsco/crfsuite-rs ?

That compiles fine..

With exactly the same environment ? Can you try to create a simple rust project with crfsuite as a dependency to see if we can minimize the problem ?

Hi - will try and do this in the next few days

Hey @walpoletim-bjss , I'm closing this issue since it's been 3 months without update.
Feel free to re-open if you still have troubles.
Cheers