pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/54355: cmake-3.14.5 fails to build on Solaris 10
I got following errors:
g++ -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 -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.log
---------------------------------------------
*** 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.log
Checking whether 'gcc -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=
2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include ' works.
Try: gcc
Line: gcc -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=2 -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 != 0), (char)0x0a);
return argc - 1;
}
------------------------------------------
1
Test succeeded
Checking whether 'gcc -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=
2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include ' works.
Try: gcc
Line: gcc -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=2 -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 != 0), (char)0x0a);
return argc - 1;
}
------------------------------------------
1
Test succeeded
Checking whether 'gcc -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=
2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include ' works.
Try: gcc
Line: gcc -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=2 -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 != 0), (char)0x0a);
return argc - 1;
}
------------------------------------------
1
Test succeeded
Checking whether 'g++ -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=
2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=ultraspa
rc3 -mtune=ultrasparc3 ' works.
Try: g++
Line: g++ -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=u
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 <= 5.13 mode not supported due to bug in move semantics."
#endif
class Class
{
public:
int Get() const { return this->Member; }
private:
int Member = 1;
};
int main()
{
auto const c = std::unique_ptr<Class>(new Class);
std::cout << c->Get() << std::endl;
return 0;
}
------------------------------------------
1
Test succeeded
Checking whether 'g++ -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=
2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=ultraspa
rc3 -mtune=ultrasparc3 ' works.
Try: g++
Line: g++ -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=u
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 <= 5.13 mode not supported due to bug in move semantics."
#endif
class Class
{
public:
int Get() const { return this->Member; }
private:
int Member = 1;
};
int main()
{
auto const c = std::unique_ptr<Class>(new Class);
std::cout << c->Get() << std::endl;
return 0;
}
------------------------------------------
1
Test succeeded)
Checking whether 'g++ -O3 -mcpu=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=
2 -I/usr/pkg/include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=ultraspa
rc3 -mtune=ultrasparc3 ' works.
Try: g++
Line: g++ -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=u
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 <= 5.13 mode not supported due to bug in move semantics."
#endif
class Class
{
public:
int Get() const { return this->Member; }
private:
int Member = 1;
};
int main()
{
auto const c = 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=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=2 -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=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=2 -I/usr/pkg
/include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=ultrasparc3 -mtune=u
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 = 0;
return static_cast<int>(f(n));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS___INT64
__int64 f(__int64 n)
{
return n;
}
int main()
{
__int64 n = 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 = 0;
function(p);
return 0;
}
#endif
#ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
void function(long long**)
{
}
int main()
{
__int64** p = 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 = 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 = 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 = 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 = 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 = 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] = { 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 = "1024";
return static_cast<int>(atoll(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_ATOL
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(atol(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS__ATOI64
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(_atoi64(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_UTIMES
# include <sys/time.h>
int main()
{
struct timeval* current_time = 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] = { { 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 = 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 >= 0x5130 && __linux && \
__SUNPRO_CC_COMPAT == 'G'
# include <iostream>
# endif
# include <cxxabi.h>
int main()
{
int status = 0;
size_t bufferLen = 512;
char buffer[512] = { '\0' };
const char* function = "_ZN5kwsys17SystemInformation15GetProgramStackEii";
char* demangledFunction =
abi::__cxa_demangle(function, buffer, &bufferLen, &status);
return status;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
int main()
{
int a = 1;
__asm {
xor EBX, EBX;
mov a, EBX;
}
return a;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
int main()
{
int a = 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=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=2 -I/usr/pkg
/include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=ultrasparc3 -mtune=u
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 = 0;
return static_cast<int>(f(n));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS___INT64
__int64 f(__int64 n)
{
return n;
}
int main()
{
__int64 n = 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 = 0;
function(p);
return 0;
}
#endif
#ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
void function(long long**)
{
}
int main()
{
__int64** p = 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 = 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 = 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 = 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 = 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 = 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] = { 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 = "1024";
return static_cast<int>(atoll(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_ATOL
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(atol(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS__ATOI64
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(_atoi64(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_UTIMES
# include <sys/time.h>
int main()
{
struct timeval* current_time = 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] = { { 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 = 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 >= 0x5130 && __linux && \
__SUNPRO_CC_COMPAT == 'G'
# include <iostream>
# endif
# include <cxxabi.h>
int main()
{
int status = 0;
size_t bufferLen = 512;
char buffer[512] = { '\0' };
const char* function = "_ZN5kwsys17SystemInformation15GetProgramStackEii";
char* demangledFunction =
abi::__cxa_demangle(function, buffer, &bufferLen, &status);
return status;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
int main()
{
int a = 1;
__asm {
xor EBX, EBX;
mov a, EBX;
}
return a;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
int main()
{
int a = 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=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=2 -I/usr/pkg
/include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=ultrasparc3 -mtune=u
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 = 0;
return static_cast<int>(f(n));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS___INT64
__int64 f(__int64 n)
{
return n;
}
int main()
{
__int64 n = 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 = 0;
function(p);
return 0;
}
#endif
#ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
void function(long long**)
{
}
int main()
{
__int64** p = 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 = 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 = 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 = 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 = 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 = 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] = { 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 = "1024";
return static_cast<int>(atoll(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_ATOL
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(atol(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS__ATOI64
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(_atoi64(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_UTIMES
# include <sys/time.h>
int main()
{
struct timeval* current_time = 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] = { { 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 = 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 >= 0x5130 && __linux && \
__SUNPRO_CC_COMPAT == 'G'
# include <iostream>
# endif
# include <cxxabi.h>
int main()
{
int status = 0;
size_t bufferLen = 512;
char buffer[512] = { '\0' };
const char* function = "_ZN5kwsys17SystemInformation15GetProgramStackEii";
char* demangledFunction =
abi::__cxa_demangle(function, buffer, &bufferLen, &status);
return status;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
int main()
{
int a = 1;
__asm {
xor EBX, EBX;
mov a, EBX;
}
return a;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
int main()
{
int a = 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/kwsysPlatformTestsCXX.cxx:
In function 'int main()':
/usr/pkgsrc/devel/cmake/work/cmake-3.15.2/Source/kwsys/kwsysPlatformTestsCXX.cxx:
160:13: error: 'environ' was not declared in this scope
char* e = environ[0];
^
Test failed to compile
Try: g++
Line: g++ -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=u
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 = 0;
return static_cast<int>(f(n));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS___INT64
__int64 f(__int64 n)
{
return n;
}
int main()
{
__int64 n = 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 = 0;
function(p);
return 0;
}
#endif
#ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
void function(long long**)
{
}
int main()
{
__int64** p = 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 = 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 = 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 = 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 = 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 = 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] = { 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 = "1024";
return static_cast<int>(atoll(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_ATOL
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(atol(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS__ATOI64
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(_atoi64(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_UTIMES
# include <sys/time.h>
int main()
{
struct timeval* current_time = 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] = { { 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 = 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 >= 0x5130 && __linux && \
__SUNPRO_CC_COMPAT == 'G'
# include <iostream>
# endif
# include <cxxabi.h>
int main()
{
int status = 0;
size_t bufferLen = 512;
char buffer[512] = { '\0' };
const char* function = "_ZN5kwsys17SystemInformation15GetProgramStackEii";
char* demangledFunction =
abi::__cxa_demangle(function, buffer, &bufferLen, &status);
return status;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
int main()
{
int a = 1;
__asm {
xor EBX, EBX;
mov a, EBX;
}
return a;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
int main()
{
int a = 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=ultrasparc3 -mtune=ultrasparc3 -D_FORTIFY_SOURCE=2 -I/usr/pkg
/include -I/usr/pkg/include/ncurses -I/usr/include -O3 -mcpu=ultrasparc3 -mtune=u
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 = 0;
return static_cast<int>(f(n));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS___INT64
__int64 f(__int64 n)
{
return n;
}
int main()
{
__int64 n = 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 = 0;
function(p);
return 0;
}
#endif
#ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64
void function(long long**)
{
}
int main()
{
__int64** p = 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 = 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 = 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 = 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 = 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 = 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] = { 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 = "1024";
return static_cast<int>(atoll(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_ATOL
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(atol(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS__ATOI64
# include <stdlib.h>
int main()
{
const char* str = "1024";
return static_cast<int>(_atoi64(str));
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_UTIMES
# include <sys/time.h>
int main()
{
struct timeval* current_time = 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] = { { 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 = 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 >= 0x5130 && __linux && \
__SUNPRO_CC_COMPAT == 'G'
# include <iostream>
# endif
# include <cxxabi.h>
int main()
{
int status = 0;
size_t bufferLen = 512;
char buffer[512] = { '\0' };
const char* function = "_ZN5kwsys17SystemInformation15GetProgramStackEii";
char* demangledFunction =
abi::__cxa_demangle(function, buffer, &bufferLen, &status);
return status;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM
int main()
{
int a = 1;
__asm {
xor EBX, EBX;
mov a, EBX;
}
return a;
}
#endif
#ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM_CPUID
int main()
{
int a = 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、coypu%sdf.org@localhostのメール:
>
> The following reply was made to PR pkg/54355; it has been noted by GNATS.
>
> From: coypu%sdf.org@localhost
> To: gnats-bugs%netbsd.org@localhost
> 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
>
Home |
Main Index |
Thread Index |
Old Index