From nobody@FreeBSD.org  Mon Sep  9 08:32:48 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id C23B84E7
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  9 Sep 2013 08:32:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 94DA72F52
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  9 Sep 2013 08:32:48 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r898WmUo058704
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 9 Sep 2013 08:32:48 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r898WmB9058703;
	Mon, 9 Sep 2013 08:32:48 GMT
	(envelope-from nobody)
Message-Id: <201309090832.r898WmB9058703@oldred.freebsd.org>
Date: Mon, 9 Sep 2013 08:32:48 GMT
From: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: graphics/opencv-core: error: use of undeclared identifier 'isatty' inline int IsATTY(int fd) { return isatty(fd); }
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         181960
>Category:       ports
>Synopsis:       graphics/opencv-core: error: use of undeclared identifier 'isatty' inline int IsATTY(int fd) { return isatty(fd); }
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jhale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 09 08:40:00 UTC 2013
>Closed-Date:    Mon Nov 25 14:52:07 UTC 2013
>Last-Modified:  Mon Nov 25 14:52:07 UTC 2013
>Originator:     O. Hartmann
>Release:        FreeBSD 10.0-CURRENT/amd64
>Organization:
FU Berlin
>Environment:
FreeBSD 10.0-CURRENT #0 r255386: Sun Sep  8 12:44:03 CEST 2013 amd64

CXXFLAGS = -std=c++11 -sdtlib=libc++ in /etc/src.conf (it is said not to affect ports building)
>Description:
Since x11/kdelibs4 is broken on most recent CURRENT with the iconv replacemnet update AND with outdated gcc stuff gone (CLANG only now), a rebuild of important port x11/kdelibs4 via

portmaster -dfr kdelibs ends up with a dropout of port graphics/opencv-core, which also doesn't build separately anymore.


[...]
[ 24%] Building CXX object modules/ts/CMakeFiles/opencv_ts.dir/src/ts_gtest.o
In file included from /usr/ports/graphics/opencv-core/work/OpenCV-2.3.1/modules/ts/src/ts_gtest.cpp:39:
In file included from /usr/ports/graphics/opencv-core/work/OpenCV-2.3.1/modules/ts/src/precomp.hpp:7:
In file included from /usr/ports/graphics/opencv-core/work/OpenCV-2.3.1/modules/ts/include/opencv2/ts/ts.hpp:10:
/usr/ports/graphics/opencv-core/work/OpenCV-2.3.1/modules/ts/include/opencv2/ts/ts_gtest.h:2378:36: error: use of undeclared identifier 'isatty'
inline int IsATTY(int fd) { return isatty(fd); }
                                   ^
/usr/ports/graphics/opencv-core/work/OpenCV-2.3.1/modules/ts/include/opencv2/ts/ts_gtest.h:2384:44: error: use of undeclared identifier 'rmdir'
inline int RmDir(const char* dir) { return rmdir(dir); }
                                           ^
/usr/ports/graphics/opencv-core/work/OpenCV-2.3.1/modules/ts/include/opencv2/ts/ts_gtest.h:2406:44: error: use of undeclared identifier 'chdir'
inline int ChDir(const char* dir) { return chdir(dir); }
                                           ^
/usr/ports/graphics/opencv-core/work/OpenCV-2.3.1/modules/ts/include/opencv2/ts/ts_gtest.h:2420:27: error: use of undeclared identifier 'read'; did you
      mean 'Read'?
  return static_cast<int>(read(fd, buf, count));
                          ^~~~
                          Read
/usr/ports/graphics/opencv-core/work/OpenCV-2.3.1/modules/ts/include/opencv2/ts/ts_gtest.h:2419:12: note: 'Read' declared here
inline int Read(int fd, void* buf, unsigned int count) {
           ^
/usr/ports/graphics/opencv-core/work/OpenCV-2.3.1/modules/ts/include/opencv2/ts/ts_gtest.h:2423:27: error: use of undeclared identifier 'write'; did you
      mean 'Write'?
  return static_cast<int>(write(fd, buf, count));

>How-To-Repeat:
Build graphics/opencv-core on most recent CLANG only CURRENT as mentioned above.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->jhale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Sep 9 08:40:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181960 

From: Oliver Fromme <oliver.fromme@secnetix.de>
To: bug-followup@FreeBSD.org, ohartman@zedat.fu-berlin.de
Cc:  
Subject: Re: ports/181960: graphics/opencv-core: error: use of undeclared identifier 'isatty' inline int IsATTY(int fd) { return isatty(fd); }
Date: Tue, 29 Oct 2013 15:38:17 +0100 (CET)

 I don't know if it helps, but apparently the header <unistd.h>
 is not included.  There was exactly the same problem with the
 devel/cssc port, see PR ports/183442.
 
 You need to make sure that you have #include <unistd.h>.
 
 Best regards
    Oliver
 
 
 -- 
 Oliver Fromme,  secnetix GmbH & Co. KG,  Marktplatz 29, 85567 Grafing
 Handelsregister:  Amtsgericht Muenchen, HRA 74606, Geschftsfuehrung:
 secnetix Verwaltungsgesellsch. mbH, Handelsreg.: Amtsgericht Mnchen,
 HRB 125758, Geschftsfhrer:  Maik Bachmann,  Olaf Erb,  Ralf Gebhart
 
 FreeBSD-Dienstleistungen/-Produkte + mehr: http://www.secnetix.de/bsd
 
 "... there are two ways of constructing a software design:  One way
 is to make it so simple that there are _obviously_ no deficiencies and
 the other way is to make it so complicated that there are no _obvious_
 deficiencies."        -- C.A.R. Hoare, ACM Turing Award Lecture, 1980

From: "Jason E. Hale" <jhale@freebsd.org>
To: Oliver Fromme <oliver.fromme@secnetix.de>
Cc: "O. Hartmann" <ohartman@zedat.fu-berlin.de>, bug-followup@freebsd.org
Subject: Re: ports/181960: graphics/opencv-core: error: use of undeclared identifier 'isatty' inline int IsATTY(int fd) { return isatty(fd); }
Date: Tue, 29 Oct 2013 11:31:02 -0400

 On Tuesday, October 29, 2013 14:40:01 Oliver Fromme wrote:
 > 
 >  I don't know if it helps, but apparently the header <unistd.h>
 >  is not included.  There was exactly the same problem with the
 >  devel/cssc port, see PR ports/183442.
 > 
 >  You need to make sure that you have #include <unistd.h>.
 > 
 The port was patched about a month ago to include that header.  I probably 
 should close this PR.  It seems to build fine now (and I should have an update 
 for the port soon, if anyone is wondering...I know it's been a while).
 
 -- 
 Jason E. Hale - jhale@
 FreeBSD Ports Committer
 KDE/FreeBSD Team
State-Changed-From-To: open->closed 
State-Changed-By: jhale 
State-Changed-When: Mon Nov 25 14:52:06 UTC 2013 
State-Changed-Why:  
This issue should be resolved now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181960 
>Unformatted:
