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!lYnhq7byp2KtY/MFJZaCTw.user.46.165.242.91.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: components_4_64 python Test_Class Build Fails Date: Fri, 21 Oct 2022 20:39:53 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <2038635c-fdb0-4ca4-9dd8-6d7f9cfa6dd1n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: gioia.aioe.org; logging-data="18310"; posting-host="lYnhq7byp2KtY/MFJZaCTw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:64534 List-Id: On 2022-10-21 18:52, Simon Wright wrote: > Roger Mc writes: > >> Mac OSX Monterey >> Trying to build Test_Class fails with >> /System/Volumes/Data/Ada_Source/components_4_64/python-examples/class/test_class >> dyld[89915]: Library not loaded: >> '/Library/Frameworks/Python.framework/Versions/3.8/Python' >> Referenced from: >> '/System/Volumes/Data/Ada_Source/components_4_64/python-examples/class/test_class' >> Reason: tried: >> '/Library/Frameworks/Python.framework/Versions/3.8/Python' (no such >> file), >> '/System/Library/Frameworks/Python.framework/Versions/3.8/Python' (no >> such file) >> >> I have set the gpr Linker item to >> -F/usr/local/Cellar/python@3.10/3.10.5/Frameworks >> but this does not fix th problem > > Not sure I've ever seen /System/Volumes/Data at the start of a path > before! would have expected just /Ada_Source. > > Which compiler are you using? > > I don't know what triggers that message about > /Library/Frameworks/Python.framework/Versions/3.8/Python, > you'd need to be running a fairly old compiler - if it's one of mine > it'd have to be GCC 10.1.0, otherwise it won't look in > /Library/Frameworks at all. > > If your homebrew setup is like mine, you could just say > -F/usr/local/Frameworks, but you have to say _which_ framework, i.e. > -framework python (or maybe -framework Python, probably better). > > I built this using GNATstudio, GCC 12.1.0, x86_64 Monterey 12.6, > Atomic_Access auto, > Development Debug, > Legacy Ada2012, > Object_Dir nested, > Target_OS OSX, > Tasking Multiple, > Traced_Objects Off, > arch x86_64 > > and it linked without issue. Didn't run, > Error: raised ADA.IO_EXCEPTIONS.USE_ERROR : Failed to load Python DLL "libpython3.so" Right, because it is obviously wrong since Python under OSX looks quite different from Linux. I mindlessly copied Linux implementation. Now I finally have an opportunity to fix it! (:-)) BTW, what are you "posh guys" (:-)) are going to do with M1/2? Is there GNAT? Is there any noticeable differences to X86_64 on the Ada level? Endianness must be same, correct? Alignment/padding inside C structures when interfacing to Ada? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de