opencv-rust icon indicating copy to clipboard operation
opencv-rust copied to clipboard

Make doctests work for docs.rs

Open eadf opened this issue 4 years ago • 7 comments

I've had docs.rs add libopencv-dev to their installed packages, thinking that was the only thing preventing their docker image to build opencv-rust.

Turns out there are more problems, can you see from this log what the problem might be?

Looking at it a second time it looks like pkg-config is missing (I thought it would be enough with cmake). Can you see if there are any other missing packages?

eadf avatar Oct 31 '21 15:10 eadf

Sure, I’ll check it out! Thanks for your effort!

twistedfall avatar Oct 31 '21 16:10 twistedfall

Another log, this time docs.rs failing to build opencv-rust 0.59. Some version of docs.rs though.

I will try to build that docker image locally sometimes later this week, maybe I see what's really happening that way.

eadf avatar Nov 03 '21 12:11 eadf

I'm not sure to be honest. I've pulled their docker image from https://github.com/rust-lang/crates-build-env#linux, installed rust using rustup there, cloned https://github.com/eadf/libstacker.rs and tried running cargo test inside it and it worked without any issues. Can it be that the image with libopencv-dev is not deployed on their infra yet?

twistedfall avatar Nov 03 '21 12:11 twistedfall

The cli log just in case: https://gist.github.com/twistedfall/2889c5dfbd671313e773bf50970a573c

twistedfall avatar Nov 03 '21 12:11 twistedfall

Can it be that the image with libopencv-dev is not deployed on their infra yet?

That is the most likely the problem. (I've asked if libopencv-dev is live yet.) I noticed that the image version increased the same day as the merge, but it is as they say - "correlation is not causation". I guess we'll just have to wait and see.

eadf avatar Nov 04 '21 12:11 eadf

I can see that it's there now, it starts to generate the bindings, but fails because it can't copy the generated bindings to the src directory. That's tricky, I'll need to see what can be done to work that around.

twistedfall avatar Nov 05 '21 21:11 twistedfall

Updated doc.rs build log for Opencv 0.61 : https://docs.rs/crate/libstacker/0.0.6/builds/466273 Nothing new really, same "Read-only file system" error.

eadf avatar Nov 21 '21 20:11 eadf

I'll close this issue in favor of https://github.com/twistedfall/opencv-rust/issues/313 Solving that one will also solve this.

twistedfall avatar Oct 01 '22 07:10 twistedfall