From unknown Wed Jun 18 23:16:05 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#37483 <37483@debbugs.gnu.org> To: bug#37483 <37483@debbugs.gnu.org> Subject: Status: [PATCH] macOS build error (aligned_alloc) Reply-To: bug#37483 <37483@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:16:05 +0000 retitle 37483 [PATCH] macOS build error (aligned_alloc) reassign 37483 emacs submitter 37483 Mattias Engdeg=C3=A5rd severity 37483 normal tag 37483 notabug patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 22 13:26:00 2019 Received: (at submit) by debbugs.gnu.org; 22 Sep 2019 17:26:00 +0000 Received: from localhost ([127.0.0.1]:34464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC5cV-0006kR-Ti for submit@debbugs.gnu.org; Sun, 22 Sep 2019 13:26:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:54262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC5cU-0006kJ-7m for submit@debbugs.gnu.org; Sun, 22 Sep 2019 13:25:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC5cT-0002er-49 for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 13:25:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iC5cR-0004IR-Rw for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 13:25:56 -0400 Received: from mail177c50.megamailservers.eu ([91.136.10.187]:41318 helo=mail51c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iC5cR-00045a-9L for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 13:25:55 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1569173151; bh=xXzyaPb7UER1HnvklAgOAjwavSIZmktcxxAXDATagFE=; h=From:Subject:Date:To:From; b=auIj2lTAThhVVfTpgguktsr0Fsufaa7unghtAejYFh5ePa3SzbTRRKLEQszvbT4rN wc1hztVhq5XGb89fcEMCh2FC8TnSOxiPp89boHwap15yOwBBT7Kpi3aNXUYYarTJhu LJ8O3++ab0pBsQZk1ZW92eTb7AwUsESh9/AFNp1Q= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] ([188.150.171.71]) (authenticated bits=0) by mail51c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x8MHPo2V002033 for ; Sun, 22 Sep 2019 17:25:51 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="Apple-Mail=_AA071EEA-5635-4B68-A9A6-708FDAC20B6B" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: [PATCH] macOS build error (aligned_alloc) Message-Id: <6CB9FE84-5DF1-458C-B6A9-6C10DDADF601@acm.org> Date: Sun, 22 Sep 2019 19:25:49 +0200 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0207.5D87AE9F.0035, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=GNR27dFK c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=IVnU1KnFDFHgcnO52VYA:9 a=CjuIK1q_8ugA:10 a=4lcGVWqOKnyg1ljerY4A:9 a=B2y7HmGcmWMA:10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 91.136.10.187 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_AA071EEA-5635-4B68-A9A6-708FDAC20B6B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii After upgrading the macOS system dev tools, building Emacs fails because = aligned_alloc is present in the system headers and can be linked with = but isn't actually in the dynamic library (macOS 10.14, Xcode 11). This means that the configure check for that function needs to be = strengthened a bit. Proposed patch attached; please say if it breaks on = a different platform. I'm not the greatest fan of autoconf, and am = likely to have made mistakes. --Apple-Mail=_AA071EEA-5635-4B68-A9A6-708FDAC20B6B Content-Disposition: attachment; filename=0001-More-thorough-check-for-aligned_alloc-on-macOS.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-More-thorough-check-for-aligned_alloc-on-macOS.patch" Content-Transfer-Encoding: quoted-printable =46rom=20491b19f50014cf03a7cc9085568a10bbefed1812=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Sun,=2022=20Sep=202019=2019:01:52=20+0200=0A= Subject:=20[PATCH]=20More=20thorough=20check=20for=20aligned_alloc=20on=20= macOS=0AMIME-Version:=201.0=0AContent-Type:=20text/plain;=20= charset=3DUTF-8=0AContent-Transfer-Encoding:=208bit=0A=0A*=20= configure.ac=20(HAVE_ALIGNED_ALLOC):=20Use=20a=20executing=20check=20for=0A= aligned_alloc=20on=20macOS,=20since=20while=20that=20function=20is=20= only=20available=20in=0Aversion=20=E2=89=A510.15,=20it=20may=20be=20= present=20in=20the=20system=20headers=20and=20could=20be=0Alinked=20with=20= in=20earlier=20versions.=0A---=0A=20configure.ac=20|=2021=20= ++++++++++++++++++++-=0A=201=20file=20changed,=2020=20insertions(+),=201=20= deletion(-)=0A=0Adiff=20--git=20a/configure.ac=20b/configure.ac=0Aindex=20= e822b0b7b0..dfc7bdb883=20100644=0A---=20a/configure.ac=0A+++=20= b/configure.ac=0A@@=20-4179,8=20+4179,27=20@@=20AC_DEFUN=0A=20cfmakeraw=20= cfsetspeed=20__executable_start=20log2=20prctl)=0A=20LIBS=3D$OLD_LIBS=0A=20= =0A+if=20test=20"${opsys}"=20=3D=20darwin;=20then=0A+=20=20dnl=20= aligned_alloc=20is=20available=20in=20macOS=2010.15=20and=20later,=20but=20= may=20be=0A+=20=20dnl=20visible=20(but=20not=20functional)=20before=20= that,=20and=20there=20is=20no=0A+=20=20dnl=20telling=20without=20= actually=20running=20a=20test.=0A+=20=20AC_CACHE_CHECK([for=20= aligned_alloc],=20[ac_cv_func_aligned_alloc],=0A+=20=20=20=20= [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include=20]],=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20[[return=20!aligned_alloc=20(1,=201);]])],=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= [ac_cv_func_aligned_alloc=3Dyes],=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20[ac_cv_func_aligned_alloc=3Dno],=20[])])=0A+=20=20= if=20test=20$ac_cv_func_aligned_alloc=20=3D=20yes;=20then=0A+=20=20=20=20= AC_DEFINE([HAVE_ALIGNED_ALLOC],=201,=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20[Define=20to=201=20if=20you=20have=20the=20'aligned_alloc'=20= function.])=0A+=20=20fi=0A+else=0A+=20=20AC_CHECK_FUNCS([aligned_alloc])=0A= +fi=0A+=0A=20dnl=20No=20need=20to=20check=20for=20posix_memalign=20if=20= aligned_alloc=20works.=0A-AC_CHECK_FUNCS([aligned_alloc=20= posix_memalign],=20[break])=0A+if=20test=20"$ac_cv_func_aligned_alloc"=20= !=3D=20yes;=20then=0A+=20=20AC_CHECK_FUNCS([posix_memalign])=0A+fi=0A=20= AC_CHECK_DECLS([aligned_alloc],=20[],=20[],=20[[#include=20]])=0A= =20=0A=20#=20Dump=20loading=0A--=20=0A2.21.0=20(Apple=20Git-122)=0A=0A= --Apple-Mail=_AA071EEA-5635-4B68-A9A6-708FDAC20B6B-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 22 16:14:22 2019 Received: (at 37483) by debbugs.gnu.org; 22 Sep 2019 20:14:22 +0000 Received: from localhost ([127.0.0.1]:34550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC8FS-0004qm-LU for submit@debbugs.gnu.org; Sun, 22 Sep 2019 16:14:22 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:62630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC8FP-0004qZ-3T for 37483@debbugs.gnu.org; Sun, 22 Sep 2019 16:14:19 -0400 Received: from weber.math.s.chiba-u.ac.jp (weber [192.168.32.4]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 06023F08D5; Mon, 23 Sep 2019 05:14:15 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Received: from 218.43.9.40 (SquirrelMail authenticated user mituharu) by weber.math.s.chiba-u.ac.jp with HTTP; Mon, 23 Sep 2019 05:14:15 +0900 Message-ID: In-Reply-To: <6CB9FE84-5DF1-458C-B6A9-6C10DDADF601@acm.org> References: <6CB9FE84-5DF1-458C-B6A9-6C10DDADF601@acm.org> Date: Mon, 23 Sep 2019 05:14:15 +0900 Subject: Re: bug#37483: [PATCH] macOS build error (aligned_alloc) From: mituharu@math.s.chiba-u.ac.jp To: =?iso-2022-jp?B?Ik1hdHRpYXMgRW5nZGVnP3JkIg==?= User-Agent: SquirrelMail/1.4.22-5.el6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-2022-jp Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37483 Cc: 37483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > After upgrading the macOS system dev tools, building Emacs fails because > aligned_alloc is present in the system headers and can be linked with but > isn't actually in the dynamic library (macOS 10.14, Xcode 11). You would need to install the Command Line Developer Tools with "xcode-select --install". In general this is necessary when the macOS version is older than the newest one Xcode supports. In the case of Xcode 11, it is macOS 10.15. Actually you don't need Xcode for building Emacs, but the Command Line Developer Tools would be sufficient. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 23 05:15:11 2019 Received: (at 37483) by debbugs.gnu.org; 23 Sep 2019 09:15:11 +0000 Received: from localhost ([127.0.0.1]:35049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCKR4-0004GV-QU for submit@debbugs.gnu.org; Mon, 23 Sep 2019 05:15:11 -0400 Received: from mail1423c50.megamailservers.eu ([91.136.14.23]:36172 helo=mail102c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCKR1-0004Fb-N6 for 37483@debbugs.gnu.org; Mon, 23 Sep 2019 05:15:09 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1569230099; bh=IVj7/r7oFyGA7y9VcQ4ywKpzctNCKs/GeYON8cbFY1E=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=D4U3cLvIMwhTQJj++4WCbSUonxowj2LtRKifESurmyiy/ja5J5dPFusKjClScXi6n 4ItxE2LpsrW6CN/taa1qxIr/vDHzxhvd6AmcR7pogPzjIG95ClMSf93BzpbEqpden8 lBqwZs5jlN/4TM8AsvniPNBNfpn3HlnCUH0/MUN0= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] ([188.150.171.71]) (authenticated bits=0) by mail102c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x8N9EuHL006733; Mon, 23 Sep 2019 09:14:58 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37483: [PATCH] macOS build error (aligned_alloc) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= X-Priority: 3 (Normal) In-Reply-To: Date: Mon, 23 Sep 2019 11:14:55 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <6CB9FE84-5DF1-458C-B6A9-6C10DDADF601@acm.org> To: mituharu@math.s.chiba-u.ac.jp X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0207.5D888D13.0042, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=AZbP4EfG c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=QT_bpaqbkX1pEpTLDqoA:9 a=CjuIK1q_8ugA:10 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37483 Cc: 37483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 22 sep. 2019 kl. 22.14 skrev mituharu@math.s.chiba-u.ac.jp: >=20 > You would need to install the Command Line Developer Tools with > "xcode-select --install". In general this is necessary when the > macOS version is older than the newest one Xcode supports. In > the case of Xcode 11, it is macOS 10.15. >=20 > Actually you don't need Xcode for building Emacs, but the Command > Line Developer Tools would be sufficient. Thank you, this is useful to know. Even so, doesn't it make sense to make the configure script work with = tools that support newer OS versions? After all, we are not talking = about cross-tools or tools that can only generate code for newer = versions. If I want to use the most recent toolchain for my OS, these = (Xcode 11) tools are the ones to use. I first tried some other workarounds: configuring with = -Werror=3Dunguarded-availability-new in CFLAGS will prevent = HAVE_DECL_ALIGNED_ALLOC from being defined, but HAVE_ALIGNED_ALLOC is = not affected because its config check doesn't include the standard = header (by design). From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 23 14:37:25 2019 Received: (at 37483) by debbugs.gnu.org; 23 Sep 2019 18:37:25 +0000 Received: from localhost ([127.0.0.1]:37090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCTDA-0008Oq-62 for submit@debbugs.gnu.org; Mon, 23 Sep 2019 14:37:24 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:38634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCTD7-0008Oc-Cl for 37483@debbugs.gnu.org; Mon, 23 Sep 2019 14:37:22 -0400 Received: by mail-wr1-f45.google.com with SMTP id l11so15118555wrx.5 for <37483@debbugs.gnu.org>; Mon, 23 Sep 2019 11:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=UwTTrFylGaKvLMx0QA7IsB6swVtaD4/eVHvvP1UNtcg=; b=NudirFLZzckZPdv+VnT4uHDzUEQr970wdUaEVtORgMD9dN3wN4Uegw2WSTz+TjkMOY nk8mRl0WsFxm5Xa/69t5lj5Nm1C6ZX9ESgbotST48BLz/U9SVVbGPYE9V9J7enjIXswc b0JxLrTCTgLZ73nWArXsPe3HpPFPZXAnHR9dvTFvZezxczauSMYcrNoZ3VYzD0xCH1UL qp1kIDXQIbdBkq+szunAXu2l6LDNEDHyFALmMoMRwRS+/NgoMbC6BscWtYUYBC/VOoXQ h55PtoJXBp1OYg/ZNsMzY27vpiUIcbuU4nDG5pAWHFWbkeCH3Ey0V9PmYRB5ZvyVSWqe XIqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=UwTTrFylGaKvLMx0QA7IsB6swVtaD4/eVHvvP1UNtcg=; b=eNk6YkiIh9V/J1mYP2q5amkkI7gEbKKHI9LsN7BV+n3ywgBN1yp4aO5nFkxkZeETYJ iMl/o7OC1syn6Ii+DSeumira6obEt+pbAt5q0E0jBc+k/i8Zb885vL2ygM1PahiG4vbi JPjTmrtglqtAMYkV6NnI6dEP5ucRLTT1iLXsZIG0ll1rMaGGdHDc00tRA9RDtC9jbRfL vLc7SSGYc7wdPJYA5PswGsqQ3VP/bjKsi8WScckGhrznfOWgTJsGKzrIlC1HQ8wbI6Nn n7XVRotAHicj3V5chG8n9NiWqje4Eq920VSsEmERVBvvUBBxmjob4jPUyHSXsEZW/QDo vLPQ== X-Gm-Message-State: APjAAAVBYmPdjfrobWMGVBFsFZNlcAS9fl2VsZ9NqYd+pYZLj7HleOOf wqYdqIoTITKdBXAOTLdR5DA= X-Google-Smtp-Source: APXvYqwAqRJd81VAnG28oS1kIu+s7zJ1OQCa9sUklHBGw5eXz6GvWIX29kwxAE8/+A0/sH6eGiyfyQ== X-Received: by 2002:adf:ecc6:: with SMTP id s6mr543434wro.333.1569263834196; Mon, 23 Sep 2019 11:37:14 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-719e-1b87-a2a8-2320.holly.idiocy.org. [2001:8b0:3f8:8129:719e:1b87:a2a8:2320]) by smtp.gmail.com with ESMTPSA id y19sm11016307wmi.13.2019.09.23.11.37.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Sep 2019 11:37:11 -0700 (PDT) Date: Mon, 23 Sep 2019 19:37:09 +0100 From: Alan Third To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Subject: Re: bug#37483: [PATCH] macOS build error (aligned_alloc) Message-ID: <20190923183709.GB53480@breton.holly.idiocy.org> References: <6CB9FE84-5DF1-458C-B6A9-6C10DDADF601@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37483 Cc: 37483@debbugs.gnu.org, mituharu@math.s.chiba-u.ac.jp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, Sep 23, 2019 at 11:14:55AM +0200, Mattias Engdegård wrote: > 22 sep. 2019 kl. 22.14 skrev mituharu@math.s.chiba-u.ac.jp: > > > > You would need to install the Command Line Developer Tools with > > "xcode-select --install". In general this is necessary when the > > macOS version is older than the newest one Xcode supports. In > > the case of Xcode 11, it is macOS 10.15. > > > > Actually you don't need Xcode for building Emacs, but the Command > > Line Developer Tools would be sufficient. > > Thank you, this is useful to know. > > Even so, doesn't it make sense to make the configure script work > with tools that support newer OS versions? After all, we are not > talking about cross-tools or tools that can only generate code for > newer versions. If I want to use the most recent toolchain for my > OS, these (Xcode 11) tools are the ones to use. The command line tools are closely related to XCode, they’re not old or obsolete. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 23 15:53:34 2019 Received: (at 37483) by debbugs.gnu.org; 23 Sep 2019 19:53:34 +0000 Received: from localhost ([127.0.0.1]:37135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCUOs-00042E-BL for submit@debbugs.gnu.org; Mon, 23 Sep 2019 15:53:34 -0400 Received: from mail75c50.megamailservers.eu ([91.136.10.85]:35486 helo=mail92c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCUOq-000423-79 for 37483@debbugs.gnu.org; Mon, 23 Sep 2019 15:53:33 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1569268410; bh=Jp8e0Dnsg8AcSNF+z6bUyG0Voz8SkdIQX5BsLuPf5+o=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=gOU8oJn1CQFpCTvIDnMdL9tJGR6xR6jUydUbZCj0sDDg98sKzv5+R8MwDzvdFpTED cyFBg1FclIuGcj8zJjStaoRyW/3L0DdxUzWv9CgkNp9Rixe2xA2bRBKtv9u39le7/D zYIZhBMj/4uLSWJD1ogIr6e+pWMtz5kgb76AX6fs= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] ([188.150.171.71]) (authenticated bits=0) by mail92c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x8NJrQJF015731; Mon, 23 Sep 2019 19:53:28 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: bug#37483: [PATCH] macOS build error (aligned_alloc) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <20190923183709.GB53480@breton.holly.idiocy.org> Date: Mon, 23 Sep 2019 21:53:26 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <6CB9FE84-5DF1-458C-B6A9-6C10DDADF601@acm.org> <20190923183709.GB53480@breton.holly.idiocy.org> To: Alan Third X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0206.5D8922BA.0020, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=ZJ+pZkzb c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=hIj89exaAAAA:8 a=BYXu12wsSHH-qZmfsyQA:9 a=QEXdDO2ut3YA:10 a=lS9wXHQM5UdnNJ4u63Ry:22 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37483 Cc: 37483@debbugs.gnu.org, mituharu@math.s.chiba-u.ac.jp X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 23 sep. 2019 kl. 20.37 skrev Alan Third : >=20 > The command line tools are closely related to XCode, they=E2=80=99re = not old > or obsolete. I didn't mean to imply they were. Yet a newer compiler version is likely = to produce better code than an older. It should be possible to build = Emacs with the latest set of command line tools, shouldn't it? From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 23 16:02:24 2019 Received: (at 37483) by debbugs.gnu.org; 23 Sep 2019 20:02:24 +0000 Received: from localhost ([127.0.0.1]:37139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCUXQ-0004IV-Ak for submit@debbugs.gnu.org; Mon, 23 Sep 2019 16:02:24 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCUXO-0004IH-GO for 37483@debbugs.gnu.org; Mon, 23 Sep 2019 16:02:23 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3634A16022D; Mon, 23 Sep 2019 13:02:16 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id IgFfCIiwZcm8; Mon, 23 Sep 2019 13:02:15 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8CD3F16023F; Mon, 23 Sep 2019 13:02:15 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gsa-o5B4Qb4F; Mon, 23 Sep 2019 13:02:15 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 736CC16022D; Mon, 23 Sep 2019 13:02:15 -0700 (PDT) To: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= From: Paul Eggert Subject: [PATCH] macOS build error (aligned_alloc) Organization: UCLA Computer Science Department Message-ID: Date: Mon, 23 Sep 2019 13:02:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37483 Cc: 37483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I'm not seeing why this patch is needed. If you build with tools that expect a macOS version N library, Emacs can't be expected to run on a system that has older libraries. Put it another way: if we install this patch, for consistency shouldn't we install a similar patch for every other function that 'configure' checks for, and have 'configure' do a run-time test instead of just a link-time test for the function? From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 24 07:09:00 2019 Received: (at 37483) by debbugs.gnu.org; 24 Sep 2019 11:09:01 +0000 Received: from localhost ([127.0.0.1]:37805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCigm-0004VP-6X for submit@debbugs.gnu.org; Tue, 24 Sep 2019 07:09:00 -0400 Received: from mail208c50.megamailservers.eu ([91.136.10.218]:43388 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCigi-0004UO-NK; Tue, 24 Sep 2019 07:08:57 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1569323325; bh=cMf2QDOaoN/7uZYJH6unIEuHuYYeFM+IFEbBph61jwk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=bZgSzBn4NscaYIaC4pO1he6UhUMjz63lepUx7EdU6HuUUt00bOYDukV4zDK8PC9zc VD5hTqKWUuhgugPAYVgFBVSQnJ4JY8r9Cgv020xeO2HHGmb37jFvJMrQDOKV8W8sQ/ aj9HGxF4xV9cK9VHPse58zd7VBJQ4JRrXbR08USM= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] ([188.150.171.71]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x8OB8f8f026635; Tue, 24 Sep 2019 11:08:43 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH] macOS build error (aligned_alloc) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Tue, 24 Sep 2019 13:08:41 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <1BCE5F0D-AC05-4301-9D5C-F5AA6B283C33@acm.org> References: To: Paul Eggert X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0213.5D89F93C.0063, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=e954tph/ c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=nZinARN1AhPOsy64iOcA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37483 Cc: 37483@debbugs.gnu.org, Alan Third X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 37483 notabug close 37483 stop 23 sep. 2019 kl. 22.02 skrev Paul Eggert : >=20 > I'm not seeing why this patch is needed. If you build with tools that = expect a macOS version N library, Emacs can't be expected to run on a = system that has older libraries. I don't think it's accurate to say that the tools expect a macOS 10.15 = library; they are perfectly able to build code for 10.14, and that is = the default when running on such a system. Since aligned_alloc will be = available in 10.15, the header file contains an annotated prototype of = that function, so that the compiler can warn on attempts to use it when = building for 10.14: conftest.c:151:9: warning: 'aligned_alloc' is only available on macOS = 10.15 or newer [-Wunguarded-availability-new] = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Devel= oper/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h:50:10: note: = 'aligned_alloc' has been marked as being introduced in macOS 10.15 here, = but the deployment target is macOS 10.14.0 AC_CHECK_FUNCS supplies a made-up prototype for aligned_alloc instead of = including , and then compilation and linking will proceed = without diagnostics. The run-time linker will complain and abort. However, I followed Alan's advice and used 'xcode-select --install' to = install SDKs specifically for 10.14, and now clang uses a different = header file tree that does not include aligned_alloc at all. I'm happy, = because the compiler and associated tools are still of version 11. I = must admit I'm not entirely sure how about the exact mechanics behind it = all; 'xcode-select -p' still returns the same path, but the compiler now = uses headers from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk. At any rate, it's good enough to withdraw the patch for now. Thank you = for your patience. > Put it another way: if we install this patch, for consistency = shouldn't we install a similar patch for every other function that = 'configure' checks for, and have 'configure' do a run-time test instead = of just a link-time test for the function? That's a legitimate question. AC_CHECK_FUNCS & friends make Unix-centric = assumptions that aren't correct in all build environments, but not = running a test binary is slightly faster and makes cross-builds easier. (Should you ever consider replacing autoconf for Emacs with something = faster, you will find in me a fervent supporter.) From unknown Wed Jun 18 23:16:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 22 Oct 2019 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator