Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 413429 - media-libs/opencv: cross-compiling fails due to cmake unable to properly test compiler settings
Summary: media-libs/opencv: cross-compiling fails due to cmake unable to properly test...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords:
: 443498 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-24 23:07 UTC by SpanKY
Modified: 2013-06-11 21:12 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge build log (opencv-2.3.0.log.xz,27.89 KB, application/octet-stream)
2012-04-24 23:07 UTC, SpanKY
Details
strace log (strace.log.xz,975.89 KB, application/octet-stream)
2012-04-24 23:21 UTC, SpanKY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2012-04-24 23:07:37 UTC
Created attachment 309977 [details]
emerge build log

i have cross-compile settings like so:
 CHOST=armv7a-cros-linux-gnueabi
 CFLAGS="-O2 -pipe -g -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
 CXXFLAGS="${CFLAGS}"

when i emerge opencv for that, it fails.  see the attached log -- this is after adding --trace to cmake-utils.eclass.

i also ran it through strace, and it seems that gcc/g++ is being tested with the target CFLAGS/CXXFLAGS instead of using the compiler values that were setup in the gentoo cmake config override.  i don't know if this is a failing in cmake or opencv, but i'd believe either.

simply adding `tc-export CC CXX` before calling cmake "fixed" things -- the right compilers get tested with the right flags and the build succeeds.
Comment 1 SpanKY gentoo-dev 2012-04-24 23:21:48 UTC
Created attachment 309979 [details]
strace log

log has been edited & truncated to make it fit in the upload limit, but i think you should still be able to pick out the failing pieces
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2013-06-11 21:08:42 UTC
I've added the workaround with tc-export in 2.4.5; I can't see how it would hurt anything. 

If you want a better solution on the long run just re-open the bug please, but I can't really promise anything...
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2013-06-11 21:12:35 UTC
*** Bug 443498 has been marked as a duplicate of this bug. ***