FreeBSD Port: graphics/opencv -- Fails to compile

Peter Smith p.smith at auckland.ac.nz
Sat Apr 15 22:10:56 UTC 2017


I am running

# uname -a
> FreeBSD red 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Wed Feb 22
> 06:12:04 UTC 2017     root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
> amd64
>


Having just refreshed my ports tree (portsnap fetch, etc), I'm rebuilding
all my installed ports (portmaster -a). Alas, opencv-core won't build.

When I go to the port and do a 'make' I get:


root at red:/usr/ports/graphics/opencv-core # make
===>   NOTICE:

The opencv port currently does not have a maintainer. As a result, it is
more likely to have unresolved issues, not be up-to-date, or even be
removed in
the future. To volunteer to maintain this port, please create an issue at:

https://bugs.freebsd.org/bugzilla

More information about port maintainership is available at:

https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port

===>  License BSD3CLAUSE accepted by the user
===>   opencv-core-2.4.13.1_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by opencv-core-2.4.13.1_1 for building
===>  Extracting for opencv-core-2.4.13.1_1
=> SHA256 Checksum OK for opencv-opencv-2.4.13.1_GH0.tar.gz.
===>  Patching for opencv-core-2.4.13.1_1
===>  Applying FreeBSD patches for opencv-core-2.4.13.1_1
1 out of 1 hunks failed--saving rejects to
./apps/traincascade/imagestorage.h.rej
=> FreeBSD patch patch-apps__traincascade__imagestorage.h failed to apply
cleanly.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/opencv-core
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/opencv-core

The reject patch file looks like:

root at red:/usr/ports/graphics/opencv-core/work/opencv-2.4.13.1/apps/traincascade
# cat imagestorage.h.rej
@@ -1,6 +1,7 @@
 #ifndef _OPENCV_IMAGESTORAGE_H_
 #define _OPENCV_IMAGESTORAGE_H_

+#include <cstdio>
 #include "highgui.h"

 using namespace cv;

But the original file looks like:

root at red:/usr/ports/graphics/opencv-core/work/opencv-2.4.13.1/apps/traincascade
> # more imagestorage.h.orig
>
#ifndef _OPENCV_IMAGESTORAGE_H_
#define _OPENCV_IMAGESTORAGE_H_

#include <stdio.h>
#include <string>
#include <vector>
#include "highgui.h"

class CvCascadeImageReader


So, I can see why the patch fails. I just can't figure out where the file
is that I need to tweak.

I wonder if anyone else has seen anything like this before.



Kind regards

Peter Smith

Department of Management and International Business
Room 439, Level 4, Owen G. Glenn Building, 12 Grafton Road, AUCKLAND
The University of Auckland Business School, Private Bag 92019, AUCKLAND
Email: p.smith at auckland.ac.nz, Phone: +64 9 923 7178


More information about the freebsd-ports mailing list