snipsco / snips-nlu-rs

Snips NLU rust implementation
https://snips.ai
Other
340 stars 56 forks source link

undefined reference to `crfsuite_instance_init_n' #44

Closed walpoletim-bjss closed 6 years ago

walpoletim-bjss commented 6 years ago

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 tocrfsuite_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 tocrfsuite_item_init' g4ocvkiolag6no4-c308c9baf1e779a490d159873856ad7a.rs:(.text._ZN8crfsuite6Tagger3set17h2f0968d9babb3c13E+0x647): undefined reference to crfsuite_attribute_set' g4ocvkiolag6no4-c308c9baf1e779a490d159873856ad7a.rs:(.text._ZN8crfsuite6Tagger3set17h2f0968d9babb3c13E+0x659): undefined reference tocrfsuite_item_append_attribute' g4ocvkiolag6no4-c308c9baf1e779a490d159873856ad7a.rs:(.text._ZN8crfsuite6Tagger3set17h2f0968d9babb3c13E+0x6c0): undefined reference to crfsuite_instance_finish' g4ocvkiolag6no4-c308c9baf1e779a490d159873856ad7a.rs:(.text._ZN8crfsuite6Tagger3set17h2f0968d9babb3c13E+0x6ce): undefined reference tocrfsuite_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 tocrfsuite_create_instance_from_memory' collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: Could not compile snips-nlu-lib.

fredszaq commented 6 years ago

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

walpoletim-bjss commented 6 years ago

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

walpoletim-bjss commented 6 years ago

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 functioncrfsuite::Tagger::set::h97adee797a4f6202': g4ocvkiolag6no4-8139ccb84cae1c07b58a25d9d387127.rs:(.text._ZN8crfsuite6Tagger3set17h97adee797a4f6202E+0x3a0): undefined reference to crfsuite_item_init' g4ocvkiolag6no4-8139ccb84cae1c07b58a25d9d387127.rs:(.text._ZN8crfsuite6Tagger3set17h97adee797a4f6202E+0x758): undefined reference tocrfsuite_attribute_set' g4ocvkiolag6no4-8139ccb84cae1c07b58a25d9d387127.rs:(.text._ZN8crfsuite6Tagger3set17h97adee797a4f6202E+0x76f): undefined reference to crfsuite_item_append_attribute' g4ocvkiolag6no4-8139ccb84cae1c07b58a25d9d387127.rs:(.text._ZN8crfsuite6Tagger3set17h97adee797a4f6202E+0x7e3): undefined reference tocrfsuite_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 functioncrfsuite::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

fredszaq commented 6 years ago

rustfmt -V

Le lun. 14 mai 2018 à 22:13, walpoletim notifications@github.com a écrit :

How do I get the rustfmt version?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/snipsco/snips-nlu-rs/issues/44#issuecomment-388947288, or mute the thread https://github.com/notifications/unsubscribe-auth/ABaqOABEOKopDYyLr_vobxsKFhmMsGf1ks5tyeVsgaJpZM4T9RvM .

walpoletim-bjss commented 6 years ago

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

fredszaq commented 6 years ago

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

walpoletim-bjss commented 6 years ago

That compiles fine..

fredszaq commented 6 years ago

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 ?

walpoletim-bjss commented 6 years ago

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

adrienball commented 6 years ago

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