I added the lib path explicitly so I knew that arm-linux-gnueabihf-g++ was definitely linking against the correct hard float libraries.  Perhaps this is unnecessary, but I just wanted to be sure.  I've been using OpenCV 2.2 because that was the version that was known to compile successfully from that TI wiki page you sent earlier.  I am now trying with 2.4.0, I'll let you know if I succeed.

It's definitely not easy.  All the tools seem to be there, it's piecing everything together correctly that is the tough part. Push on!


On Tue, Feb 12, 2013 at 1:35 PM, Fernan <fhledesma@gmail.com> wrote:
Hi Derek,

Derek Rollend <derek.rollend@...> writes:

>
>
> Add the Linaro toolchain bin directory to your PATH environment variable:
> export PATH="/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux
>>/bin:$PATH"

ok. I thought there was a CMake variable like CMAKE_C_COMPILER_PATH. I use this
http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F
(method3
).

> On Mon, Feb 11, 2013 at 4:04 PM, Fernan
<fhledesma@gmail.com> wrote:
> Derek Rollend <derek.rollend <at> ...> writes:
> >
> >
> > Fernan,
> > I'm using CMake 2.8.0.  I have not tried to compile OpenCV with FFMPEG
> > support
> yet, although I will be trying to do this soon.  I have only successfully
> compiled OpenCV 2.2 using the Linaro hard float compiler.  Here is my
> toolchain.cmake file:
> >
> >
> > set( CMAKE_SYSTEM_NAME Linux )
> > set( CMAKE_SYSTEM_PROCESSOR arm )
> > set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc )
> > set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++ )
> > set( CMAKE_CXX_FLAGS_RELEASE "-L
> >/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/
>> >arm-linux-gnueabihf/lib -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard
>> >-ftree-vectorize -ftree-vectorizer-verbose=3 -funroll-loops" )
>> > set( CMAKE_CXX_FLAGS_DEBUG "-L /opt/gcc-linaro-arm-linux-gnueabihf-
>> >4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib
>> >-O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -ftree-vectorize
>> >-ftree-vectorizer-verbose=3 -funroll-loops" )
> >

I have just successfully compiled but without FFMPEG too, that is the problem.

but first, I will ask you some question:

Why you need to add the link path /opt/gcc-linaro-arm-linux-gnueabihf-
4.7-2013.01-20130125_linux/arm-linux-gnueabihf/lib?

Why you use OpenCV2.2? The lastest stable release is OpenCV2.4.3.

You see, I'm a newbie about cross compiling, I'll have to study concepts of
cross-compilation, I thought it was easy.





_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain