• I have gnat 13.1.0 on my M1 Mac; I'd like to have my own Ada+GNAT *.ad[

    From Kenneth Wolcott@21:1/5 to All on Sat Jun 24 21:37:35 2023
    Hi;

    I have gnat 13.1.0 on my M1 Mac;

    (thank you, Simon! <GRIN>)

    I'd like to have my own Ada+GNAT *.ad[sb] library files, where are they?

    I can find the Ada libraries (*.ad[sb]) but it sometimes is hard to (reliably) find all of the GNAT Ada libraries in external documentation.

    I hope that this is not a stupid question.

    Perhaps there is a gnatmake flag or gnat doc that I'm just not seeing.

    Thanks,
    Ken Wolcott

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenneth Wolcott@21:1/5 to Kenneth Wolcott on Sat Jun 24 22:23:42 2023
    On Saturday, June 24, 2023 at 9:37:37 PM UTC-7, Kenneth Wolcott wrote:
    Hi;

    I have gnat 13.1.0 on my M1 Mac;

    (thank you, Simon! <GRIN>)

    I'd like to have my own Ada+GNAT *.ad[sb] library files, where are they?

    I can find the Ada libraries (*.ad[sb]) but it sometimes is hard to (reliably) find all of the GNAT Ada libraries in external documentation.

    I hope that this is not a stupid question.

    Perhaps there is a gnatmake flag or gnat doc that I'm just not seeing.

    Thanks,
    Ken Wolcott

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to Kenneth Wolcott on Sun Jun 25 11:15:49 2023
    Kenneth Wolcott <kennethwolcott@gmail.com> writes:

    I have gnat 13.1.0 on my M1 Mac;

    (thank you, Simon! <GRIN>)

    :bow:

    I'd like to have my own Ada+GNAT *.ad[sb] library files, where are they?

    If you just want to insect them, see below: if you want to alter them,
    that'd be a bit tricker. As far as I can remember, GNAT Pro releases
    provide for rebuilding the runtime, but the FSF builds don't.

    I can find the Ada libraries (*.ad[sb]) but it sometimes is hard to (reliably) find all of the GNAT Ada libraries in external
    documentation.

    They're in {prefix}/lib/gcc/{target}/{release}/adainclude/ - i.e., in
    your case (unless you've moved the install)

    /opt/gcc-13.1.0-aarch64/lib/gcc/aarch64-apple-darwin21/13.1.0/adainclude/

    But you say you know that. I wonder whether it's the crunched filenames
    that are confusing? (a legacy of the days when DOS 8.3 filenames were
    required for a large part of GNAT's target audience). You can find the
    crunched filename for a package using gnatkr (gnat krunch):

    $ gnatkr gnatkr ada.sequential_io.ads
    a-sequio.ads

    (you don't actually need whatever's after the final period to be the
    actual file extension: you could use '.open' or just '.').

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to Simon Wright on Sun Jun 25 16:28:19 2023
    Simon Wright <simon@pushface.org> writes:

    $ gnatkr gnatkr ada.sequential_io.ads
    a-sequio.ads

    Only one 'gnatkr', ofc!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenneth Wolcott@21:1/5 to Simon Wright on Sun Jun 25 10:00:16 2023
    Thank you Simon!

    On Sunday, June 25, 2023 at 3:15:54 AM UTC-7, Simon Wright wrote:
    Kenneth Wolcott writes:

    I have gnat 13.1.0 on my M1 Mac;

    (thank you, Simon! <GRIN>)
    :bow:
    I'd like to have my own Ada+GNAT *.ad[sb] library files, where are they?
    If you just want to insect them, see below: if you want to alter them, that'd be a bit tricker. As far as I can remember, GNAT Pro releases
    provide for rebuilding the runtime, but the FSF builds don't.
    I can find the Ada libraries (*.ad[sb]) but it sometimes is hard to (reliably) find all of the GNAT Ada libraries in external
    documentation.
    They're in {prefix}/lib/gcc/{target}/{release}/adainclude/ - i.e., in
    your case (unless you've moved the install)

    /opt/gcc-13.1.0-aarch64/lib/gcc/aarch64-apple-darwin21/13.1.0/adainclude/

    This is all the information that I needed, thank you!

    But you say you know that. I wonder whether it's the crunched filenames
    that are confusing? (a legacy of the days when DOS 8.3 filenames were required for a large part of GNAT's target audience). You can find the crunched filename for a package using gnatkr (gnat krunch):

    $ gnatkr gnatkr ada.sequential_io.ads
    a-sequio.ads

    This is nice, thank you!

    (you don't actually need whatever's after the final period to be the
    actual file extension: you could use '.open' or just '.').

    Ken Wolcott

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Thompson@21:1/5 to Simon Wright on Sun Jun 25 14:49:08 2023
    Simon Wright <simon@pushface.org> writes:
    [...]
    But you say you know that. I wonder whether it's the crunched filenames
    that are confusing? (a legacy of the days when DOS 8.3 filenames were required for a large part of GNAT's target audience). You can find the crunched filename for a package using gnatkr (gnat krunch):

    $ gnatkr ada.sequential_io.ads
    [fixed typo]
    a-sequio.ads

    (you don't actually need whatever's after the final period to be the
    actual file extension: you could use '.open' or just '.').

    Which raises a question: Why does GNAT still use crunched filenames? It probably makes sense to continue to support them (does anyone use GNAT
    on MS-DOS?), but I wouldn't think it would be difficult to use full file
    names on the vast majority of systems that support them. It's not a
    huge deal, but using full file names where possible would be less
    annoying.

    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    Will write code for food.
    void Void(void) { Void(); } /* The recursive call of the void */

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jere@21:1/5 to Keith Thompson on Mon Jun 26 11:56:49 2023
    On Sunday, June 25, 2023 at 5:49:11 PM UTC-4, Keith Thompson wrote:
    Simon Wright writes:
    [...]
    But you say you know that. I wonder whether it's the crunched filenames that are confusing? (a legacy of the days when DOS 8.3 filenames were required for a large part of GNAT's target audience). You can find the crunched filename for a package using gnatkr (gnat krunch):

    $ gnatkr ada.sequential_io.ads
    [fixed typo]
    a-sequio.ads

    (you don't actually need whatever's after the final period to be the actual file extension: you could use '.open' or just '.').
    Which raises a question: Why does GNAT still use crunched filenames? It probably makes sense to continue to support them (does anyone use GNAT
    on MS-DOS?), but I wouldn't think it would be difficult to use full file names on the vast majority of systems that support them. It's not a
    huge deal, but using full file names where possible would be less
    annoying.

    Unless they changed how the GNAT compiler works in the last few years, then my guess is inertia
    to do that. Right before the pandemic hit, I had the neat idea of doing my own bare metal
    runtime and to use normal uncrunched names. The RTS compiled just fine doing that. However,
    when I tried to use the RTS to build a full fledged program, it failed to find the package in the RTS.
    I don't recall if it failed at compile time or link time, but crunching the names and recompiling the
    RTS fixed the issue. So something in their compiler requires the crunched names, or if they have
    since changed that, used to require it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to Jere on Mon Jun 26 20:48:39 2023
    Jere <jhb.chat@gmail.com> writes:

    On Sunday, June 25, 2023 at 5:49:11 PM UTC-4, Keith Thompson wrote:
    Simon Wright writes:
    [...]
    But you say you know that. I wonder whether it's the crunched filenames
    that are confusing? (a legacy of the days when DOS 8.3 filenames were
    required for a large part of GNAT's target audience). You can find the
    crunched filename for a package using gnatkr (gnat krunch):

    $ gnatkr ada.sequential_io.ads
    [fixed typo]
    a-sequio.ads

    (you don't actually need whatever's after the final period to be the
    actual file extension: you could use '.open' or just '.').
    Which raises a question: Why does GNAT still use crunched filenames? It
    probably makes sense to continue to support them (does anyone use GNAT
    on MS-DOS?), but I wouldn't think it would be difficult to use full file
    names on the vast majority of systems that support them. It's not a
    huge deal, but using full file names where possible would be less
    annoying.

    Unless they changed how the GNAT compiler works in the last few years,
    then my guess is inertia
    to do that. Right before the pandemic hit, I had the neat idea of
    doing my own bare metal
    runtime and to use normal uncrunched names. The RTS compiled just
    fine doing that. However,
    when I tried to use the RTS to build a full fledged program, it failed
    to find the package in the RTS.
    I don't recall if it failed at compile time or link time, but
    crunching the names and recompiling the
    RTS fixed the issue. So something in their compiler requires the
    crunched names, or if they have
    since changed that, used to require it.

    The package in the compiler that deals with crunched names is Rtsfind, https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/rtsfind.ads

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenneth Wolcott@21:1/5 to All on Mon Jun 26 13:00:25 2023
    Simon;

    The package in the compiler that deals with crunched names is Rtsfind, https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/rtsfind.ads

    Thank you!
    Ken

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenneth Wolcott@21:1/5 to All on Mon Jun 26 12:35:21 2023
    Simon Wright writes:
    $ gnatkr ada.sequential_io.ads
    a-sequio.ads

    Simon, Keith, Jere:

    Yes, the crunched names are annoying. Too bad that they seem to be required even now...

    I'm now writing a Perl script (later to be converted to Ada) which does the "unkrunch" :-)

    Seems like a missing utility for humans to use Ada :-)

    Thanks,
    Ken

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