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

Makefile missing #8

Open
stappersg opened this issue Jan 21, 2019 · 2 comments
Open

Makefile missing #8

stappersg opened this issue Jan 21, 2019 · 2 comments

Comments

@stappersg
Copy link

Hi,

Here some who loves to try rust-lang and wants to play with DHCP.

I do miss a makefile or another file that describes the build steps.

Currently I do get this.

stappers@trancilo:~/src/rust/dhcp4r$ rustc examples/monitor.rs 
error[E0463]: can't find crate for `dhcp4r`
 --> examples/monitor.rs:1:1
  |
1 | extern crate dhcp4r;
  | ^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
stappers@trancilo:~/src/rust/dhcp4r$ rustc --explain E0463
stappers@trancilo:~/src/rust/dhcp4r$ rustc --explain E0463 | cat -
A plugin/crate was declared but cannot be found. Erroneous code example:

` ` `
#![feature(plugin)]
#![plugin(cookie_monster)] // error: can't find crate for `cookie_monster`
extern crate cake_is_a_lie; // error: can't find crate for `cake_is_a_lie`
 ` ` `

You need to link your code to the relevant crate in order to be able to use it
(through Cargo or the `-L` option of rustc example). Plugins are crates as
well, and you link to them the same way.
stappers@trancilo:~/src/rust/dhcp4r$ 

Now I do hope that some provides build instructions.

@stappersg
Copy link
Author

FWIW with cargo build I do get a target/ with lots of files. None of them I do recognize as executable.

@stappersg
Copy link
Author

It is, it was, cargo build --examples what i'm looking for.

stappers@trancilo:~/src/rust/dhcp4r$ cargo build --examples
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s                                   
stappers@trancilo:~/src/rust/dhcp4r$ find target -name monitor
target/debug/examples/monitor
stappers@trancilo:~/src/rust/dhcp4r$ file target/debug/examples/monitor
target/debug/examples/monitor: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=5fbdeaecefd3d1d4480c6c4e218e767373b1deef, with debug_info, not stripped
stappers@trancilo:~/src/rust/dhcp4r$ 

Now is it documented here.

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

No branches or pull requests

1 participant