• components_4_64 Test_Python fails on Mac Monterey

    From Roger Mc@21:1/5 to All on Thu Oct 20 18:58:46 2022
    Test_Python builds Ok but execution fails with:
    Execution terminated by abort of environment task
    with no other output.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry A. Kazakov@21:1/5 to Roger Mc on Fri Oct 21 09:05:14 2022
    On 2022-10-21 03:58, Roger Mc wrote:
    Test_Python builds Ok but execution fails with:
    Execution terminated by abort of environment task
    with no other output.

    [I never tested it under BSD]

    1. Does the main test work? (components-python-test_python.gpr)

    2. What are the scenarios, you use when building:

    arch
    Atomic_Access
    Target_OS

    Depending on that a version of py-load_python_library.adb is selected
    which is responsible for loading the Python library.

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roger Mc@21:1/5 to Dmitry A. Kazakov on Fri Oct 21 04:12:51 2022
    On Friday, October 21, 2022 at 6:05:17 PM UTC+11, Dmitry A. Kazakov wrote:
    On 2022-10-21 03:58, Roger Mc wrote:
    Test_Python builds Ok but execution fails with:
    Execution terminated by abort of environment task
    with no other output.
    [I never tested it under BSD]

    1. Does the main test work? (components-python-test_python.gpr)

    2. What are the scenarios, you use when building:

    arch
    Atomic_Access
    Target_OS

    Depending on that a version of py-load_python_library.adb is selected
    which is responsible for loading the Python library.

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    Thanks Dmitry
    components-python-test_python builds but execution fails with
    Execution terminated by abort of environment task

    arch x86-64
    Atomic_Access auto
    Target_OS OSX

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry A. Kazakov@21:1/5 to Roger Mc on Fri Oct 21 14:46:16 2022
    On 2022-10-21 13:12, Roger Mc wrote:
    On Friday, October 21, 2022 at 6:05:17 PM UTC+11, Dmitry A. Kazakov wrote:
    On 2022-10-21 03:58, Roger Mc wrote:
    Test_Python builds Ok but execution fails with:
    Execution terminated by abort of environment task
    with no other output.
    [I never tested it under BSD]

    1. Does the main test work? (components-python-test_python.gpr)

    2. What are the scenarios, you use when building:

    arch
    Atomic_Access
    Target_OS

    Depending on that a version of py-load_python_library.adb is selected
    which is responsible for loading the Python library.

    components-python-test_python builds but execution fails with
    Execution terminated by abort of environment task

    arch x86-64
    Atomic_Access auto
    Target_OS OSX

    This selects py-load_python_library.adb from os/pthread which is just a
    copy of os/linux. Likely there are differences between Linux and OSX. If
    you have time I could fix it by tracing locations causing the problem on
    your target. Mail me, if you want.

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to Dmitry A. Kazakov on Fri Oct 21 18:04:53 2022
    "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

    This selects py-load_python_library.adb from os/pthread which is just
    a copy of os/linux. Likely there are differences between Linux and
    OSX.

    dlopen() would need to see e.g.

    $FRAMEWORKS/Python.framework/Python/Versions/3.8/lib/libpython3.8.dylib

    where $FRAMEWORKS would normally be /Library/Frameworks but, in Roger's
    case (running Homebrew), would be $HOMEBREW_PREFIX/Frameworks (Roger
    might have frameworks scattered bewtween the two places, for added fun).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry A. Kazakov@21:1/5 to Simon Wright on Fri Oct 21 20:30:35 2022
    On 2022-10-21 19:04, Simon Wright wrote:
    "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

    This selects py-load_python_library.adb from os/pthread which is just
    a copy of os/linux. Likely there are differences between Linux and
    OSX.

    dlopen() would need to see e.g.

    $FRAMEWORKS/Python.framework/Python/Versions/3.8/lib/libpython3.8.dylib

    where $FRAMEWORKS would normally be /Library/Frameworks but, in Roger's
    case (running Homebrew), would be $HOMEBREW_PREFIX/Frameworks (Roger
    might have frameworks scattered bewtween the two places, for added fun).

    Thanks Simon.

    Is the variable $FRAMEWORKS set or I have to search a whole set of subdirectories?

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to Dmitry A. Kazakov on Fri Oct 21 20:41:25 2022
    "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

    On 2022-10-21 19:04, Simon Wright wrote:
    "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

    This selects py-load_python_library.adb from os/pthread which is just
    a copy of os/linux. Likely there are differences between Linux and
    OSX.
    dlopen() would need to see e.g.
    $FRAMEWORKS/Python.framework/Python/Versions/3.8/lib/libpython3.8.dylib >> where $FRAMEWORKS would normally be /Library/Frameworks but, in
    Roger's
    case (running Homebrew), would be $HOMEBREW_PREFIX/Frameworks (Roger
    might have frameworks scattered bewtween the two places, for added fun).

    Thanks Simon.

    Is the variable $FRAMEWORKS set or I have to search a whole set of subdirectories?

    It's not set; I'm not sure what the Homebrew version would look like,
    but it's probably like /Library/Frameworks. And I left out Current,
    which chooses between e.g. 3.8, 3.9.

    libpython := '';
    find_libpython:
    for top in $HOMEBREW_PREFIX/Frameworks, /Library/Frameworks loop
    if exists $top/Python then
    libpython := $top/Python/Versions/Current/lib/libpython*.dylib;
    exit find_libpython;
    end if;
    end loop find_libpython;
    fail if libpython is still ''

    ==========

    There is another macOS package manager, MacPorts, but I've settled on
    Homebrew.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry A. Kazakov@21:1/5 to Simon Wright on Fri Oct 21 22:00:16 2022
    On 2022-10-21 21:41, Simon Wright wrote:
    "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

    On 2022-10-21 19:04, Simon Wright wrote:
    "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

    This selects py-load_python_library.adb from os/pthread which is just
    a copy of os/linux. Likely there are differences between Linux and
    OSX.
    dlopen() would need to see e.g.
    $FRAMEWORKS/Python.framework/Python/Versions/3.8/lib/libpython3.8.dylib >>> where $FRAMEWORKS would normally be /Library/Frameworks but, in
    Roger's
    case (running Homebrew), would be $HOMEBREW_PREFIX/Frameworks (Roger
    might have frameworks scattered bewtween the two places, for added fun).

    Thanks Simon.

    Is the variable $FRAMEWORKS set or I have to search a whole set of
    subdirectories?

    It's not set; I'm not sure what the Homebrew version would look like,
    but it's probably like /Library/Frameworks. And I left out Current,
    which chooses between e.g. 3.8, 3.9.

    libpython := '';
    find_libpython:
    for top in $HOMEBREW_PREFIX/Frameworks, /Library/Frameworks loop
    if exists $top/Python then
    libpython := $top/Python/Versions/Current/lib/libpython*.dylib;
    exit find_libpython;
    end if;
    end loop find_libpython;
    fail if libpython is still ''

    ==========

    There is another macOS package manager, MacPorts, but I've settled on Homebrew.

    I researched a little bit. Mac's Python is even more messy than Windows'
    one. That is an achievement of its own! (:-))

    So far I come to the list

    /usr/lib
    /Library/Frameworks/Python.framework/Versions
    /sw/lib
    /opt/lib
    /opt/homebrew/lib

    each to be searched recursively for the name:

    libpython3.*.dylib

    P.S. It seems that I must check Julia bindings as well. So far it looks
    so that nobody ever used them on Mac.

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)