NetBSD Problem Report #54355

From www@netbsd.org  Sun Jul  7 11:22:06 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 94A357A150
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  7 Jul 2019 11:22:06 +0000 (UTC)
Message-Id: <20190707112205.1214F7A1A4@mollari.NetBSD.org>
Date: Sun,  7 Jul 2019 11:22:05 +0000 (UTC)
From: hiroshi-hakoyama@nagano.ac.jp
Reply-To: hiroshi-hakoyama@nagano.ac.jp
To: gnats-bugs@NetBSD.org
Subject: cmake-3.14.5 fails to build on Solaris 10
X-Send-Pr-Version: www-1.0

>Number:         54355
>Category:       pkg
>Synopsis:       cmake-3.14.5 fails to build on Solaris 10
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 07 11:25:00 +0000 2019
>Last-Modified:  Thu Aug 08 13:45:01 +0000 2019
>Originator:     Hiroshi Hakoyama
>Release:        pkgsrc current
>Organization:
Nagano University
>Environment:
SunOS ec21 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Blade-1000
>Description:
cmake-3.14.5 fails to build on Solaris 10.

# bmake

.....

/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c: In function 'cmsysProcess_AddCommand':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:446:7: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
       newCommands[cp->NumberOfCommands][i] = strdup(command[i]);
       ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:446:44: warning: assignment makes pointer from integer without a cast
       newCommands[cp->NumberOfCommands][i] = strdup(command[i]);
                                            ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c: In function 'cmsysProcess_SetWorkingDirectory':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:499:26: warning: assignment makes pointer from integer without a cast
     cp->WorkingDirectory = strdup(dir);
                          ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c: In function 'cmsysProcess_SetPipeFile':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:531:12: warning: assignment makes pointer from integer without a cast
     *pfile = strdup(file);
            ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c: In function 'cmsysProcess_Interrupt':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:1407:11: warning: implicit declaration of function 'kill' [-Wimplicit-function-declaration]
           kill(-cp->ForkPIDs[i], SIGINT);
           ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c: In function 'kwsysProcessCreate':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:1723:3: warning: implicit declaration of function 'sigemptyset' [-Wimplicit-function-declaration]
   sigemptyset(&mask);
   ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:1724:3: warning: implicit declaration of function 'sigaddset' [-Wimplicit-function-declaration]
   sigaddset(&mask, SIGINT);
   ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:1726:3: warning: implicit declaration of function 'sigprocmask' [-Wimplicit-function-declaration]
   if (sigprocmask(SIG_BLOCK, &mask, &old_mask) < 0) {
   ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c: In function 'kwsysProcessRestoreDefaultSignalHandlers':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2307:20: error: storage size of 'act' isn't known
   struct sigaction act;
                    ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2308:26: error: invalid application of 'sizeof' to incomplete type 'struct sigaction'
   memset(&act, 0, sizeof(struct sigaction));
                          ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2311:3: warning: implicit declaration of function 'sigaction' [-Wimplicit-function-declaration]
   sigaction(SIGHUP, &act, 0);
   ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c: In function 'kwsysProcessKill':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2561:5: warning: implicit declaration of function 'popen' [-Wimplicit-function-declaration]
     FILE* ps = popen(KWSYSPE_PS_COMMAND, "r");
     ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2561:16: warning: initialization makes pointer from integer without a cast
     FILE* ps = popen(KWSYSPE_PS_COMMAND, "r");
                ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2577:7: warning: implicit declaration of function 'pclose' [-Wimplicit-function-declaration]
       pclose(ps);
       ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c: In function 'kwsysProcessesAdd':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2713:24: error: storage size of 'newSigAction' isn't known
       struct sigaction newSigAction;
                        ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2714:39: error: invalid application of 'sizeof' to incomplete type 'struct sigaction'
       memset(&newSigAction, 0, sizeof(struct sigaction));
                                       ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2723:31: error: 'SA_NOCLDSTOP' undeclared (first use in this function)
       newSigAction.sa_flags = SA_NOCLDSTOP;
                               ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2723:31: note: each undeclared identifier is reported only once for each function it appears in
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c: In function 'kwsysProcessesSignalHandler':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2861:26: error: storage size of 'defSigAction' isn't known
         struct sigaction defSigAction;
                          ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2883:22: error: storage size of 'newSigAction' isn't known
     struct sigaction newSigAction;
                      ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2884:21: error: expected identifier or '(' before '&' token
     struct sigaction& oldSigAction;
                     ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2885:37: error: invalid application of 'sizeof' to incomplete type 'struct sigaction'
     memset(&newSigAction, 0, sizeof(struct sigaction));
                                     ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2886:5: error: 'newSigChldAction' undeclared (first use in this function)
     newSigChldAction.sa_handler = kwsysProcessesSignalHandler;
     ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2887:33: error: 'SA_NOCLDSTOP' undeclared (first use in this function)
     newSigChldAction.sa_flags = SA_NOCLDSTOP;
                                 ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2891:9: error: 'oldSigAction' undeclared (first use in this function)
         oldSigAction = &kwsysProcessesOldSigChldAction;
         ^
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/ProcessUNIX.c:2902:9: warning: 'return' with a value, in function returning void
         return 0;
         ^
make: *** [ProcessUNIX.o] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors: /usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
*** Error code 9

Stop.
bmake[1]: stopped in /usr/pkgsrc/devel/cmake
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/devel/cmake

%-----------
cmake_bootstrap.log

...

cc1plus: warning: command line option '-std=c99' is valid for C/ObjC but not for 
C++
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/kwsysPlatformTestsCXX.cxx:
 In function 'int main()':
/usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/kwsysPlatformTestsCXX.cxx:
196:13: error: 'environ' was not declared in this scope
   char* e = environ[0];
             ^
Test failed to compile
Try: g++
Line: g++ -std=c99 -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3          -DTEST_KWSYS_STL_HAS_WSTRING /usr/pkgsrc/devel/cmake/work/cmake-3.14.5/Source/kwsys/kwsysPlatformTestsCXX.cxx -o cmake_bootstrap_24426_test
>How-To-Repeat:
At first, cmake_bootstrap says "On Solaris we need C99." and c99 is not set in the build, so I added -std=c99 in mk.conf

# bmake

%----------------------------

mk.conf
.ifdef BSD_PKG_MK       # begin pkgsrc settings

ABI=                    32
PKGSRC_COMPILER=        gcc
# GCCBASE=              /opt/csw/gcc4
# GCCBASE=              /usr/pkg/gcc49
GCCBASE=                /usr/pkg2/gcc49

PKG_DBDIR=              /usr/pkg/pkgdb
LOCALBASE=              /usr/pkg
VARBASE=                /var
PKG_TOOLS_BIN=          /usr/pkg/sbin
PKGINFODIR=             info
PKGMANDIR=              man

TOOLS_PLATFORM.install?=        ${LOCALBASE}/bin/bsdinstall
TOOLS_PLATFORM.awk?=            ${LOCALBASE}/bin/nawk
TOOLS_PLATFORM.sed?=            ${LOCALBASE}/bin/nbsed
TOOLS_PLATFORM.sh?=             /usr/bin/bash

# On Solaris cmake need C99. 
 CFLAGS+= -std=c99 -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3
CXXFLAGS+= -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3
DBG=                    # prevent DBG from adding default optimizer flags

# gcc49
PKG_OPTIONS.gcc49= gcc-c++ -gcc-fortran -gcc-go gcc-inplace-math -gcc-objc -gcc-objc++

X11_TYPE= modular
USE_INET6= no

PKG_OPTIONS.tnftp= -inet6
PKG_OPTIONS.xz= -nls
PKG_OPTIONS.cvs = -kerberos
PKG_OPTIONS.groff= -x11 -groff-docs
PKG_OPTIONS.gd= -x11
PKG_OPTIONS.apache= -http2

IS_BUILTIN.zlib= yes
USE_BUILTIN.zlib= no
PREFER.zlib= pkgsrc

USE_BUILTIN.bzip2= no
PREFER.bzip2= pkgsrc
USE_BZIP2= yes

ACCEPTABLE_LICENSES+=vim-license


.endif                  # end pkgsrc settings
>Fix:
unknown

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Mon, 05 Aug 2019 19:27:46 +0000
Responsible-Changed-Why:
Ping the Solaris-interested folk. I wonder if the definition of 'struct sigaction' is guarded under some #ifdef _XOPEN_SOMEVALUE.
Can you share the header that defines struct sigaction?


From: maya@NetBSD.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54355 (cmake-3.14.5 fails to build on Solaris 10)
Date: Mon, 5 Aug 2019 19:28:34 +0000

 On Mon, Aug 05, 2019 at 07:27:46PM +0000, maya@NetBSD.org wrote:
 > Ping the Solaris-interested folk. I wonder if the definition of 'struct sigaction' is guarded under some #ifdef _XOPEN_SOMEVALUE.
 > Can you share the header that defines struct sigaction?

 That is, share any files containing the word 'struct sigaction' or, if
 there is no such file, 'sigaction' in /usr/include.

From: maya@NetBSD.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54355 (cmake-3.14.5 fails to build on Solaris 10)
Date: Mon, 5 Aug 2019 19:31:21 +0000

 > At first, cmake_bootstrap says "On Solaris we need C99." and c99 is
 > not set in the build, so I added -std=c99 in mk.conf

 Does this help?

 I strongly advise against putting this in your mk.conf, it needs to be
 on a per-package basis. Perhaps something needs a different C standard,
 and this might cause the wrong one to be chosen.

From: Hiroshi Hakoyama <hiroshi-hakoyama@nagano.ac.jp>
To: gnats-bugs@netbsd.org
Cc: solaris-pkg-people@netbsd.org,
 gnats-admin@netbsd.org,
 pkgsrc-bugs@netbsd.org
Subject: Re: pkg/54355 (cmake-3.14.5 fails to build on Solaris 10)
Date: Tue, 6 Aug 2019 13:08:05 +0900

 >> Can you share the header that defines struct sigaction?
 # cd /usr/include
 # find ./ -type f -print | xargs grep 'struct sigaction'
 ./sys/proc/prdata.h:extern      void    prgetaction32(proc_t *, user_t =
 *, uint_t, struct sigaction32 *);
 ./sys/proc/prdata.h:extern      void    prgetaction(proc_t *, user_t *, =
 uint_t, struct sigaction *);
 ./sys/procfs.h: struct sigaction pr_action;     /* signal action for =
 current signal */
 ./sys/procfs.h: struct sigaction32 pr_action;   /* signal action for =
 current signal */
 ./sys/signal.h:struct sigaction {
 ./sys/signal.h:struct sigaction32 {
 ./apptrace_impl.h:extern int (*abi_sigaction)(int, const struct =
 sigaction *, struct sigaction *);
 ./signal.h:extern int sigaction(int, const struct sigaction =
 *_RESTRICT_KYWD,
 ./signal.h:     struct sigaction *_RESTRICT_KYWD);
 ./libtecla.h:#include <signal.h>  /* struct sigaction */


 > 2019/08/06 4:30=E3=80=81maya@netbsd.org <maya@NetBSD.org>=E3=81=AE=E3=83=
 =A1=E3=83=BC=E3=83=AB:
 >=20
 > The following reply was made to PR pkg/54355; it has been noted by =
 GNATS.
 >=20
 > From: maya@NetBSD.org
 > To: gnats-bugs@netbsd.org
 > Cc:=20
 > Subject: Re: pkg/54355 (cmake-3.14.5 fails to build on Solaris 10)
 > Date: Mon, 5 Aug 2019 19:28:34 +0000
 >=20
 > On Mon, Aug 05, 2019 at 07:27:46PM +0000, maya@NetBSD.org wrote:
 >> Ping the Solaris-interested folk. I wonder if the definition of =
 'struct sigaction' is guarded under some #ifdef _XOPEN_SOMEVALUE.
 >> Can you share the header that defines struct sigaction?
 >=20
 > That is, share any files containing the word 'struct sigaction' or, if
 > there is no such file, 'sigaction' in /usr/include.
 >=20

From: Hiroshi Hakoyama <hiroshi-hakoyama@nagano.ac.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54355 (cmake-3.14.5 fails to build on Solaris 10)
Date: Tue, 6 Aug 2019 13:08:59 +0900

 > Does this help?
 >=20
 > I strongly advise against putting this in your mk.conf, it needs to be
 > on a per-package basis. Perhaps something needs a different C =
 standard,
 > and this might cause the wrong one to be chosen.
 This seems to be no help. I think you are right.

 Hiroshi




 > 2019/08/06 4:35=E3=80=81maya@netbsd.org <maya@NetBSD.org>=E3=81=AE=E3=83=
 =A1=E3=83=BC=E3=83=AB:
 >=20
 > The following reply was made to PR pkg/54355; it has been noted by =
 GNATS.
 >=20
 > From: maya@NetBSD.org
 > To: gnats-bugs@netbsd.org
 > Cc:=20
 > Subject: Re: pkg/54355 (cmake-3.14.5 fails to build on Solaris 10)
 > Date: Mon, 5 Aug 2019 19:31:21 +0000
 >=20
 >> At first, cmake_bootstrap says "On Solaris we need C99." and c99 is
 >> not set in the build, so I added -std=3Dc99 in mk.conf
 >=20
 > Does this help?
 >=20
 > I strongly advise against putting this in your mk.conf, it needs to be
 > on a per-package basis. Perhaps something needs a different C =
 standard,
 > and this might cause the wrong one to be chosen.
 >=20

From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54355: cmake-3.14.5 fails to build on Solaris 10
Date: Thu, 8 Aug 2019 07:16:10 +0000

 Patch against cmake 3.14.5 (pkgsrc-2019Q2, if that's what you are
 using). I assume you need -D_XOPEN_SOURCE=600.


 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/cmake/distinfo,v
 retrieving revision 1.142
 diff -u -r1.142 distinfo
 --- distinfo	1 Jun 2019 20:24:07 -0000	1.142
 +++ distinfo	8 Aug 2019 07:13:47 -0000
 @@ -21,4 +21,4 @@
  SHA1 (patch-Source_cmAlgorithms.h) = c51cc61b1a95c07bd903363d4a04e1430e510516
  SHA1 (patch-Source_cm__string__view.hxx) = 9f2fa518d26dcaebb1e988c8027fb16456e1b80d
  SHA1 (patch-Utilities_KWIML_CMakeLists.txt) = e4bdf9fc58757e87bf7e3e3e195839eededbc796
 -SHA1 (patch-bootstrap) = 9d99cfe9f9ae826250f94bc297f5a22b8de09e84
 +SHA1 (patch-bootstrap) = 754d379171c2581cfcf2b7243ed7ecfa40f61987
 Index: patches/patch-bootstrap
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/cmake/patches/patch-bootstrap,v
 retrieving revision 1.2
 diff -u -r1.2 patch-bootstrap
 --- patches/patch-bootstrap	14 Dec 2017 22:13:34 -0000	1.2
 +++ patches/patch-bootstrap	8 Aug 2019 07:13:47 -0000
 @@ -1,10 +1,11 @@
  $NetBSD: patch-bootstrap,v 1.2 2017/12/14 22:13:34 adam Exp $

  Use external libuv; the one included with cmake makes building fail.
 +on SunOS, -D_XOPEN_SOURCE=600 for SA_NOCLDSTOP used in ProcessUNIX.c:2723

 ---- bootstrap.orig	2017-11-20 15:19:54.000000000 +0000
 +--- bootstrap.orig	2019-05-31 13:31:27.000000000 +0000
  +++ bootstrap
 -@@ -1305,11 +1306,8 @@ objs=""
 +@@ -1350,11 +1350,8 @@ objs=""
   for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${LexerParser_CXX_SOURCES} ${LexerParser_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES}; do
     objs="${objs} ${a}.o"
   done
 @@ -17,7 +18,15 @@

   uv_c_flags=""
   if ${cmake_system_mingw}; then
 -@@ -1419,11 +1417,6 @@ for a in ${KWSYS_CXX_SOURCES}; do
 +@@ -1384,6 +1381,7 @@ else
 +       # Normally libuv uses '-D_XOPEN_SOURCE=500 -std=c90' on Solaris 5.10,
 +       # but we do not need to do that because we bootstrap using POSIX APIs.
 +       uv_c_flags="${uv_c_flags} -D__EXTENSIONS__ -D_XOPEN_SOURCE=600"
 ++      cmake_c_flags="${cmake_c_flags} -D_XOPEN_SOURCE=600"
 +       libs="${libs} -lkstat -lnsl -lsendfile -lsocket -lrt"
 +       ;;
 +   esac
 +@@ -1467,11 +1465,6 @@ for a in ${KWSYS_CXX_SOURCES}; do
     echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
     echo "	${cmake_cxx_compiler} ${cmake_cxx_flags} -DKWSYS_NAMESPACE=cmsys ${src_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
   done

From: Hiroshi Hakoyama <hiroshi-hakoyama@nagano.ac.jp>
To: gnats-bugs@netbsd.org,
 coypu@sdf.org
Cc: solaris-pkg-people@netbsd.org,
 gnats-admin@netbsd.org,
 pkgsrc-bugs@netbsd.org
Subject: Re: pkg/54355: cmake-3.14.5 fails to build on Solaris 10
Date: Thu, 8 Aug 2019 22:04:30 +0900

 I got following errors:

 g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 -D_FORTIFY_SOURCE=3D2 =
 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include -O3 =
 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3             =
 -I/usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Bootstrap.cmk   =
 -I/usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Source   =
 -I/usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Source/LexerParser   =
 -I/usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Utilities  -c =
 /usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Source/cmFileCommand.cxx -o =
 cmFileCommand.o
 In file included from /opt/csw/include/c++/5.5.0/cmath:44:0,
                  from =
 /usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Source/cmFileCommand.cxx:13:
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:52:12: =
 error: std::float_t' has not been declared
  using std::float_t;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:53:12: =
 error: std::double_t' has not been declared
  using std::double_t;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:55:12: =
 error: std::fpclassify' has not been declared
  using std::fpclassify;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:56:12: =
 error: std::isfinite' has not been declared
  using std::isfinite;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:57:12: =
 error: std::isinf' has not been declared
  using std::isinf;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:58:12: =
 error: std::isnan' has not been declared
  using std::isnan;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:59:12: =
 error: std::isnormal' has not been declared
  using std::isnormal;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:60:12: =
 error: std::signbit' has not been declared
  using std::signbit;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:62:12: =
 error: std::isgreater' has not been declared
  using std::isgreater;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:63:12: =
 error: std::isgreaterequal' has not been declared
  using std::isgreaterequal;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:64:12: =
 error: std::isless' has not been declared
  using std::isless;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:65:12: =
 error: std::islessequal' has not been declared
  using std::islessequal;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:66:12: =
 error: std::islessgreater' has not been declared
  using std::islessgreater;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:67:12: =
 error: std::isunordered' has not been declared
  using std::isunordered;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:69:12: =
 error: std::acosh' has not been declared
  using std::acosh;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:70:12: =
 error: std::asinh' has not been declared
  using std::asinh;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:71:12: =
 error: std::atanh' has not been declared
  using std::atanh;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:72:12: =
 error: std::cbrt' has not been declared
  using std::cbrt;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:73:12: =
 error: std::copysign' has not been declared
  using std::copysign;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:74:12: =
 error: std::erf' has not been declared
  using std::erf;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:75:12: =
 error: std::erfc' has not been declared
  using std::erfc;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:76:12: =
 error: std::exp2' has not been declared
  using std::exp2;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:77:12: =
 error: std::expm1' has not been declared
  using std::expm1;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:78:12: =
 error: std::fdim' has not been declared
  using std::fdim;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:79:12: =
 error: std::fma' has not been declared
  using std::fma;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:80:12: =
 error: std::fmax' has not been declared
  using std::fmax;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:81:12: =
 error: std::fmin' has not been declared
  using std::fmin;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:82:12: =
 error: std::hypot' has not been declared
  using std::hypot;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:83:12: =
 error: std::ilogb' has not been declared
  using std::ilogb;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:84:12: =
 error: std::lgamma' has not been declared
  using std::lgamma;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:85:12: =
 error: std::llrint' has not been declared
  using std::llrint;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:86:12: =
 error: std::llround' has not been declared
  using std::llround;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:87:12: =
 error: std::log1p' has not been declared
  using std::log1p;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:88:12: =
 error: std::log2' has not been declared
  using std::log2;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:89:12: =
 error: std::logb' has not been declared
  using std::logb;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:90:12: =
 error: std::lrint' has not been declared
  using std::lrint;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:91:12: =
 error: std::lround' has not been declared
  using std::lround;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:92:12: =
 error: std::nan' has not been declared
  using std::nan;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:93:12: =
 error: std::nanf' has not been declared
  using std::nanf;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:94:12: =
 error: std::nanl' has not been declared
  using std::nanl;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:95:12: =
 error: std::nearbyint' has not been declared
  using std::nearbyint;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:96:12: =
 error: std::nextafter' has not been declared
  using std::nextafter;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:97:12: =
 error: std::nexttoward' has not been declared
  using std::nexttoward;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:98:12: =
 error: std::remainder' has not been declared
  using std::remainder;
             ^
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:99:12: =
 error: std::remquo' has not been declared
  using std::remquo;
             ^
 =
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:100:12: =
 error:'std::rint' has not been declared
  using std::rint;
             ^
 =
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:101:12: =
 error:'std::round' has not been declared
  using std::round;
             ^
 =
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:102:12: =
 error:'std::scalbln' has not been declared
  using std::scalbln;
             ^
 =
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:103:12: =
 error:'std::scalbn' has not been declared
  using std::scalbn;
             ^
 =
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:104:12: =
 error:'std::tgamma' has not been declared
  using std::tgamma;
             ^
 =
 /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:105:12: =
 error:'std::trunc' has not been declared
  using std::trunc;
             ^
 make: *** [cmFileCommand.o] Error 1
 ---------------------------------------------
 Error when bootstrapping CMake:
 Problem while running make
 ---------------------------------------------
 Log of errors: =
 /usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Bootstrap.cmk/cmake_bootstrap.lo=
 g
 ---------------------------------------------
 *** Error code 9

 Stop.
 bmake[1]: stopped in /usr/pkgsrc/devel/cmake
 *** Error code 1

 Stop.
 bmake: stopped in /usr/pkgsrc/devel/cmake

 [ec21:pkgsrc/devel/cmake] hako# more =
 /usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Bootstrap.cmk/cmake_bootstrap.lo=
 g
 Checking whether 'gcc -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D
 2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include  ' works.
 Try: gcc
 Line: gcc -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include   =
 cmake_bootstrap_26202_test.c
  -o cmake_bootstrap_26202_test
 ----------  file   -----------------------

 #ifdef __cplusplus
 # error "The CMAKE_C_COMPILER is set to a C++ compiler"
 #endif

 #if defined(_AIX) && defined(__GNUC__) && !defined(_THREAD_SAFE)
 #error "On AIX with GNU we need the -pthread flag."
 #endif

 #if defined(__sun) && __STDC_VERSION__ < 199901L
 #error "On Solaris we need C99."
 #endif

 #include <stdio.h>

 int main(int argc, char* argv[])
 {
   printf("%d%c", (argv !=3D 0), (char)0x0a);
   return argc - 1;
 }

 ------------------------------------------
 1
 Test succeeded
 Checking whether 'gcc -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D
 2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include    ' =
 works.
 Try: gcc
 Line: gcc -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include     =
 cmake_bootstrap_26202_test
 .c -o cmake_bootstrap_26202_test
 ----------  file   -----------------------

 #ifdef __cplusplus
 # error "The CMAKE_C_COMPILER is set to a C++ compiler"
 #endif

 #if defined(_AIX) && defined(__GNUC__) && !defined(_THREAD_SAFE)
 #error "On AIX with GNU we need the -pthread flag."
 #endif

 #if defined(__sun) && __STDC_VERSION__ < 199901L
 #error "On Solaris we need C99."
 #endif

 #include <stdio.h>

 int main(int argc, char* argv[])
 {
   printf("%d%c", (argv !=3D 0), (char)0x0a);
   return argc - 1;
 }

 ------------------------------------------
 1
 Test succeeded
 Checking whether 'gcc -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D
 2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include      ' =
 works.
 Try: gcc
 Line: gcc -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include       =
 cmake_bootstrap_26202_te
 st.c -o cmake_bootstrap_26202_test
 ----------  file   -----------------------

 #ifdef __cplusplus
 # error "The CMAKE_C_COMPILER is set to a C++ compiler"
 #endif

 #if defined(_AIX) && defined(__GNUC__) && !defined(_THREAD_SAFE)
 #error "On AIX with GNU we need the -pthread flag."
 #endif

 #if defined(__sun) && __STDC_VERSION__ < 199901L
 #error "On Solaris we need C99."
 #endif

 #include <stdio.h>

 int main(int argc, char* argv[])
 {
   printf("%d%c", (argv !=3D 0), (char)0x0a);
   return argc - 1;
 }

 ------------------------------------------
 1
 Test succeeded
 Checking whether 'g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D
 2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include -O3 =
 -mcpu=3Dultraspa
 rc3 -mtune=3Dultrasparc3  ' works.
 Try: g++
 Line: g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=3Dultrasparc3=
  -mtune=3Du
 ltrasparc3   cmake_bootstrap_26202_test.cxx -o =
 cmake_bootstrap_26202_test
 ----------  file   -----------------------

 #include <iostream>
 #include <memory>
 #include <unordered_map>

 #if __cplusplus < 201103L
 #error "Compiler is not in a mode aware of C++11."
 #endif

 #if defined(_AIX) && defined(__GNUC__) && !defined(_THREAD_SAFE)
 #error "On AIX with GNU we need the -pthread flag."
 #endif

 #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
 #error "SunPro <=3D 5.13 mode not supported due to bug in move =
 semantics."
 #endif

 class Class
 {
 public:
   int Get() const { return this->Member; }
 private:
   int Member =3D 1;
 };
 int main()
 {
   auto const c =3D std::unique_ptr<Class>(new Class);
   std::cout << c->Get() << std::endl;
   return 0;
 }

 ------------------------------------------
 1
 Test succeeded
 Checking whether 'g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D
 2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include -O3 =
 -mcpu=3Dultraspa
 rc3 -mtune=3Dultrasparc3     ' works.
 Try: g++
 Line: g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=3Dultrasparc3=
  -mtune=3Du
 ltrasparc3      cmake_bootstrap_26202_test.cxx -o =
 cmake_bootstrap_26202_test
 ----------  file   -----------------------

 #include <iostream>
 #include <memory>
 #include <unordered_map>

 #if __cplusplus < 201103L
 #error "Compiler is not in a mode aware of C++11."
 #endif

 #if defined(_AIX) && defined(__GNUC__) && !defined(_THREAD_SAFE)
 #error "On AIX with GNU we need the -pthread flag."
 #endif

 #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
 #error "SunPro <=3D 5.13 mode not supported due to bug in move =
 semantics."
 #endif

 class Class
 {
 public:
   int Get() const { return this->Member; }
 private:
   int Member =3D 1;
 };
 int main()
 {
   auto const c =3D std::unique_ptr<Class>(new Class);
   std::cout << c->Get() << std::endl;
   return 0;
 }

 ------------------------------------------
 1
 Test succeeded)
 Checking whether 'g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D
 2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include -O3 =
 -mcpu=3Dultraspa
 rc3 -mtune=3Dultrasparc3        ' works.
 Try: g++
 Line: g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=3Dultrasparc3=
  -mtune=3Du
 ltrasparc3         cmake_bootstrap_26202_test.cxx -o =
 cmake_bootstrap_26202_test
 ----------  file   -----------------------

 #include <iostream>
 #include <memory>
 #include <unordered_map>

 #if __cplusplus < 201103L
 #error "Compiler is not in a mode aware of C++11."
 #endif

 #if defined(_AIX) && defined(__GNUC__) && !defined(_THREAD_SAFE)
 #error "On AIX with GNU we need the -pthread flag."
 #endif

 #if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
 #error "SunPro <=3D 5.13 mode not supported due to bug in move =
 semantics."
 #endif

 class Class
 {
 public:
   int Get() const { return this->Member; }
 private:
   int Member =3D 1;
 };
 int main()
 {
   auto const c =3D std::unique_ptr<Class>(new Class);
   std::cout << c->Get() << std::endl;
   return 0;
 }

 ------------------------------------------
 1
 Test succeeded
 Try: make
 "gcc" -lsocket -lnsl -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo =
 -L/usr/lib -Wl,
 -R/usr/lib -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pk
 g/include -I/usr/pkg/include/ncurses -I/usr/include       -o test test.c
 1
 make works
 Try: g++
 Line: g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=3Dultrasparc3=
  -mtune=3Du
 ltrasparc3          -DTEST_KWSYS_CXX_HAS_SETENV =
 /usr/pkgsrc/devel/cmake/work/cmak
 e-3.15.2/Source/kwsys/kwsysPlatformTestsCXX.cxx -o =
 cmake_bootstrap_26202_test
 ----------  file   -----------------------
 /* Distributed under the OSI-approved BSD 3-Clause License.  See =
 accompanying
    file Copyright.txt or https://cmake.org/licensing#kwsys for details.  =
 */
 #ifdef TEST_KWSYS_CXX_HAS_CSTDIO
 #  include <cstdio>
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_LONG_LONG
 long long f(long long n)
 {
   return n;
 }
 int main()
 {
   long long n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS___INT64
 __int64 f(__int64 n)
 {
   return n;
 }
 int main()
 {
   __int64 n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIM
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtim.tv_sec;
   (void)stat1.st_mtim.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIMESPEC
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtimespec.tv_sec;
   (void)stat1.st_mtimespec.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_AND___INT64
 void function(long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
 void function(long long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM_LONG_LONG
 #  include <iostream>
 int test_istream(std::istream& is, long long& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM_LONG_LONG
 #  include <iostream>
 int test_ostream(std::ostream& os, long long x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM___INT64
 #  include <iostream>
 int test_istream(std::istream& is, __int64& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM___INT64
 #  include <iostream>
 int test_ostream(std::ostream& os, __int64 x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_SETENV
 #  include <stdlib.h>
 int main()
 {
   return setenv("A", "B", 1);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UNSETENV
 #  include <stdlib.h>
 int main()
 {
   unsetenv("A");
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
 #  include <stdlib.h>
 int main()
 {
   char* e =3D environ[0];
   return e ? 0 : 1;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_GETLOADAVG
 // Match feature definitions from SystemInformation.cxx
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <stdlib.h>
 int main()
 {
   double loadavg[3] =3D { 0.0, 0.0, 0.0 };
   return getloadavg(loadavg, 3);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_RLIMIT64
 #  include <sys/resource.h>
 int main()
 {
   struct rlimit64 rlim;
   return getrlimit64(0, &rlim);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOLL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atoll(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atol(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS__ATOI64
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(_atoi64(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMES
 #  include <sys/time.h>
 int main()
 {
   struct timeval* current_time =3D 0;
   return utimes("/example", current_time);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT
 #  include <fcntl.h>
 #  include <sys/stat.h>
 #  if defined(__APPLE__)
 #    include <AvailabilityMacros.h>
 #    if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 #      error "utimensat not available on macOS < 10.13"
 #    endif
 #  endif
 int main()
 {
   struct timespec times[2] =3D { { 0, UTIME_OMIT }, { 0, UTIME_NOW } };
   return utimensat(AT_FDCWD, "/example", times, AT_SYMLINK_NOFOLLOW);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BACKTRACE
 #  if defined(__PATHSCALE__) || defined(__PATHCC__) ||                   =
      \
     (defined(__LSB_VERSION__) && (__LSB_VERSION__ < 41))
 backtrace does not work with this compiler or os
 #  endif
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <execinfo.h>
 int main()
 {
   void* stackSymbols[256];
   backtrace(stackSymbols, 256);
   backtrace_symbols(&stackSymbols[0], 1);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_DLADDR
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <dlfcn.h>
 int main()
 {
   Dl_info info;
   int ierr =3D dladdr((void*)main, &info);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_CXXABI
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  if defined(__SUNPRO_CC) && __SUNPRO_CC >=3D 0x5130 && __linux &&      =
        \
     __SUNPRO_CC_COMPAT =3D=3D 'G'
 #    include <iostream>
 #  endif
 #  include <cxxabi.h>
 int main()
 {
   int status =3D 0;
   size_t bufferLen =3D 512;
   char buffer[512] =3D { '\0' };
   const char* function =3D =
 "_ZN5kwsys17SystemInformation15GetProgramStackEii";
   char* demangledFunction =3D
     abi::__cxa_demangle(function, buffer, &bufferLen, &status);
   return status;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
 int main()
 {
   int a =3D 1;
   __asm {
     xor EBX, EBX;
     mov a, EBX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
 int main()
 {
   int a =3D 0;
   __asm {
     xor EAX, EAX;
     cpuid;
     mov a, EAX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_STL_HAS_WSTRING
 #  include <string>
 void f(std::wstring*)
 {
 }
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H
 #  include <ext/stdio_filebuf.h>
 int main()
 {
   return 0;
 }
 #endif
 ------------------------------------------
 Test succeeded
 Try: g++
 Line: g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=3Dultrasparc3=
  -mtune=3Du
 ltrasparc3          -DTEST_KWSYS_CXX_HAS_UNSETENV =
 /usr/pkgsrc/devel/cmake/work/cm
 ake-3.15.2/Source/kwsys/kwsysPlatformTestsCXX.cxx -o =
 cmake_bootstrap_26202_test
 ----------  file   -----------------------
 /* Distributed under the OSI-approved BSD 3-Clause License.  See =
 accompanying
    file Copyright.txt or https://cmake.org/licensing#kwsys for details.  =
 */
 #ifdef TEST_KWSYS_CXX_HAS_CSTDIO
 #  include <cstdio>
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_LONG_LONG
 long long f(long long n)
 {
   return n;
 }
 int main()
 {
   long long n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS___INT64
 __int64 f(__int64 n)
 {
   return n;
 }
 int main()
 {
   __int64 n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIM
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtim.tv_sec;
   (void)stat1.st_mtim.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIMESPEC
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtimespec.tv_sec;
   (void)stat1.st_mtimespec.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_AND___INT64
 void function(long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
 void function(long long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM_LONG_LONG
 #  include <iostream>
 int test_istream(std::istream& is, long long& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM_LONG_LONG
 #  include <iostream>
 int test_ostream(std::ostream& os, long long x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM___INT64
 #  include <iostream>
 int test_istream(std::istream& is, __int64& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM___INT64
 #  include <iostream>
 int test_ostream(std::ostream& os, __int64 x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_SETENV
 #  include <stdlib.h>
 int main()
 {
   return setenv("A", "B", 1);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UNSETENV
 #  include <stdlib.h>
 int main()
 {
   unsetenv("A");
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
 #  include <stdlib.h>
 int main()
 {
   char* e =3D environ[0];
   return e ? 0 : 1;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_GETLOADAVG
 // Match feature definitions from SystemInformation.cxx
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <stdlib.h>
 int main()
 {
   double loadavg[3] =3D { 0.0, 0.0, 0.0 };
   return getloadavg(loadavg, 3);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_RLIMIT64
 #  include <sys/resource.h>
 int main()
 {
   struct rlimit64 rlim;
   return getrlimit64(0, &rlim);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOLL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atoll(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atol(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS__ATOI64
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(_atoi64(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMES
 #  include <sys/time.h>
 int main()
 {
   struct timeval* current_time =3D 0;
   return utimes("/example", current_time);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT
 #  include <fcntl.h>
 #  include <sys/stat.h>
 #  if defined(__APPLE__)
 #    include <AvailabilityMacros.h>
 #    if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 #      error "utimensat not available on macOS < 10.13"
 #    endif
 #  endif
 int main()
 {
   struct timespec times[2] =3D { { 0, UTIME_OMIT }, { 0, UTIME_NOW } };
   return utimensat(AT_FDCWD, "/example", times, AT_SYMLINK_NOFOLLOW);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BACKTRACE
 #  if defined(__PATHSCALE__) || defined(__PATHCC__) ||                   =
      \
     (defined(__LSB_VERSION__) && (__LSB_VERSION__ < 41))
 backtrace does not work with this compiler or os
 #  endif
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <execinfo.h>
 int main()
 {
   void* stackSymbols[256];
   backtrace(stackSymbols, 256);
   backtrace_symbols(&stackSymbols[0], 1);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_DLADDR
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <dlfcn.h>
 int main()
 {
   Dl_info info;
   int ierr =3D dladdr((void*)main, &info);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_CXXABI
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  if defined(__SUNPRO_CC) && __SUNPRO_CC >=3D 0x5130 && __linux &&      =
        \
     __SUNPRO_CC_COMPAT =3D=3D 'G'
 #    include <iostream>
 #  endif
 #  include <cxxabi.h>
 int main()
 {
   int status =3D 0;
   size_t bufferLen =3D 512;
   char buffer[512] =3D { '\0' };
   const char* function =3D =
 "_ZN5kwsys17SystemInformation15GetProgramStackEii";
   char* demangledFunction =3D
     abi::__cxa_demangle(function, buffer, &bufferLen, &status);
   return status;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
 int main()
 {
   int a =3D 1;
   __asm {
     xor EBX, EBX;
     mov a, EBX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
 int main()
 {
   int a =3D 0;
   __asm {
     xor EAX, EAX;
     cpuid;
     mov a, EAX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_STL_HAS_WSTRING
 #  include <string>
 void f(std::wstring*)
 {
 }
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H
 #  include <ext/stdio_filebuf.h>
 int main()
 {
   return 0;
 }
 #endif
 ------------------------------------------
 Test succeeded
 Try: g++
 Line: g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=3Dultrasparc3=
  -mtune=3Du
 ltrasparc3          -DTEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H =
 /usr/pkgsrc/devel/cm
 ake/work/cmake-3.15.2/Source/kwsys/kwsysPlatformTestsCXX.cxx -o =
 cmake_bootstrap_2
 6202_test
 ----------  file   -----------------------
 /* Distributed under the OSI-approved BSD 3-Clause License.  See =
 accompanying
    file Copyright.txt or https://cmake.org/licensing#kwsys for details.  =
 */
 #ifdef TEST_KWSYS_CXX_HAS_CSTDIO
 #  include <cstdio>
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_LONG_LONG
 long long f(long long n)
 {
   return n;
 }
 int main()
 {
   long long n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS___INT64
 __int64 f(__int64 n)
 {
   return n;
 }
 int main()
 {
   __int64 n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIM
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtim.tv_sec;
   (void)stat1.st_mtim.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIMESPEC
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtimespec.tv_sec;
   (void)stat1.st_mtimespec.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_AND___INT64
 void function(long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
 void function(long long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM_LONG_LONG
 #  include <iostream>
 int test_istream(std::istream& is, long long& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM_LONG_LONG
 #  include <iostream>
 int test_ostream(std::ostream& os, long long x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM___INT64
 #  include <iostream>
 int test_istream(std::istream& is, __int64& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM___INT64
 #  include <iostream>
 int test_ostream(std::ostream& os, __int64 x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_SETENV
 #  include <stdlib.h>
 int main()
 {
   return setenv("A", "B", 1);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UNSETENV
 #  include <stdlib.h>
 int main()
 {
   unsetenv("A");
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
 #  include <stdlib.h>
 int main()
 {
   char* e =3D environ[0];
   return e ? 0 : 1;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_GETLOADAVG
 // Match feature definitions from SystemInformation.cxx
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <stdlib.h>
 int main()
 {
   double loadavg[3] =3D { 0.0, 0.0, 0.0 };
   return getloadavg(loadavg, 3);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_RLIMIT64
 #  include <sys/resource.h>
 int main()
 {
   struct rlimit64 rlim;
   return getrlimit64(0, &rlim);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOLL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atoll(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atol(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS__ATOI64
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(_atoi64(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMES
 #  include <sys/time.h>
 int main()
 {
   struct timeval* current_time =3D 0;
   return utimes("/example", current_time);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT
 #  include <fcntl.h>
 #  include <sys/stat.h>
 #  if defined(__APPLE__)
 #    include <AvailabilityMacros.h>
 #    if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 #      error "utimensat not available on macOS < 10.13"
 #    endif
 #  endif
 int main()
 {
   struct timespec times[2] =3D { { 0, UTIME_OMIT }, { 0, UTIME_NOW } };
   return utimensat(AT_FDCWD, "/example", times, AT_SYMLINK_NOFOLLOW);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BACKTRACE
 #  if defined(__PATHSCALE__) || defined(__PATHCC__) ||                   =
      \
     (defined(__LSB_VERSION__) && (__LSB_VERSION__ < 41))
 backtrace does not work with this compiler or os
 #  endif
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <execinfo.h>
 int main()
 {
   void* stackSymbols[256];
   backtrace(stackSymbols, 256);
   backtrace_symbols(&stackSymbols[0], 1);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_DLADDR
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <dlfcn.h>
 int main()
 {
   Dl_info info;
   int ierr =3D dladdr((void*)main, &info);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_CXXABI
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  if defined(__SUNPRO_CC) && __SUNPRO_CC >=3D 0x5130 && __linux &&      =
        \
     __SUNPRO_CC_COMPAT =3D=3D 'G'
 #    include <iostream>
 #  endif
 #  include <cxxabi.h>
 int main()
 {
   int status =3D 0;
   size_t bufferLen =3D 512;
   char buffer[512] =3D { '\0' };
   const char* function =3D =
 "_ZN5kwsys17SystemInformation15GetProgramStackEii";
   char* demangledFunction =3D
     abi::__cxa_demangle(function, buffer, &bufferLen, &status);
   return status;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
 int main()
 {
   int a =3D 1;
   __asm {
     xor EBX, EBX;
     mov a, EBX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
 int main()
 {
   int a =3D 0;
   __asm {
     xor EAX, EAX;
     cpuid;
     mov a, EAX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_STL_HAS_WSTRING
 #  include <string>
 void f(std::wstring*)
 {
 }
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H
 #  include <ext/stdio_filebuf.h>
 int main()
 {
   return 0;
 }
 #endif
 ------------------------------------------
 =
 /usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Source/kwsys/kwsysPlatformTestsC=
 XX.cxx:
  In function 'int main()':
 =
 /usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Source/kwsys/kwsysPlatformTestsC=
 XX.cxx:
 160:13: error: 'environ' was not declared in this scope
    char* e =3D environ[0];
              ^
 Test failed to compile
 Try: g++
 Line: g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=3Dultrasparc3=
  -mtune=3Du
 ltrasparc3          -DTEST_KWSYS_STL_HAS_WSTRING =
 /usr/pkgsrc/devel/cmake/work/cma
 ke-3.15.2/Source/kwsys/kwsysPlatformTestsCXX.cxx -o =
 cmake_bootstrap_26202_test
 ----------  file   -----------------------
 /* Distributed under the OSI-approved BSD 3-Clause License.  See =
 accompanying
    file Copyright.txt or https://cmake.org/licensing#kwsys for details.  =
 */
 #ifdef TEST_KWSYS_CXX_HAS_CSTDIO
 #  include <cstdio>
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_LONG_LONG
 long long f(long long n)
 {
   return n;
 }
 int main()
 {
   long long n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS___INT64
 __int64 f(__int64 n)
 {
   return n;
 }
 int main()
 {
   __int64 n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIM
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtim.tv_sec;
   (void)stat1.st_mtim.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIMESPEC
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtimespec.tv_sec;
   (void)stat1.st_mtimespec.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_AND___INT64
 void function(long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
 void function(long long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM_LONG_LONG
 #  include <iostream>
 int test_istream(std::istream& is, long long& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM_LONG_LONG
 #  include <iostream>
 int test_ostream(std::ostream& os, long long x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM___INT64
 #  include <iostream>
 int test_istream(std::istream& is, __int64& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM___INT64
 #  include <iostream>
 int test_ostream(std::ostream& os, __int64 x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_SETENV
 #  include <stdlib.h>
 int main()
 {
   return setenv("A", "B", 1);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UNSETENV
 #  include <stdlib.h>
 int main()
 {
   unsetenv("A");
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
 #  include <stdlib.h>
 int main()
 {
   char* e =3D environ[0];
   return e ? 0 : 1;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_GETLOADAVG
 // Match feature definitions from SystemInformation.cxx
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <stdlib.h>
 int main()
 {
   double loadavg[3] =3D { 0.0, 0.0, 0.0 };
   return getloadavg(loadavg, 3);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_RLIMIT64
 #  include <sys/resource.h>
 int main()
 {
   struct rlimit64 rlim;
   return getrlimit64(0, &rlim);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOLL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atoll(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atol(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS__ATOI64
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(_atoi64(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMES
 #  include <sys/time.h>
 int main()
 {
   struct timeval* current_time =3D 0;
   return utimes("/example", current_time);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT
 #  include <fcntl.h>
 #  include <sys/stat.h>
 #  if defined(__APPLE__)
 #    include <AvailabilityMacros.h>
 #    if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 #      error "utimensat not available on macOS < 10.13"
 #    endif
 #  endif
 int main()
 {
   struct timespec times[2] =3D { { 0, UTIME_OMIT }, { 0, UTIME_NOW } };
   return utimensat(AT_FDCWD, "/example", times, AT_SYMLINK_NOFOLLOW);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BACKTRACE
 #  if defined(__PATHSCALE__) || defined(__PATHCC__) ||                   =
      \
     (defined(__LSB_VERSION__) && (__LSB_VERSION__ < 41))
 backtrace does not work with this compiler or os
 #  endif
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <execinfo.h>
 int main()
 {
   void* stackSymbols[256];
   backtrace(stackSymbols, 256);
   backtrace_symbols(&stackSymbols[0], 1);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_DLADDR
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <dlfcn.h>
 int main()
 {
   Dl_info info;
   int ierr =3D dladdr((void*)main, &info);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_CXXABI
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  if defined(__SUNPRO_CC) && __SUNPRO_CC >=3D 0x5130 && __linux &&      =
        \
     __SUNPRO_CC_COMPAT =3D=3D 'G'
 #    include <iostream>
 #  endif
 #  include <cxxabi.h>
 int main()
 {
   int status =3D 0;
   size_t bufferLen =3D 512;
   char buffer[512] =3D { '\0' };
   const char* function =3D =
 "_ZN5kwsys17SystemInformation15GetProgramStackEii";
   char* demangledFunction =3D
     abi::__cxa_demangle(function, buffer, &bufferLen, &status);
   return status;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
 int main()
 {
   int a =3D 1;
   __asm {
     xor EBX, EBX;
     mov a, EBX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
 int main()
 {
   int a =3D 0;
   __asm {
     xor EAX, EAX;
     cpuid;
     mov a, EAX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_STL_HAS_WSTRING
 #  include <string>
 void f(std::wstring*)
 {
 }
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H
 #  include <ext/stdio_filebuf.h>
 int main()
 {
   return 0;
 }
 #endif
 ------------------------------------------
 Test succeeded
 Try: g++
 Line: g++ -O3 -mcpu=3Dultrasparc3 -mtune=3Dultrasparc3 =
 -D_FORTIFY_SOURCE=3D2 -I/usr/pkg
 /include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=3Dultrasparc3=
  -mtune=3Du
 ltrasparc3          -DTEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H =
 /usr/pkgsrc/devel/cm
 ake/work/cmake-3.15.2/Source/kwsys/kwsysPlatformTestsCXX.cxx -o =
 cmake_bootstrap_2
 6202_test
 ----------  file   -----------------------
 /* Distributed under the OSI-approved BSD 3-Clause License.  See =
 accompanying
    file Copyright.txt or https://cmake.org/licensing#kwsys for details.  =
 */
 #ifdef TEST_KWSYS_CXX_HAS_CSTDIO
 #  include <cstdio>
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_LONG_LONG
 long long f(long long n)
 {
   return n;
 }
 int main()
 {
   long long n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS___INT64
 __int64 f(__int64 n)
 {
   return n;
 }
 int main()
 {
   __int64 n =3D 0;
   return static_cast<int>(f(n));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIM
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtim.tv_sec;
   (void)stat1.st_mtim.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_STAT_HAS_ST_MTIMESPEC
 #  include <sys/types.h>

 #  include <sys/stat.h>
 #  include <unistd.h>
 int main()
 {
   struct stat stat1;
   (void)stat1.st_mtimespec.tv_sec;
   (void)stat1.st_mtimespec.tv_nsec;
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_AND___INT64
 void function(long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
 void function(long long**)
 {
 }
 int main()
 {
   __int64** p =3D 0;
   function(p);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM_LONG_LONG
 #  include <iostream>
 int test_istream(std::istream& is, long long& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM_LONG_LONG
 #  include <iostream>
 int test_ostream(std::ostream& os, long long x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   long long x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_ISTREAM___INT64
 #  include <iostream>
 int test_istream(std::istream& is, __int64& x)
 {
   return (is >> x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_istream(std::cin, x);
 }
 #endif

 #ifdef TEST_KWSYS_IOS_HAS_OSTREAM___INT64
 #  include <iostream>
 int test_ostream(std::ostream& os, __int64 x)
 {
   return (os << x) ? 1 : 0;
 }
 int main()
 {
   __int64 x =3D 0;
   return test_ostream(std::cout, x);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_SETENV
 #  include <stdlib.h>
 int main()
 {
   return setenv("A", "B", 1);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UNSETENV
 #  include <stdlib.h>
 int main()
 {
   unsetenv("A");
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
 #  include <stdlib.h>
 int main()
 {
   char* e =3D environ[0];
   return e ? 0 : 1;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_GETLOADAVG
 // Match feature definitions from SystemInformation.cxx
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <stdlib.h>
 int main()
 {
   double loadavg[3] =3D { 0.0, 0.0, 0.0 };
   return getloadavg(loadavg, 3);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_RLIMIT64
 #  include <sys/resource.h>
 int main()
 {
   struct rlimit64 rlim;
   return getrlimit64(0, &rlim);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOLL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atoll(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_ATOL
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(atol(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS__ATOI64
 #  include <stdlib.h>
 int main()
 {
   const char* str =3D "1024";
   return static_cast<int>(_atoi64(str));
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMES
 #  include <sys/time.h>
 int main()
 {
   struct timeval* current_time =3D 0;
   return utimes("/example", current_time);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT
 #  include <fcntl.h>
 #  include <sys/stat.h>
 #  if defined(__APPLE__)
 #    include <AvailabilityMacros.h>
 #    if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 #      error "utimensat not available on macOS < 10.13"
 #    endif
 #  endif
 int main()
 {
   struct timespec times[2] =3D { { 0, UTIME_OMIT }, { 0, UTIME_NOW } };
   return utimensat(AT_FDCWD, "/example", times, AT_SYMLINK_NOFOLLOW);
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BACKTRACE
 #  if defined(__PATHSCALE__) || defined(__PATHCC__) ||                   =
      \
     (defined(__LSB_VERSION__) && (__LSB_VERSION__ < 41))
 backtrace does not work with this compiler or os
 #  endif
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <execinfo.h>
 int main()
 {
   void* stackSymbols[256];
   backtrace(stackSymbols, 256);
   backtrace_symbols(&stackSymbols[0], 1);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_DLADDR
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  include <dlfcn.h>
 int main()
 {
   Dl_info info;
   int ierr =3D dladdr((void*)main, &info);
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_CXXABI
 #  if (defined(__GNUC__) || defined(__PGI)) && !defined(_GNU_SOURCE)
 #    define _GNU_SOURCE
 #  endif
 #  if defined(__SUNPRO_CC) && __SUNPRO_CC >=3D 0x5130 && __linux &&      =
        \
     __SUNPRO_CC_COMPAT =3D=3D 'G'
 #    include <iostream>
 #  endif
 #  include <cxxabi.h>
 int main()
 {
   int status =3D 0;
   size_t bufferLen =3D 512;
   char buffer[512] =3D { '\0' };
   const char* function =3D =
 "_ZN5kwsys17SystemInformation15GetProgramStackEii";
   char* demangledFunction =3D
     abi::__cxa_demangle(function, buffer, &bufferLen, &status);
   return status;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
 int main()
 {
   int a =3D 1;
   __asm {
     xor EBX, EBX;
     mov a, EBX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
 int main()
 {
   int a =3D 0;
   __asm {
     xor EAX, EAX;
     cpuid;
     mov a, EAX;
   }

   return a;
 }
 #endif

 #ifdef TEST_KWSYS_STL_HAS_WSTRING
 #  include <string>
 void f(std::wstring*)
 {
 }
 int main()
 {
   return 0;
 }
 #endif

 #ifdef TEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H
 #  include <ext/stdio_filebuf.h>
 int main()
 {
   return 0;
 }
 #endif
 ------------------------------------------
 Test succeeded




 > 2019/08/08 16:20=E3=80=81coypu@sdf.org=E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=
 :
 >=20
 > The following reply was made to PR pkg/54355; it has been noted by =
 GNATS.
 >=20
 > From: coypu@sdf.org
 > To: gnats-bugs@netbsd.org
 > Cc:=20
 > Subject: Re: pkg/54355: cmake-3.14.5 fails to build on Solaris 10
 > Date: Thu, 8 Aug 2019 07:16:10 +0000
 >=20
 > Patch against cmake 3.14.5 (pkgsrc-2019Q2, if that's what you are
 > using). I assume you need -D_XOPEN_SOURCE=3D600.
 >=20
 >=20
 > Index: distinfo
 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > RCS file: /cvsroot/pkgsrc/devel/cmake/distinfo,v
 > retrieving revision 1.142
 > diff -u -r1.142 distinfo
 > --- distinfo	1 Jun 2019 20:24:07 -0000	1.142
 > +++ distinfo	8 Aug 2019 07:13:47 -0000
 > @@ -21,4 +21,4 @@
 >  SHA1 (patch-Source_cmAlgorithms.h) =3D =
 c51cc61b1a95c07bd903363d4a04e1430e510516
 >  SHA1 (patch-Source_cm__string__view.hxx) =3D =
 9f2fa518d26dcaebb1e988c8027fb16456e1b80d
 >  SHA1 (patch-Utilities_KWIML_CMakeLists.txt) =3D =
 e4bdf9fc58757e87bf7e3e3e195839eededbc796
 > -SHA1 (patch-bootstrap) =3D 9d99cfe9f9ae826250f94bc297f5a22b8de09e84
 > +SHA1 (patch-bootstrap) =3D 754d379171c2581cfcf2b7243ed7ecfa40f61987
 > Index: patches/patch-bootstrap
 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > RCS file: /cvsroot/pkgsrc/devel/cmake/patches/patch-bootstrap,v
 > retrieving revision 1.2
 > diff -u -r1.2 patch-bootstrap
 > --- patches/patch-bootstrap	14 Dec 2017 22:13:34 -0000	1.2
 > +++ patches/patch-bootstrap	8 Aug 2019 07:13:47 -0000
 > @@ -1,10 +1,11 @@
 >  $NetBSD: patch-bootstrap,v 1.2 2017/12/14 22:13:34 adam Exp $
 >=20
 >  Use external libuv; the one included with cmake makes building fail.
 > +on SunOS, -D_XOPEN_SOURCE=3D600 for SA_NOCLDSTOP used in =
 ProcessUNIX.c:2723
 >=20
 > ---- bootstrap.orig	2017-11-20 15:19:54.000000000 +0000
 > +--- bootstrap.orig	2019-05-31 13:31:27.000000000 +0000
 >  +++ bootstrap
 > -@@ -1305,11 +1306,8 @@ objs=3D""
 > +@@ -1350,11 +1350,8 @@ objs=3D""
 >   for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} =
 ${LexerParser_CXX_SOURCES} ${LexerParser_C_SOURCES} ${KWSYS_CXX_SOURCES} =
 ${KWSYS_C_SOURCES}; do
 >     objs=3D"${objs} ${a}.o"
 >   done
 > @@ -17,7 +18,15 @@
 >=20
 >   uv_c_flags=3D""
 >   if ${cmake_system_mingw}; then
 > -@@ -1419,11 +1417,6 @@ for a in ${KWSYS_CXX_SOURCES}; do
 > +@@ -1384,6 +1381,7 @@ else
 > +       # Normally libuv uses '-D_XOPEN_SOURCE=3D500 -std=3Dc90' on =
 Solaris 5.10,
 > +       # but we do not need to do that because we bootstrap using =
 POSIX APIs.
 > +       uv_c_flags=3D"${uv_c_flags} -D__EXTENSIONS__ =
 -D_XOPEN_SOURCE=3D600"
 > ++      cmake_c_flags=3D"${cmake_c_flags} -D_XOPEN_SOURCE=3D600"
 > +       libs=3D"${libs} -lkstat -lnsl -lsendfile -lsocket -lrt"
 > +       ;;
 > +   esac
 > +@@ -1467,11 +1465,6 @@ for a in ${KWSYS_CXX_SOURCES}; do
 >     echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
 >     echo "	${cmake_cxx_compiler} ${cmake_cxx_flags} =
 -DKWSYS_NAMESPACE=3Dcmsys ${src_flags} -c ${src} -o ${a}.o" >> =
 "${cmake_bootstrap_dir}/Makefile"
 >   done
 >=20

From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54355: cmake-3.14.5 fails to build on Solaris 10
Date: Thu, 8 Aug 2019 13:42:04 +0000

 On Thu, Aug 08, 2019 at 10:04:30PM +0900, Hiroshi Hakoyama wrote:
 >  /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/math.h:93:12:
 >  error: std::nanf' has not been declared

 It looks a lot like the compiler has given up on a lot of C++11 support,
 which this package does require.

 It's possible to temporarily work around it by finding the last cmake
 which didn't require C++11 (2 years ago maybe), but the C++ world loves
 using C++11.

 It might be worth trying if OpenCSW offers newer compiler versions, or
 to discuss it up with them.

 A search on the Internet suggests the following will fail, too:

 #!/bin/sh

 cat << EOF > testc11.cxx
 #include <cmath>
 int main() { return 0; }
 EOF
 g++ -std=gnu++11 testc11.cxx

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.