From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!aioe.org!16NWJ6+ffT/gI+JIGgfmBw.user.46.165.242.75.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to build Python3 support into GNATCOLL with alire Date: Sun, 20 Nov 2022 21:25:30 +0000 Organization: Aioe.org NNTP Server Message-ID: References: <3e7e9f66-9e74-4a04-98d9-73cc14d7e80bn@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: gioia.aioe.org; logging-data="62475"; posting-host="16NWJ6+ffT/gI+JIGgfmBw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:4oTuFduf6RKZvfEJHbCsZWW/e4g= Xref: reader01.eternal-september.org comp.lang.ada:64638 List-Id: Roger Mc writes: > Mac OSX 13.0.1 (22A400) > XCode 14.1 > gnat-x86_64-darwin-12.1.0-2 > > Thanks Simon, > I've just posted a query with gnatcoll_core as > alr get gnatcoll_python3 returns an error message. > I think the gnatcoll documentation is now out of date with respect to > changes made by alire. The trouble is that Alire hasn't been taught how to deal with gnatcoll_python3. The community index has, in gnatcoll_python3-23.0.0.toml, +++++++++++++++ [environment.'case(distribution)'] "debian|ubuntu" = { C_INCLUDE_PATH.append = "${DISTRIB_ROOT}/usr/include/python3.7/:${DISTRIB_ROOT}/usr/include/python3.8/"} msys2 = { C_INCLUDE_PATH.append = "${DISTRIB_ROOT}/mingw64/include/python3.10/" } [available.'case(distribution)'] 'debian|ubuntu|msys2' = true '...' = false [[depends-on]] gnatcoll = "~23.0.0" libpython3dev = "^3.10" +++++++++++++++ and this has no support for macOS; specifically, the "'...' = false" under "[available.'case(distribution)']" says it's only available on the distributions named above. In libpython3dev-external.toml, there is +++++++++++++++ [[external]] kind = "system" [external.origin."case(distribution)"] "debian|ubuntu" = ["libpython3-dev"] msys2 = ["mingw-w64-x86_64-python"] +++++++++++++++ which says e.g. that, if you're on debian, Alire is to use its package manager (apt, I think) to check/fetch the package libpython3-dev. Alire 1.3 will support Homebrew as the package manager for macOS, but someone has to work out how to upgrade the above two items to use it (and how to approach include, library paths; the ideal way would probably be to use pkg-config to determine them, but the simplest way of doing that would mean running a script from within gprbuild - not going to happen. Bear in mind that although Xcode 14 has /usr/bin/python3 it doesn't support the -dev aspects, i.e. no includes and no libs, and so no gnatcoll_python3. > I've just updated my Mac to Ventura and consequently am fighting > battles on many fronts. There's an issue with GCC 12.1.0 & Ventura (macOS 13): that release of GCC doesn't believe in macOS versions greater than 12 :-( I'm pretty sure that this only affects C (and C++?) compilation. You could try export MACOSX_DEPLOYMENT_TARGET=12 - I haven't tried this yet. The 12.2.0 versions I've just posted don't have _this_ problem!