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

The opencv build, when the env var CARGO_FEATURE_GEN_FEATS is set, wi… #4

Merged

Conversation

ereichert
Copy link

…ll update the features listed in the Cargo.toml file. It derives the list of features from the CMakeLists.txt file in the downloaded source code. This commit also includes changes to minimize required work when building and generating features.

@ereichert ereichert force-pushed the feature/build_script branch 6 times, most recently from c8d1f15 to 4e182b2 Compare December 7, 2016 16:39
…ll update the features listed in the Cargo.toml file. It derives the list of features from the CMakeLists.txt file in the downloaded source code. This commit also includes changes to minimize required work when building and generating features.
@ereichert
Copy link
Author

@ryandbair I think this is done.

The command line I used for testing is:

RUST_BACKTRACE=1 CARGO_FEATURE_BUILD=1 CARGO_FEATURE_WITH_FFMPEG_OFF=1 CARGO_FEATURE_WITH_TIFF_OFF=1 CARGO_FEATURE_WITH_PNG_ON=1 CARGO_FEATURE_BUILD_SHARED_LIBS_OFF=1 cbd -vv

@ryandbair ryandbair self-requested a review December 8, 2016 14:33
@ryandbair
Copy link

I'm not able to get the PNGs to build, both with the command above as well as compiling with tlx2 and the with_png_on flag set.

@ryandbair
Copy link

I should have used build_png_on, that works fine.

@ereichert
Copy link
Author

I used with_png_on and that's specified in the TLX 2 build now as well. But looking at it further, I'm now sure if with_png_on should work on its own.

Thing is I've built TLX 2 multiple times without an issue. So I'm not really sure what's going on with that.

@ereichert
Copy link
Author

Wouldn't this make both the on and off flags set if build is set?

That comment isn't showing up on the PR, but featureA = ["build"] means that featureA depends on the build feature. I think that's so you can specify featureA in a consumer and not have to specify build.

@ryandbair
Copy link

I'm getting this failure on TLX2 (it builds fine by itself):

thread 'main' panicked at 'Failed to build opencv via build script.: "Failed to copy /home/rbair/src/trafficland/tlx2-review/target/debug/build/opencv-4ad5150afc6c3f37/out/dist/share/OpenCV/3rdparty/lib/liblibpng.a to /home/rbair/src/trafficland/tlx2-review/target/debug/build/opencv-4ad5150afc6c3f37/out/dist/share/OpenCV/3rdparty/lib/libpng.a."', ../src/libcore/result.rs:837

The file actually exists at: target/debug/build/opencv-4ad5150afc6c3f37/out/build/3rdparty/lib/liblibpng.a, not in dist. I'm not sure where the discrepancy is coming from.

@ereichert
Copy link
Author

try adding build_png_on and with_png_on to the TLX 2 features. And do a clean.

@ryandbair
Copy link

Same deal with both features enabled.

liblibpng.a exists, so I know its build built at least. Either the build isn't moving it to the right place or the script is expecting it to be in the wrong place. When you build, where does liblibpng.a end up?

@ereichert
Copy link
Author

I cargo cleaned both TLX 2 and opencv. Built opencv-rust using the command above and TLX 2 with the features specified in the PR for TLX 2.

No problems.

So there's something different about our configs that's causing an issue.

@ryandbair
Copy link

build_shared_libs_off and build_png_on was required to build on tlx2

@ryandbair ryandbair merged commit 7ec4040 into trafficland:feature/build_script Dec 8, 2016
@ereichert ereichert deleted the feature/build_script branch December 13, 2016 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants