Opened 14 months ago

Closed 13 months ago

Last modified 12 months ago

#71621 closed defect (fixed)

cmake @3.31.2 does not configure on PPC Mac OS X 10.4.11, Tiger, because of CPU_TYPE_ARM vs. CPU_TYPE_ANY

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.10.5
Keywords: tiger ppc Cc: michaelld (Michael Dickens), fhgwright (Fred Wright)
Port: cmake

Description

/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.31.2/Source/cmMachO.cxx: In member function 'cmMachO::StringList cmMachO::GetArchitectures() const':
/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.31.2/Source/cmMachO.cxx:389:56: error: 'CPU_TYPE_ARM' was not declared in this scope; did you mean 'CPU_TYPE_ANY'?
  389 |         const NXArchInfo* archInfo = (header.CpuType & CPU_TYPE_ARM)
      |                                                        ^~~~~~~~~~~~
      |                                                        CPU_TYPE_ANY
gmake: *** [Makefile:490: cmMachO.o] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running gmake
---------------------------------------------
Log of errors: /opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.31.2/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
Command failed:  cd "/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.31.2" && ./bootstrap --prefix=/opt/local --docdir=share/doc/cmake --parallel=1 --init=/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.31.2/macports.cmake --system-libs --no-qt-gui --no-system-jsoncpp --no-system-librhash --no-system-libuv --no-system-cppdap -- 
Exit code: 9
Error: Failed to configure cmake: configure failure: command execution failed

Attachments (1)

main.log (306.5 KB) - added by ballapete (Peter "Pete" Dyballa) 14 months ago.
Main.log from PPC Tiger, Mac OS X 10.4.11

Download all attachments as: .zip

Change History (13)

Changed 14 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger, Mac OS X 10.4.11

comment:1 Changed 14 months ago by kencu (Ken)

needs a 10-second patch to define CPU_TYPE_ARM to 12 in that one file, Source/cmMachO.cxx

I just didn’t get to it, so perhaps you could do it

cmake-devel will need it too, probably

Last edited 14 months ago by kencu (Ken) (previous) (diff)

comment:2 Changed 14 months ago by ballapete (Peter "Pete" Dyballa)

With this little change "CMake has bootstrapped."

comment:3 Changed 14 months ago by ballapete (Peter "Pete" Dyballa)

The new compiler needs some practise to get slimmer and work faster.

comment:4 Changed 14 months ago by ballapete (Peter "Pete" Dyballa)

CMake built, JPEG-Turbo built too.

comment:5 Changed 13 months ago by mascguy (Christopher Nielsen)

Cc: michaelld fhgwright added; michaelld@… mascguy@… removed
Owner: set to mascguy
Status: newassigned

Has duplicate #71888

comment:6 Changed 13 months ago by fhgwright (Fred Wright)

Defining it in legacy-support would make sense, since for some unfathomable reason Apple explicitly chose not to define it for 10.4:

MacPro:SDKs fw$ grep -rInw CPU_TYPE_ARM MacOSX10.?.sdk/usr/include 2>/dev/null
MacOSX10.4.sdk/usr/include/mach/machine.h:100:/* skip CPU_TYPE_ARM		((cpu_type_t) 12)	*/
MacOSX10.5.sdk/usr/include/mach/machine.h:106:#define CPU_TYPE_ARM		((cpu_type_t) 12)
MacOSX10.6.sdk/usr/include/mach/machine.h:106:#define CPU_TYPE_ARM		((cpu_type_t) 12)
MacOSX10.7.sdk/usr/include/mach/machine.h:106:#define CPU_TYPE_ARM		((cpu_type_t) 12)
MacOSX10.8.sdk/usr/include/mach/machine.h:108:#define CPU_TYPE_ARM		((cpu_type_t) 12)
MacOSX10.9.sdk/usr/include/mach/machine.h:108:#define CPU_TYPE_ARM		((cpu_type_t) 12)

comment:7 Changed 13 months ago by fhgwright (Fred Wright)

I've made a fix (and test) for it. I'll submit a PR once I've tested it.

I guess I'll hold off on the -devel update to include this.

comment:8 Changed 13 months ago by fhgwright (Fred Wright)

Resolution: fixed
Status: assignedclosed

In 0225751b9e949e03e1e29eaa71bbf291b335d714/macports-legacy-support (master):

Add CPU_TYPE_ARM (for 10.4)

Closes: #71621

TESTED:
Passes new test on all OS versions.

comment:9 Changed 13 months ago by fhgwright (Fred Wright)

In e5cdc7ae6e22afebb2a5df15e7588dfdc2662fd9/macports-ports (master):

legacy-support-devel: Update to latest master.

Notable changes since last -devel version:

  • Fixes 10.4 Rosetta bug in fstatx_np()
  • Makes renameat() available via stdio.h See: #71842
  • Implements interim clock_gettime_nsec_np() See: #61691
  • Implements clock_settime() See: #71399
  • Adds net/if_tun.h for <10.6 See: #70231
  • Provides pthread_[f]chdir_np() for 10.5+ See: #71265
  • Adds CPU_TYPE_ARM definition for 10.4 See: #71621

Also adds Portfile comments regarding suggested github.tarball_from
change.

Also, the prior addition of vdprintf() in v20241026 neglected to close
the related tickets:

Closes: #67598
Closes: #70118

TESTED:
Tested both normal and -devel versions -/+universal on 10.4-10.5 ppc,
10.5-10.6 ppc (i386 Rosetta), 10.4-10.6 i386, 10.4-12.x x86_64, and
11.x-15.x arm64.
Builds and passes all tests on all tested platforms.

comment:10 Changed 12 months ago by glebm (Gleb Mazovetskiy)

Could you please update legacy-support (non-devel) to the latest version as well?

comment:11 in reply to:  10 Changed 12 months ago by fhgwright (Fred Wright)

Replying to glebm:

Could you please update legacy-support (non-devel) to the latest version as well?

Funny you should mention that today. :-) See the discussion in https://github.com/macports/macports-legacy-support/pull/110.

comment:12 Changed 12 months ago by fhgwright (Fred Wright)

In a784d15ced04e75724ee259cec1f7a3d1ab696d3/macports-ports (master):

legacy-support: update to v1.4.0.

Notable changes since v1.3.0:

  • Works around Apple's broken versioning in the macOS 15 SDK
  • Implements scandir() compatibility feature
  • Fixes dprintf() bug and implements vdprintf() See: #67598 See: #70118
  • Mismatched SDK compatibility is extended to include 15.x SDK.
  • Broken 10.4 CLOCK_MONOTONIC is fixed.
  • Fixes stat inconsistency in some 32-bit 10.4 builds.
  • Adds stat64 header support for 10.4 SDK.
  • Adds INODE64 support for *stat*() on 10.4.
  • Reworks fstatat*() support, similar to previous item, fixing buffer overrun in some cases.
  • Backports 10.5 'which' to 10.4.
  • Adds support for code that can't tolerate the normal scandir() compatibility feature.
  • Replaces broken 10.4/10.5 copyfile wrapper with full 10.6 copyfile.
  • Extends 10.4 INODE64 support to *statx_np() functions.
  • Expands TARGET_* defaults. See: #70824
  • Fixes 10.4 Rosetta bug in fstatx_np()
  • Makes renameat() available via stdio.h See: #71842
  • Implements interim clock_gettime_nsec_np() See: #61691
  • Implements clock_settime() See: #71399
  • Adds net/if_tun.h for <10.6 See: #70231
  • Provides pthread_[f]chdir_np() for 10.5+ See: #71265
  • Adds CPU_TYPE_ARM definition for 10.4 See: #71621

TESTED:
Tested both normal and -devel versions -/+universal on 10.4-10.5 ppc,
10.5-10.6 ppc (i386 Rosetta), 10.4-10.6 i386, 10.4-12.x x86_64, and
11.x-15.x arm64.
Builds and passes all tests on all tested platforms.

Note: See TracTickets for help on using tickets.