[MacPorts] #69812: cmake-bootstrap @3.9.6 does not compile under rosetta2

MacPorts noreply at macports.org
Wed Apr 24 08:53:47 UTC 2024


#69812: cmake-bootstrap @3.9.6 does not compile under rosetta2
------------------------------+--------------------
  Reporter:  lukaso           |      Owner:  (none)
      Type:  defect           |     Status:  new
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:
Resolution:                   |   Keywords:
      Port:  cmake-bootstrap  |
------------------------------+--------------------

Comment (by lukaso):

 I've run this in an x86_64 terminal window which I created using `arch
 -x86_64 /bin/zsh`. So yes, this is an Arm64 machine.

 This is line 677:
 {{{
   "${COMPILER}" ${FLAGS} "${TESTFILE}" -o "${TMPFILE}"
 }}}

 in this function:

 {{{
 cmake_try_run ()
 {
   COMPILER=$1
   FLAGS=$2
   TESTFILE=$3
   if [ ! -f "${TESTFILE}" ]; then
     echo "Test file ${TESTFILE} missing. Please verify your CMake source
 tree."
     exit 4
   fi
   TMPFILE=`cmake_tmp_file`
   echo "Try: ${COMPILER}"
   echo "Line: ${COMPILER} ${FLAGS} ${TESTFILE} -o ${TMPFILE}"
   echo "----------  file   -----------------------"
   cat "${TESTFILE}"
   echo "------------------------------------------"
   "${COMPILER}" ${FLAGS} "${TESTFILE}" -o "${TMPFILE}"
   RES=$?
   if [ "${RES}" -ne "0" ]; then
     echo "Test failed to compile"
     return 1
   fi
   if [ ! -f "${TMPFILE}" ] && [ ! -f "${TMPFILE}.exe" ]; then
     echo "Test failed to produce executable"
     return 2
   fi
   ./${TMPFILE}
   RES=$?
   rm -f "${TMPFILE}"
   if [ "${RES}" -ne "0" ]; then
     echo "Test produced non-zero return code"
     return 3
   fi
   echo "Test succeeded"
   return 0
 }
 }}}

 I also checked the compiler line it claimed it couldn't run, and it
 worked:
 {{{
 /usr/bin/clang -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch
 x86_64 -std=gnu11
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/69812#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list