Re: fixing AC_OPENMP for Apple clang
Dima Pasechnik <[email protected]> Mon, 2 Mar 2026 19:23:34 -0600
| Newsgroups | gmane.comp.sysutils.autoconf.general |
|---|---|
| Message-ID | <aaY4Fkxm7szN0eVu@tarski> |
--RhC6Ml45FrSEKtnT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 03, 2026 at 12:45:48AM +0200, Andrew W. Nosenko wrote: > On Tue, 3 Mar 2026 at 00:39, Andrew W. Nosenko <[email protected]= m> > wrote: >=20 > > > > On Mon, 2 Mar 2026 at 22:48, Dima Pasechnik <[email protected]> wrote: > > > >> On Mon, Mar 02, 2026 at 09:45:35PM +0200, Andrew W. Nosenko wrote: > >> > > >> > Does modern Xcode includes libomp =E2=80=9Cout of the box=E2=80=9D o= r it need to be > >> built > >> > separately from Homebrew/MacPorts/Git? (I have access to Catalina bot > >> not > >> > to more modern version, and on Catalina it doesn=E2=80=99t) > >> No, Xcode has no libomp. But Homebrew has a libomp package: > >> https://formulae.brew.sh/formula/libomp > >> > >> It's also provided by R Project: > >> https://mac.r-project.org/openmp/ > >> > >> And, yes, naturally, one can build libomp as a part of the llvm > >> installation. > >> > > > > > > But then I=E2=80=99m confused again: if I need to build libomp separate= ly from > > LLVM sources, then why I would to prefer XCode=E2=80=99s Clang instead = of Clang > > from the same LLVM package, from which I=E2=80=99m going to build libom= p anyway? > > >=20 > OpenMP is about compiler=E2=80=99s #pragmas plus runtime support library.= So I see > risks in de-synchronisation between frontend (compiler) and backend > (library). But I see no benefits in using de-synchronised toolchain (Xco= de > clang + non-Xcode llvm libomp). One can use the Apple's native tools, with a small extension (libomp), and = not a 3rd party toolchain, with no guaranties that it works well with the OS components. As the llvm project does not make separate releases for libomp, the whole thing looks odd, as one uses a big, 167Mb, tarball. I timed it - the building from source and installing of the package only takes 3 minutes on my old Intel Macbook, of which a sizeable part of time is untarring and configuring. The resulting package, headers+library, is just 2Mb in size. You can actually look at the build script, https://github.com/Homebrew/homebrew-core/blob/79725074f2282297d66354340473= 1134b68d150e/Formula/lib/libomp.rb Best, Dima --RhC6Ml45FrSEKtnT Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQFPBAABCAA5FiEEJVdDnfI7raAa4RJxoksLHjfJBTEFAmmmOBMbFIAAAAAABAAO bWFudTIsMi41KzEuMTEsMiwyAAoJEKJLCx43yQUxQ0MIAJMjb6wHuwfuHt6onxU+ VJ/Xh3NYr6HI1JH+r/C5yUE+9QzMXPrz4Q+TQI1PbwxVGoKyUDWlIlpS3Wv12kV4 NXIV4P1t0FIh/Ew49H9MLCmL5WEQD27FEBsIoDsbcZAA/NWiihE/+zPzOch0T+Fb Ws0ERCswgBZ8cygZQq2WPVbNib2+/nT7Jg5VyzCirYnZ+hdacvClx1VNJDuzCrZi P2ZX14Ks20F1ug2ihSpu1SDSzuylv6Ex7+AUwu4eRhdo0AmFEK1XhmqWeHlnYrup c+lgIujzv8RgLBlY3whwUgiwbz8MOh5Ke0AD5EPEchzbFAMeBM26ta9YjvIsXIed EQ0= =cRov -----END PGP SIGNATURE----- --RhC6Ml45FrSEKtnT--