As had been envisioned much earlier, the move to Linux has started. As expected, it looked intimidating at first, but patient reading of the build docs and fixing the network back in the lab (read always-on internet) has allowed me to get the latest version of OpenCV (2.2) and build it. It required quite a few development packages, and although I also downloaded IPP and TBB, which seem to be good things (i.e., they’ll help run the code faster) I don’t know as yet if they would work on the BeagleBoard as and when it arrives. Anyway, the first priority being running the existing OpenCV2.0 code, I had to go about making the OpenCV build.
A few things that were learnt in the process:
- Fedora (yes, I prefer Fedora to Ubuntu – it’s more cutting edge, imho) does not come with gcc installed. I precluded its not being there in the vanilla build.
- gcc-c++ has to be installed as well. Even after installing gcc, cmake kept crying over some missing CXX_Compiler. A quick google search got me the solution to my quandary. Makes me wonder why they aren’t in the dependency list for cmake anyway.
- Having completed the build, I happily set about trying to compile the sample code using gcc. After repeated failures I realized that the apostrophes used in the configuring arguments are tilted (`) Whoa. Never seen anything like that earlier.
- I also realized that I had installed the repository version of OpenCV, which was still configured in cflags and clib. Erased it, only to realize that my PKG_CONFIG_PATH paths I added using in the 2.2 install process didn’t work. Went about rebuilding the OpenCV code and performing all the OpenCV installation all over again. No dice. Haw.
- Figured out that the install path is at /usr/local/lib. So, that’s where to point PKG_CONFIG_PATH.
- Another annoying thing. After closing the terminal window, pkg-config’s PATH reverted to its previous value. Fixed it by copying the generated opencv.pc file in /usr/local/lib to /usr/lib64/pkgconfig along with the other default .pc files. Always loaded. Yay.