comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: components_4_64 python Test_Class Build Fails
Date: Fri, 21 Oct 2022 20:39:53 +0200	[thread overview]
Message-ID: <tiup1n$hs6$1@gioia.aioe.org> (raw)
In-Reply-To: ly7d0tp195.fsf@pushface.org

On 2022-10-21 18:52, Simon Wright wrote:
> Roger Mc <rogermcm2@gmail.com> 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

  reply	other threads:[~2022-10-21 18:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21  0:39 components_4_64 python Test_Class Build Fails Roger Mc
2022-10-21 16:52 ` Simon Wright
2022-10-21 18:39   ` Dmitry A. Kazakov [this message]
2022-10-21 19:56     ` Simon Wright
2022-10-21 20:14       ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox