tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lang/gcc12 on mac



On 5/26/24 12:23, Adam wrote:
Not on...

Darwin tarpon.acadix.biz 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15
00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103 arm64

Output attached.

It won't build with Xcode 15.3 or newer, which have a newer libc++. You can go back to Xcode 15.2 or apply attached patches, based on:

https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631611.html
https://gcc.gnu.org/pipermail/gcc-patches/2024-March/647394.html

Kind regards,
Adam

Thanks, these seem to work fine on my M1.  Is there a reason they
haven't been committed?  Is there any concern about them affecting other
platforms?  Or just allowing time for testing?

For me, with these patches applied, the build fails with GCC on NetBSD. :/

Adam

There does not appear to be a way to check the Xcode / CL tools version
via a preprocessor macro, so I'm proposing the following addition to
platform/Darwin.mk to make it available as a make variable during pkgsrc
builds:

--- platform/Darwin.mk  29 Apr 2024 13:57:55 -0000      1.140
+++ platform/Darwin.mk  23 Jun 2024 12:18:31 -0000
@@ -90,6 +90,10 @@

 _OPSYS_SYSTEM_RPATH?=  /usr/lib

+.if !defined(CLTOOLS_VERSION)
+CLTOOLS_VERSION!=      pkgutil
--pkg-info=com.apple.pkg.CLTools_Executables | awk '$$1 == "version:" {
print $2 }'
+.endif
+
 .if !defined(OSX_VERSION)
 OSX_VERSION!=          sw_vers -productVersion
 .  if "${OSX_VERSION:R:R}" != "${OSX_VERSION:R}"

We can then use this in a variety of ways for conditional patching based
on the Xcode version.

Example output:

# pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 15.3.0.0.1.1708646388
volume: /
location: /
install-time: 1712319764

# pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | awk '$1 ==
"version:" { print $2 }'
15.3.0.0.1.1708646388

Please let me know if you have any suggestions.

--
Life is a game.  Play hard.  Play fair.  Have fun.



Home | Main Index | Thread Index | Old Index