eclipse / paho.mqtt.rust

paho.mqtt.rust
Other
511 stars 102 forks source link

doesn't compile on Ubuntu installed on Jetson #185

Closed agiordana closed 1 year ago

agiordana commented 1 year ago

I'm trying to use mqtt on jetson nano. Cargo fail running cmake because of the flag --parallel not supported. looking in the code I've found paho-mqtt-sys/cCargo.toml, where there is a comment about using dependencies from cmake crate v0.1.45 because the fleg --parallel is not supported everywery. As a matter of fact the dependency in the build-dependencies is set to v0.1.48!

fpagliughi commented 1 year ago

Hey! Coincidentally, I just received two Nano's in the post, so I can try this out.

IIRC, the cmake crate was changed in v0.1.46 to use the --parallel flag, but that only appeared in the CMake executable as of v3.12. So this instantly broke the Paho build for slightly older distro's. I had pinned the crate to v0.1.45 for a while to work around this.

But supposedly this was fixed: https://github.com/rust-lang/cmake-rs/pull/146

(ironically, the fix for v0.1.46 was in PR 146?!?)

Maybe that PR was merged, but not released?

I took it on faith that this was no longer an issue and upgraded to the latest release of the cmake crate, but perhaps my assumption was incorrect. I can check. But I wasn't able to test it because I had upgraded CMake on all my development machines to something like v3.25.

So... I will look to get it back working with some older systems, but really, my advice it to upgrade the CMake executable on your Nano to something more recent. Certainly something >= v3.12.

fpagliughi commented 1 year ago

OK. It looks like that PR 146 didn't make it into a release until cmake crate v0.1.49. But I had accidentally let the version pinned to the one specified even after I updated it.

I will do a new release of the -sys crate later today, with the fix, and then it should build on your Nano.

agiordana commented 1 year ago

As a matter of fact, I've found the file ~/.cargo/git/checkouts/paho.mqtt.rust-44b07fd42c95bba6/eee12c6/paho-mqtt-sys/Cargo.toml and I changed the the version: cmake = { version = "=0.1.45", optional = true } instead of 0.1.48, and everything worked perfectly. Thanks for your quick answer. Attilio Giordana

On Fri, Jan 6, 2023 at 7:09 PM Frank Pagliughi @.***> wrote:

Hey! Coincidentally, I just received two Nano's in the post, so I can try this out.

IIRC, the cmake crate was changed in v0.1.46 to use the -parallel flag, but that only appeared in the CMake executable as of v3.12. So this instantly broke the Paho build for slightly older distro's. I had pinned the crate to v0.1.45 for a while to work around this.

But supposedly this was fixed: rust-lang/cmake-rs#146 https://github.com/rust-lang/cmake-rs/pull/146

Maybe that PR was merged, but not released?

I took it on faith that this was no longer an issue and upgraded to the latest release of the cmake crate, but perhaps my assumption was incorrect. I can check. But I wasn't able to test it because I had upgraded CMake on all my development machines to something like v3.25.

So... I will look to get it back working with some older systems, but really, my advice it to upgrade the CMake executable on your Nano to something more recent. Certainly something >= v3.12.

— Reply to this email directly, view it on GitHub https://github.com/eclipse/paho.mqtt.rust/issues/185#issuecomment-1373970878, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEUG5XSJEN773TZ4LSN5IC3WRBNUHANCNFSM6AAAAAATTF6PNY . You are receiving this because you authored the thread.Message ID: @.***>

fpagliughi commented 1 year ago

You should also be able to move it forward to the latest release:

cmake = { version = "0.1.49", optional = true }

(get rid of the equals while you’re at it) and that will work. That’s in the release I just put out, so just run cargo update and that should work,too.

I’ll close this, but feel free to re-open if there’s any other problem.

agiordana commented 1 year ago

Many thanks Attilio

On Sat, Jan 7, 2023 at 2:35 AM Frank Pagliughi @.***> wrote:

You should also be able to move it forward to the latest release:

cmake = { version = "0.1.49", optional = true }

(get rid of the equals while you’re at it) and that will work. It that’s in the release I just put out, so just run cargo update and that should work,too.

I’ll close this, but feel free to re-open if there’s any other problem.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>