Problem with Cross Compiling OpenCV Application for Xilinx Zynq – ARM on Ubuntu Linux OS

Problem:

When cross compiling an OpenCV-2.4.9 application for the Zynq – ARM using a Makefile on Ubuntu 14.04, it generated the following error:

“make: Circular Makefile.out <- Makefile dependency dropped”

I could not understand what caused it and the solutions found on web pointed towards some sort of circular dependencies. I checked and rechecked again and again but could not find any such thing. Finally I noticed the following:

“CC = arm-xilinx-linux-gnueabi-g++”

Solution:

After a few hours struggling I realised that I must have reused an existing Makefile which compiled ‘C’ sources and updated it to compile C++ sources. When I made the following change in the Makefile I got no errors.

“CC = arm-xilinx-linux-gnueabi-gcc
CPP = arm-xilinx-linux-gnueabi-g++”

Replace CC with CPP in the Makefile so that arm-xilinx-linux-gnueabi-g++ is used instead of arm-xilinx-linux-gnueabi-gcc .