thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
223 stars 55 forks source link

tedge-mapper is not found after successful build under target/debug/ folder #3261

Open AjayItHub opened 1 week ago

AjayItHub commented 1 week ago

Built 1.3.1 source code as mentioned in build document available at https://thin-edge.github.io/thin-edge.io/contribute/build/

As per document, after successful build, running ls -l target/debug/ should list tedge-mapper, but it does not show any longer

I pulled 0.9.0 source code, and repeated same steps mentioned in build document, and shows tedge-mapper. So, something changed and does not reflect with latest release (1.3.1)

didier-wenzek commented 1 week ago

Indeed, since version 0.13, thin-edge is packaged as a multi-call binary, meaning that the tedge executable wraps in one file the tedge cli with tedge-agent and tedge-mapper.

To get a working mapper you have to create a symlink.

$ cargo build
$ ls target/debug/tedge-mapper   
zsh: no such file or directory: target/debug/tedge-mapper

$ ln -s tedge target/debug/tedge-mapper
$ target/debug/tedge-mapper            
tedge-mapper is the mapper that translates thin-edge.io data model to c8y/az data model.
...

That said, you are correct: the documentation is outdated and needs to be fixed.

AjayItHub commented 1 week ago

Thank you so much @didier-wenzek for quick response, and guidance. Appreciate it.