[MacPorts] #68474: Unable to install cmake on macOS Sonoma

MacPorts noreply at macports.org
Sun Oct 15 10:17:59 UTC 2023


#68474: Unable to install cmake on macOS Sonoma
--------------------------+--------------------
 Reporter:  sacredbanana  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.8.1
 Keywords:                |       Port:  cmake
--------------------------+--------------------
 I have done a clean and then did a fresh install of Macports on my macOS
 Sonoma M1 MacBook Pro.

 When I try to install cmake with Macports
 {{{
 sudo port install cmake
 }}}
 it fails with the error:


 {{{
 Error: Failed to configure cmake: consult
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4-arm64/CMakeFiles/CMakeError.log
 Error: Failed to configure cmake: configure failure: command execution
 failed
 Error: See
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/main.log
 for details.
 Error: Follow https://guide.macports.org/#project.tickets if you believe
 there is a bug.
 }}}

 The log it references says the following:


 {{{
 'Determining if the environ exist failed with the following output:
 Change Dir:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/CMakeFiles/CMakeTmp

 Run Build Command(s):/usr/bin/make -f Makefile cmTC_2d4eb/fast && make  -f
 CMakeFiles/cmTC_2d4eb.dir/build.make CMakeFiles/cmTC_2d4eb.dir/build
 Building C object CMakeFiles/cmTC_2d4eb.dir/CheckSymbolExists.c.o
 /Library/Developer/CommandLineTools/usr/bin/clang   -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64
 -arch arm64 -isysroot
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-
 min=14.0 -std=gnu11 -MD -MT
 CMakeFiles/cmTC_2d4eb.dir/CheckSymbolExists.c.o -MF
 CMakeFiles/cmTC_2d4eb.dir/CheckSymbolExists.c.o.d -o
 CMakeFiles/cmTC_2d4eb.dir/CheckSymbolExists.c.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/CMakeFiles/CMakeTmp/CheckSymbolExists.c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19:
 error: use of undeclared identifier 'environ'
   return ((int*)(&environ))[argc];
                   ^
 1 error generated.
 make[1]: *** [CMakeFiles/cmTC_2d4eb.dir/CheckSymbolExists.c.o] Error 1
 make: *** [cmTC_2d4eb/fast] Error 2


 File
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
 /* */
 #include <stdlib.h>

 int main(int argc, char** argv)
 {
   (void)argv;
 #ifndef environ
   return ((int*)(&environ))[argc];
 #else
   (void)argc;
   return 0;
 #endif
 }
 Checking whether CXX compiler has environ in stdlib.h failed to compile
 with the following output:
 Change Dir:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/CMakeFiles/CMakeTmp

 Run Build Command(s):/usr/bin/make -f Makefile cmTC_e940c/fast && make  -f
 CMakeFiles/cmTC_e940c.dir/build.make CMakeFiles/cmTC_e940c.dir/build
 Building CXX object CMakeFiles/cmTC_e940c.dir/kwsysPlatformTestsCXX.cxx.o
 /Library/Developer/CommandLineTools/usr/bin/clang++
 -DTEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H  -pipe -Os -stdlib=libc++
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64
 -arch arm64 -isysroot
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-
 min=14.0 -std=gnu++17 -MD -MT
 CMakeFiles/cmTC_e940c.dir/kwsysPlatformTestsCXX.cxx.o -MF
 CMakeFiles/cmTC_e940c.dir/kwsysPlatformTestsCXX.cxx.o.d -o
 CMakeFiles/cmTC_e940c.dir/kwsysPlatformTestsCXX.cxx.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx:53:13:
 error: use of undeclared identifier 'environ'
   char* e = environ[0];
             ^
 1 error generated.
 make[1]: *** [CMakeFiles/cmTC_e940c.dir/kwsysPlatformTestsCXX.cxx.o] Error
 1
 make: *** [cmTC_e940c/fast] Error 2



 Checking whether CXX compiler struct stat has st_mtim member failed to
 compile with the following output:
 Change Dir:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/CMakeFiles/CMakeTmp

 Run Build Command(s):/usr/bin/make -f Makefile cmTC_b29f8/fast && make  -f
 CMakeFiles/cmTC_b29f8.dir/build.make CMakeFiles/cmTC_b29f8.dir/build
 Building CXX object CMakeFiles/cmTC_b29f8.dir/kwsysPlatformTestsCXX.cxx.o
 /Library/Developer/CommandLineTools/usr/bin/clang++
 -DTEST_KWSYS_CXX_STAT_HAS_ST_MTIM  -pipe -Os -stdlib=libc++
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64
 -arch arm64 -isysroot
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-
 min=14.0 -std=gnu++17 -MD -MT
 CMakeFiles/cmTC_b29f8.dir/kwsysPlatformTestsCXX.cxx.o -MF
 CMakeFiles/cmTC_b29f8.dir/kwsysPlatformTestsCXX.cxx.o.d -o
 CMakeFiles/cmTC_b29f8.dir/kwsysPlatformTestsCXX.cxx.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx:12:15:
 error: no member named 'st_mtim' in 'stat'
   (void)stat1.st_mtim.tv_sec;
         ~~~~~ ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx:13:15:
 error: no member named 'st_mtim' in 'stat'
   (void)stat1.st_mtim.tv_nsec;
         ~~~~~ ^
 2 errors generated.
 make[1]: *** [CMakeFiles/cmTC_b29f8.dir/kwsysPlatformTestsCXX.cxx.o] Error
 1
 make: *** [cmTC_b29f8/fast] Error 2



 Checking whether CXX compiler has rlimit64 failed to compile with the
 following output:
 Change Dir:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/CMakeFiles/CMakeTmp

 Run Build Command(s):/usr/bin/make -f Makefile cmTC_42105/fast && make  -f
 CMakeFiles/cmTC_42105.dir/build.make CMakeFiles/cmTC_42105.dir/build
 Building CXX object CMakeFiles/cmTC_42105.dir/kwsysPlatformTestsCXX.cxx.o
 /Library/Developer/CommandLineTools/usr/bin/clang++
 -DTEST_KWSYS_CXX_HAS_RLIMIT64  -pipe -Os -stdlib=libc++
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64
 -arch arm64 -isysroot
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-
 min=14.0 -std=gnu++17 -MD -MT
 CMakeFiles/cmTC_42105.dir/kwsysPlatformTestsCXX.cxx.o -MF
 CMakeFiles/cmTC_42105.dir/kwsysPlatformTestsCXX.cxx.o.d -o
 CMakeFiles/cmTC_42105.dir/kwsysPlatformTestsCXX.cxx.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx:75:19:
 error: variable has incomplete type 'struct rlimit64'
   struct rlimit64 rlim;
                   ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx:75:10:
 note: forward declaration of 'rlimit64'
   struct rlimit64 rlim;
          ^
 1 error generated.
 make[1]: *** [CMakeFiles/cmTC_42105.dir/kwsysPlatformTestsCXX.cxx.o] Error
 1
 make: *** [cmTC_42105/fast] Error 2



 Checking whether <ext/stdio_filebuf.h> is available failed to compile with
 the following output:
 Change Dir:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/CMakeFiles/CMakeTmp

 Run Build Command(s):/usr/bin/make -f Makefile cmTC_9e078/fast && make  -f
 CMakeFiles/cmTC_9e078.dir/build.make CMakeFiles/cmTC_9e078.dir/build
 Building CXX object CMakeFiles/cmTC_9e078.dir/kwsysPlatformTestsCXX.cxx.o
 /Library/Developer/CommandLineTools/usr/bin/clang++
 -DTEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H  -pipe -Os -stdlib=libc++
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64
 -arch arm64 -isysroot
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-
 min=14.0 -std=gnu++17 -MD -MT
 CMakeFiles/cmTC_9e078.dir/kwsysPlatformTestsCXX.cxx.o -MF
 CMakeFiles/cmTC_9e078.dir/kwsysPlatformTestsCXX.cxx.o.d -o
 CMakeFiles/cmTC_9e078.dir/kwsysPlatformTestsCXX.cxx.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Source/kwsys/kwsysPlatformTestsCXX.cxx:169:12:
 fatal error: 'ext/stdio_filebuf.h' file not found
 #  include <ext/stdio_filebuf.h>
            ^~~~~~~~~~~~~~~~~~~~~
 1 error generated.
 make[1]: *** [CMakeFiles/cmTC_9e078.dir/kwsysPlatformTestsCXX.cxx.o] Error
 1
 make: *** [cmTC_9e078/fast] Error 2



 Looking for a Fortran compiler failed with the following output:
 sh: /bin/ps: Operation not permitted
 sh: /bin/ps: Operation not permitted
 sh: /bin/ps: Operation not permitted
 sh: /bin/ps: Operation not permitted
 sh: /bin/ps: Operation not permitted
 sh: /bin/ps: Operation not permitted
 sh: /bin/ps: Operation not permitted
 sh: /bin/ps: Operation not permitted
 -- The Fortran compiler identification is unknown
 sh: /bin/ps: Operation not permitted
 CMake Error at CMakeLists.txt:2 (project):
   No CMAKE_Fortran_COMPILER could be found.

   Tell CMake where to find the compiler by setting either the environment
   variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the
 full
   path to the compiler, or to the compiler name if it is in the PATH.


 -- Configuring incomplete, errors occurred!
 See also
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Tests/CMakeFiles/CheckFortran/CMakeFiles/CMakeOutput.log".
 See also
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.24.4/Tests/CMakeFiles/CheckFortran/CMakeFiles/CMakeError.log".
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/68474>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list