• Binutils

    From Waldek Hebisch@21:1/5 to All on Fri Aug 29 14:14:42 2025
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Waldek Hebisch on Fri Aug 29 10:47:20 2025
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.

    GNV got both ar and ld, but that does not help you.

    But are you sure you want to do it this way?

    My understanding is that you want to do:

    source-(compiler on Linux)->.obj->(ld on Linux)->VMS .exe

    I would go for:

    source-(compiler on Linux)->.obj->(LINK on VMS)->VMS .exe

    Or if possible even better:

    source-(compiler on Linux)->.s-(GCC AS on VMS)->.obj-(LINK on VMS)->VMS .exe

    GCC AS (version 2.8) is working on VMS Alpha.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Waldek Hebisch on Fri Aug 29 15:16:52 2025
    In article <108sckg$19hcn$1@paganini.bofh.team>,
    Waldek Hebisch <antispam@fricas.org> wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    There is a BFD backend for VMS on Alpha in the main binutils
    branch in git, but it is not clear to me how well-tested or
    generally maintained it is, nor how compatibile with the
    standard VMS utilities it ever was; I suspect it existed
    primarily to port GNU software to VMS.

    What, exactly, are you trying to do?

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to arne@vajhoej.dk on Fri Aug 29 17:32:32 2025
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.

    GNV got both ar and ld, but that does not help you.

    Where are the sources? Working sources certainly would help.

    But are you sure you want to do it this way?

    My understanding is that you want to do:

    source-(compiler on Linux)->.obj->(ld on Linux)->VMS .exe

    I would go for:

    source-(compiler on Linux)->.obj->(LINK on VMS)->VMS .exe

    That is plan B. Working binutils would be simpler because
    I could use existing automated process.

    Actually, ATM I getting errors during gcc build. I can use
    crude workaround to go further, but I am affraid that to get
    working compiler I need either working binutils or to examine
    all build steps involving binutils and do equvalent work in
    different way.

    Or if possible even better:

    source-(compiler on Linux)->.s-(GCC AS on VMS)->.obj-(LINK on VMS)->VMS .exe

    GCC AS (version 2.8) is working on VMS Alpha.

    Actually, it is possible that I will have to use

    source-(compiler on Linux)->.s-(VMS assembler)>.obj...

    because one of next goals is to get running compiler wich generate(d)
    assembly for VMS assembler and may be incompatible with GNU as. But
    this means more changes to build process (= work work => not better).

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Dan Cross on Fri Aug 29 17:39:56 2025
    On 2025-08-29, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    In article <108sckg$19hcn$1@paganini.bofh.team>,
    Waldek Hebisch <antispam@fricas.org> wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    There is a BFD backend for VMS on Alpha in the main binutils
    branch in git, but it is not clear to me how well-tested or
    generally maintained it is, nor how compatibile with the
    standard VMS utilities it ever was; I suspect it existed
    primarily to port GNU software to VMS.


    AdaCore was primarily responsible for working on this as part of
    GNAT. After they dropped VMS as a supported target, this code may
    have gone stale.

    What, exactly, are you trying to do?


    I strongly suspect the OP is trying to either run more modern variants
    of languages that already exist on VMS or languages that simply do
    not yet exist on VMS.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Waldek Hebisch on Fri Aug 29 13:41:28 2025
    On 8/29/2025 1:32 PM, Waldek Hebisch wrote:
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.

    GNV got both ar and ld, but that does not help you.

    Where are the sources? Working sources certainly would help.

    There are the SourceForge version of GNV and there is the
    VSI version of GNV.

    The SF version is here:

    https://sourceforge.net/p/gnv/ld_tools/ci/default/tree/reference/ld_tools/

    Looks like SF GNV ld was last maintained 10 years ago.

    But heck that is way later than VMS Alpha!!

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to Dan Cross on Fri Aug 29 17:50:57 2025
    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    In article <108sckg$19hcn$1@paganini.bofh.team>,
    Waldek Hebisch <antispam@fricas.org> wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    There is a BFD backend for VMS on Alpha in the main binutils
    branch in git, but it is not clear to me how well-tested or
    generally maintained it is, nor how compatibile with the
    standard VMS utilities it ever was; I suspect it existed
    primarily to port GNU software to VMS.

    What, exactly, are you trying to do?

    Well, this is part of bigger rather poorly defined project. ATM
    I trying to compile gcc-15.1. I first build binutils, then I do

    ../gcc-15.1.0/configure --enable-languages=c,c++ --target=alpha-dec-vms --prefix=/sklad/usr
    make -j 7 > mlogg 2>&1

    There were earlier problems that I resolved. I have now trouble
    during linking of libgcc. Some problems went away after switch
    from binutils 2.43 to binutils 2.21. But now I get the following
    error:

    /sklad/usr/alpha-dec-vms/bin/ld: -shared not supported

    That is 'ld' from binutils 2.21 says that it does not support
    '-shared'. Note that Makefile wants to create 'libgcc_s.exe',
    so it knows about VMS file extentions. In other words somebody
    at least tried to make it work.

    If you want more details I can provide them, but the message
    about '-shared' appears also when I attempt to build a
    different shared image:

    /sklad/usr/alpha-dec-vms/bin/ld -shared -o pop_poll.exe pop_poll.obj

    so the problem can be reproduced outside of gcc build.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Waldek Hebisch on Fri Aug 29 13:52:05 2025
    On 8/29/2025 1:32 PM, Waldek Hebisch wrote:
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    But are you sure you want to do it this way?

    My understanding is that you want to do:

    source-(compiler on Linux)->.obj->(ld on Linux)->VMS .exe

    I would go for:

    source-(compiler on Linux)->.obj->(LINK on VMS)->VMS .exe

    That is plan B. Working binutils would be simpler because
    I could use existing automated process.

    But couldn't you have your existing automated process do the
    link on VMS via some fancy scripting?

    I have little faith in ld producing good VMS .exe.

    All the GCC ports to VMS I have seen (GCC 1.4x on VAX,
    GCC 2.8.x on Alpha and GNAT 2.8.x on Alpha) have used
    VMS linker. I suspect they have their reasons.

    Actually, ATM I getting errors during gcc build. I can use
    crude workaround to go further, but I am affraid that to get
    working compiler I need either working binutils or to examine
    all build steps involving binutils and do equvalent work in
    different way.

    Are you trying to get a recent GCC working on VMS?

    In that case there may be some ideas from the GNAT
    Itanium port done by the french:

    https://github.com/AdaLabs/gnat-vms

    Or if possible even better:

    source-(compiler on Linux)->.s-(GCC AS on VMS)->.obj-(LINK on VMS)->VMS .exe >>
    GCC AS (version 2.8) is working on VMS Alpha.

    Actually, it is possible that I will have to use

    source-(compiler on Linux)->.s-(VMS assembler)>.obj...

    because one of next goals is to get running compiler wich generate(d) assembly for VMS assembler and may be incompatible with GNU as. But
    this means more changes to build process (= work work => not better).

    If you can generate VMS assembler, then you are all good.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Fri Aug 29 13:55:11 2025
    On 8/29/2025 1:39 PM, Simon Clubley wrote:
    On 2025-08-29, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    In article <108sckg$19hcn$1@paganini.bofh.team>,
    Waldek Hebisch <antispam@fricas.org> wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    There is a BFD backend for VMS on Alpha in the main binutils
    branch in git, but it is not clear to me how well-tested or
    generally maintained it is, nor how compatibile with the
    standard VMS utilities it ever was; I suspect it existed
    primarily to port GNU software to VMS.

    AdaCore was primarily responsible for working on this as part of
    GNAT. After they dropped VMS as a supported target, this code may
    have gone stale.
    Not just AdaCore GNAT (Ada).

    ProGIS also tried to make a business of GCC (C and C++) in the
    same time frame (25 years ago).

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to arne@vajhoej.dk on Fri Aug 29 18:11:03 2025
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:

    I have little faith in ld producing good VMS .exe.


    That bit worked just fine, but I don't remember if I had to fix up
    anything in the BFD librayr first. The problem seems to be that the
    current version of the BFD library has stagnated for VMS Alpha and
    appears to need bringing up to date.

    All the GCC ports to VMS I have seen (GCC 1.4x on VAX,
    GCC 2.8.x on Alpha and GNAT 2.8.x on Alpha) have used
    VMS linker. I suspect they have their reasons.


    AdaCore started with a cross compiler on Linux.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Waldek Hebisch on Fri Aug 29 18:05:50 2025
    On 2025-08-29, Waldek Hebisch <antispam@fricas.org> wrote:
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.

    GNV got both ar and ld, but that does not help you.

    Where are the sources? Working sources certainly would help.


    Aren't they simply wrappers around the native VMS utilities ?

    But are you sure you want to do it this way?

    My understanding is that you want to do:

    source-(compiler on Linux)->.obj->(ld on Linux)->VMS .exe

    I would go for:

    source-(compiler on Linux)->.obj->(LINK on VMS)->VMS .exe

    That is plan B. Working binutils would be simpler because
    I could use existing automated process.


    Binutils worked at one time because I was able to do the whole
    sequence, including generating the final C VMS executable, on Linux.

    Actually, ATM I getting errors during gcc build. I can use
    crude workaround to go further, but I am affraid that to get
    working compiler I need either working binutils or to examine
    all build steps involving binutils and do equvalent work in
    different way.


    That's where I gave up. I either didn't understand the required
    VMS-specific build steps or there were bits missing from the public
    source kits.

    Note that I have a lot of experience building cross compilers on Linux
    for various embedded targets (including fixing various problems
    I encountered along the way), and I have never had a fraction of the
    problems I had when trying to get VMS support working.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to arne@vajhoej.dk on Fri Aug 29 17:57:19 2025
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.


    A decade ago, I got as far as getting a simple C program for VMS Alpha
    to compile and link on Linux. Anything else more complicated than that
    (ie: other languages) failed and I suspect that either bits were missing
    from the public kits or the additional steps required were not obvious.

    I discussed this at length in comp.os.vms at the time. Anyone interested
    will have to rely on the notes I posted at the time as I have completely forgotten the details of any of this (and have no motivation to get back
    up to speed on them because my hobbies these days are very different and because there's no longer a proper hobbyist licence for VMS Alpha).

    GNV got both ar and ld, but that does not help you.

    But are you sure you want to do it this way?

    My understanding is that you want to do:

    source-(compiler on Linux)->.obj->(ld on Linux)->VMS .exe

    I would go for:

    source-(compiler on Linux)->.obj->(LINK on VMS)->VMS .exe


    I strongly suspect that will not work as the VMS linker may not
    have the features needed to link those .o files.

    Or if possible even better:

    source-(compiler on Linux)->.s-(GCC AS on VMS)->.obj-(LINK on VMS)->VMS .exe


    Er, why ? If you can get the BFD library working for VMS Alpha
    once again, that's the major problem sorted.

    GCC AS (version 2.8) is working on VMS Alpha.


    Also, what makes you think that the GNU gas of that era will still
    be suitable for today's compilers ?

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Fri Aug 29 14:13:10 2025
    On 8/29/2025 1:57 PM, Simon Clubley wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    But are you sure you want to do it this way?

    My understanding is that you want to do:

    source-(compiler on Linux)->.obj->(ld on Linux)->VMS .exe

    I would go for:

    source-(compiler on Linux)->.obj->(LINK on VMS)->VMS .exe

    I strongly suspect that will not work as the VMS linker may not
    have the features needed to link those .o files.

    If the .o files are not valid VMS .obj files, then it will
    not work.

    But the VMS Alpha target of gcc-as did generate valid
    VMS .obj files back in time.

    I don't see why anyone should have changed that since.

    Or if possible even better:

    source-(compiler on Linux)->.s-(GCC AS on VMS)->.obj-(LINK on VMS)->VMS .exe

    Er, why ? If you can get the BFD library working for VMS Alpha
    once again, that's the major problem sorted.

    Getting it working 100% may be a huge effort.

    Generating a text file and using the native tools on VMS
    seems much less risk and effort to me.

    GCC AS (version 2.8) is working on VMS Alpha.

    Also, what makes you think that the GNU gas of that era will still
    be suitable for today's compilers ?

    I would expect Alpha assembler to still be Alpha assembler.

    The instructions are obviously the same.

    And I find it unlikely that anyone has spend time the last 25
    years adding advanced macros and pseudo instructions to the
    Alpha assembler and the compiler.

    Given the status of Alpha.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Fri Aug 29 14:17:20 2025
    On 8/29/2025 2:11 PM, Simon Clubley wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    All the GCC ports to VMS I have seen (GCC 1.4x on VAX,
    GCC 2.8.x on Alpha and GNAT 2.8.x on Alpha) have used
    VMS linker. I suspect they have their reasons.

    AdaCore started with a cross compiler on Linux.

    But did they use ld on Linux or LINK on VMS?

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to arne@vajhoej.dk on Fri Aug 29 18:44:38 2025
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 2:11 PM, Simon Clubley wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    All the GCC ports to VMS I have seen (GCC 1.4x on VAX,
    GCC 2.8.x on Alpha and GNAT 2.8.x on Alpha) have used
    VMS linker. I suspect they have their reasons.

    AdaCore started with a cross compiler on Linux.

    But did they use ld on Linux or LINK on VMS?


    From what I remember, everything was pure GNU, including the use
    of binutils, or at least it was by the time I started becoming
    interested in this.

    It's possible however that earlier efforts did involve native VMS
    tools, but by the time I became interested in building binutils/gcc
    from source the standard approach appears to have been via binutils.

    Just had a quick look and there are patch emails online
    showing AdaCore working on binutils to add and extend VMS support.

    What I can't remember is if prior to this, AdaCore had their own
    private gcc/binutils branch and if they only started pushing into
    the public branches later on. I have some vague memories in this
    area, but it's been so long ago, I could simply be wrong.

    If anyone still has it installed, does the really old GNAT 3.11/3.12p
    use ld or the VMS linker ? I know they used gas, but what about the
    final link ?

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Fri Aug 29 14:44:06 2025
    On 8/29/2025 2:28 PM, Simon Clubley wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 1:57 PM, Simon Clubley wrote:

    Also, what makes you think that the GNU gas of that era will still
    be suitable for today's compilers ?

    I would expect Alpha assembler to still be Alpha assembler.


    And are you sure that VMS gas 2.8 will support all of the following:

    https://sourceware.org/binutils/docs/as/Pseudo-Ops.html

    (Those are just the current target-neutral directives).

    The instructions are obviously the same.

    And I find it unlikely that anyone has spend time the last 25
    years adding advanced macros and pseudo instructions to the
    Alpha assembler and the compiler.

    That's not where the problem is. You need to think at a higher level
    than that. Notice that I said today's compilers which may rely on
    underlying features not present in that old VMS Alpha version of gas.

    If some of those directives was not supported in GCC 2.8 as
    and those directives are actually generated by the compiler
    for the VMS Alpha target (because they are generated on all
    target or was added to Alpha target later for the benefit
    of other OS), then GCC 2.8 as will obviously not work.

    It may still be easier to hack the compiler to not use
    those than to reverse engineer LINK though.
    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to arne@vajhoej.dk on Fri Aug 29 18:28:21 2025
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 1:57 PM, Simon Clubley wrote:

    Also, what makes you think that the GNU gas of that era will still
    be suitable for today's compilers ?

    I would expect Alpha assembler to still be Alpha assembler.


    And are you sure that VMS gas 2.8 will support all of the following:

    https://sourceware.org/binutils/docs/as/Pseudo-Ops.html

    (Those are just the current target-neutral directives).

    The instructions are obviously the same.

    And I find it unlikely that anyone has spend time the last 25
    years adding advanced macros and pseudo instructions to the
    Alpha assembler and the compiler.


    That's not where the problem is. You need to think at a higher level
    than that. Notice that I said today's compilers which may rely on
    underlying features not present in that old VMS Alpha version of gas.

    Alpha is but one BFD target. Compilers do not talk to the VMS Alpha
    gas directly. The following may help you understand the overall flow:

    https://en.wikipedia.org/wiki/Binary_File_Descriptor_library

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to clubley@remove_me.eisner.decus.org- on Fri Aug 29 18:59:54 2025
    In article <108splv$24jsc$2@dont-email.me>,
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.


    A decade ago, I got as far as getting a simple C program for VMS Alpha
    to compile and link on Linux. Anything else more complicated than that
    (ie: other languages) failed and I suspect that either bits were missing
    from the public kits or the additional steps required were not obvious.

    I discussed this at length in comp.os.vms at the time. Anyone interested
    will have to rely on the notes I posted at the time as I have completely >forgotten the details of any of this (and have no motivation to get back
    up to speed on them because my hobbies these days are very different and >because there's no longer a proper hobbyist licence for VMS Alpha).

    GNV got both ar and ld, but that does not help you.

    But are you sure you want to do it this way?

    My understanding is that you want to do:

    source-(compiler on Linux)->.obj->(ld on Linux)->VMS .exe

    I would go for:

    source-(compiler on Linux)->.obj->(LINK on VMS)->VMS .exe

    I strongly suspect that will not work as the VMS linker may not
    have the features needed to link those .o files.

    What features? Presumably the `.o` files generated are actually
    VMS `.OBJ` files. I suppose the compiler could generate generic
    ELF or COFF or a.out objects for Alpha, and then rely on GNU LD
    to do the right thing and convert them to a properly linked VMS
    executable, but that seems a rather roundabout way to go.

    Or if possible even better:

    source-(compiler on Linux)->.s-(GCC AS on VMS)->.obj-(LINK on VMS)->VMS .exe

    Er, why ? If you can get the BFD library working for VMS Alpha
    once again, that's the major problem sorted.

    GCC AS (version 2.8) is working on VMS Alpha.

    Also, what makes you think that the GNU gas of that era will still
    be suitable for today's compilers ?

    I'd be rather surprised if much had changed in that department.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Fri Aug 29 15:02:21 2025
    On 8/29/2025 2:44 PM, Simon Clubley wrote:
    If anyone still has it installed, does the really old GNAT 3.11/3.12p
    use ld or the VMS linker ? I know they used gas, but what about the
    final link ?

    I have Gnat 3.12p / GCC 2.8.1 installed.

    I think it uses LINK.

    <quote>
    $ gnat make
    List of available qualifiers and options

    GNAT MAKE file /qualifiers (includes COMPILE /qualifiers)
    gnatmake
    ...
    /LINKER_QUALIFIERS (switches for LINK) -largs switches
    ...
    </quote>

    It mentions LINK.

    <quote>
    $ gnat make hello /verbose

    GNATMAKE 3.12p (19990629) Copyright 1995-1999 Free Software Foundation,
    Inc.
    "hello.ali" being checked ...
    -> "hello.ali" missing.
    gcc -c hello.adb
    gnatbind -x hello.ali
    gnatlink hello.ali
    GNU:[LIB]CRT0.OBJ
    DISK2:[ARNE]B$HELLO.OBJ
    DISK2:[]HELLO.OBJ
    GNU:[LIB.OPENVMS7_1.2_8_1.DECLIB]LIBDECGNAT.OLB/library GNU:[LIB.OPENVMS7_1.2_8_1.ADALIB]LIBGNAT.EXE/shareable GNU:[LIB]LIBGCC.OLB/library
    sys$library:vaxcrtltx.olb/library
    GNU:[LIB]LIBGCC.OLB/library
    </quote>

    That looks very much like VMS LINK option format.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to arne@vajhoej.dk on Fri Aug 29 19:10:05 2025
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 2:44 PM, Simon Clubley wrote:
    If anyone still has it installed, does the really old GNAT 3.11/3.12p
    use ld or the VMS linker ? I know they used gas, but what about the
    final link ?

    I have Gnat 3.12p / GCC 2.8.1 installed.

    I think it uses LINK.

    <quote>
    $ gnat make
    List of available qualifiers and options

    GNAT MAKE file /qualifiers (includes COMPILE /qualifiers)
    gnatmake
    ...
    /LINKER_QUALIFIERS (switches for LINK) -largs switches
    ...
    </quote>

    It mentions LINK.


    Interesting thanks. Does the "ld" binary exist in whatever the binutils executables directory is ?

    If it does, and you run it as a foreign command with "--help", what
    output do you get ?

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Fri Aug 29 15:14:25 2025
    On 8/29/2025 3:10 PM, Simon Clubley wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 2:44 PM, Simon Clubley wrote:
    If anyone still has it installed, does the really old GNAT 3.11/3.12p
    use ld or the VMS linker ? I know they used gas, but what about the
    final link ?

    I have Gnat 3.12p / GCC 2.8.1 installed.

    I think it uses LINK.

    <quote>
    $ gnat make
    List of available qualifiers and options

    GNAT MAKE file /qualifiers (includes COMPILE /qualifiers)
    gnatmake
    ...
    /LINKER_QUALIFIERS (switches for LINK) -largs switches
    ...
    </quote>

    It mentions LINK.


    Interesting thanks. Does the "ld" binary exist in whatever the binutils executables directory is ?

    If it does, and you run it as a foreign command with "--help", what
    output do you get ?

    Nothing with ld.

    $ dir gnu:[bin]

    Directory GNU:[BIN]

    AS.EXE;10 ASISTANT.EXE;1 GCC.EXE;1 GNAT.EXE;1 GNATBIND.EXE;1 GNATBL.EXE;1 GNATCHOP.EXE;2 GNATELIM.EXE;1 GNATFIND.EXE;1 GNATKR.EXE;1 GNATLBR.EXE;1 GNATLINK.EXE;1 GNATLS.EXE;1 GNATMAKE.EXE;1 GNATMEM.EXE;1 GNATPREP.EXE;1 GNATPSTA.EXE;1 GNATPSYS.EXE;1 GNATSTUB.EXE;1 GNATXREF.EXE;1 MAKE.EXE;260 OPENVMS7_1-GCC.EXE;1 SET_EXE.COM;11

    $ dir gnu:[bin]*ld*.*
    %DIRECT-W-NOFILES, no files found

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Cross@21:1/5 to Waldek Hebisch on Fri Aug 29 19:28:38 2025
    In article <108sp9v$1a4ae$2@paganini.bofh.team>,
    Waldek Hebisch <antispam@fricas.org> wrote:
    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    In article <108sckg$19hcn$1@paganini.bofh.team>,
    Waldek Hebisch <antispam@fricas.org> wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    There is a BFD backend for VMS on Alpha in the main binutils
    branch in git, but it is not clear to me how well-tested or
    generally maintained it is, nor how compatibile with the
    standard VMS utilities it ever was; I suspect it existed
    primarily to port GNU software to VMS.

    What, exactly, are you trying to do?

    Well, this is part of bigger rather poorly defined project. ATM
    I trying to compile gcc-15.1.

    That's a pretty big project in itself. I expect, as others have
    noted and I mentioned earlier, that the port to VMS has fallen
    into disrepair. Getting it back up to snuff will likely be
    hard.

    I first build binutils, then I do

    ../gcc-15.1.0/configure --enable-languages=c,c++ --target=alpha-dec-vms --prefix=/sklad/usr
    make -j 7 > mlogg 2>&1

    There were earlier problems that I resolved. I have now trouble
    during linking of libgcc. Some problems went away after switch
    from binutils 2.43 to binutils 2.21. But now I get the following
    error:

    /sklad/usr/alpha-dec-vms/bin/ld: -shared not supported

    That is 'ld' from binutils 2.21 says that it does not support
    '-shared'. Note that Makefile wants to create 'libgcc_s.exe',
    so it knows about VMS file extentions. In other words somebody
    at least tried to make it work.

    It definitely ran on VMS in the past. I don't think anyone has
    actively tried to remove VMS support. So it's very likely you
    are getting the vestigal remnants on that prior porting effort,
    along with a lot of what one might refer to as "soft" bugs; that
    is, things that are not outright _wrong_ in the code, but which
    exhibit incorrect behavior on VMS because no one has been
    actively maintaining the GCC VMS port.

    If you want more details I can provide them, but the message
    about '-shared' appears also when I attempt to build a
    different shared image:

    /sklad/usr/alpha-dec-vms/bin/ld -shared -o pop_poll.exe pop_poll.obj

    so the problem can be reproduced outside of gcc build.

    I mean, in a way the meaning of the message is obvious: that
    flag is not supported on the version of binutils you built for
    VMS. Merely getting confirmation of that is unlikely to yield
    much in the way of insightful new information, as it says it
    right on the tin.

    The more pressing question is *why* is the flag unsupported?
    Figure that out and you'll likely unlock the entire thing.

    - Dan C.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to All on Fri Aug 29 15:18:44 2025
    On 8/29/2025 3:14 PM, Arne Vajhøj wrote:
    On 8/29/2025 3:10 PM, Simon Clubley wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 2:44 PM, Simon Clubley wrote:
    If anyone still has it installed, does the really old GNAT 3.11/3.12p
    use ld or the VMS linker ? I know they used gas, but what about the
    final link ?

    I have Gnat 3.12p / GCC 2.8.1 installed.

    I think it uses LINK.

    <quote>
    $ gnat make
    List of available qualifiers and options

    GNAT MAKE file /qualifiers (includes COMPILE /qualifiers)
                                                          gnatmake
         ...
         /LINKER_QUALIFIERS (switches for LINK)           -largs switches
         ...
    </quote>

    It mentions LINK.


    Interesting thanks. Does the "ld" binary exist in whatever the binutils
    executables directory is ?

    If it does, and you run it as a foreign command with "--help", what
    output do you get ?

    Nothing with ld.

    $ dir gnu:[bin]

    Directory GNU:[BIN]

    AS.EXE;10           ASISTANT.EXE;1      GCC.EXE;1           GNAT.EXE;1
    GNATBIND.EXE;1      GNATBL.EXE;1        GNATCHOP.EXE;2      GNATELIM.EXE;1
    GNATFIND.EXE;1      GNATKR.EXE;1        GNATLBR.EXE;1       GNATLINK.EXE;1
    GNATLS.EXE;1        GNATMAKE.EXE;1      GNATMEM.EXE;1       GNATPREP.EXE;1
    GNATPSTA.EXE;1      GNATPSYS.EXE;1      GNATSTUB.EXE;1      GNATXREF.EXE;1
    MAKE.EXE;260        OPENVMS7_1-GCC.EXE;1                    SET_EXE.COM;11

    $ dir gnu:[bin]*ld*.*
    %DIRECT-W-NOFILES, no files found

    $ link=="XXXX"
    $ link
    %DCL-W-IVVERB, unrecognized command verb - check validity and spelling
    \XXXX\
    $ gnat make hello
    gcc -c hello.adb
    gnatbind -x hello.ali
    gnatlink hello.ali
    %DCL-W-IVVERB, unrecognized command verb - check validity and spelling
    \XXXX\
    gnatmake: *** link failed.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Waldek Hebisch on Sat Aug 30 16:55:23 2025
    On 8/29/2025 1:50 PM, Waldek Hebisch wrote:
    There were earlier problems that I resolved. I have now trouble
    during linking of libgcc. Some problems went away after switch
    from binutils 2.43 to binutils 2.21. But now I get the following
    error:

    /sklad/usr/alpha-dec-vms/bin/ld: -shared not supported

    That is 'ld' from binutils 2.21 says that it does not support
    '-shared'. Note that Makefile wants to create 'libgcc_s.exe',
    so it knows about VMS file extentions. In other words somebody
    at least tried to make it work.

    If you want more details I can provide them, but the message
    about '-shared' appears also when I attempt to build a
    different shared image:

    /sklad/usr/alpha-dec-vms/bin/ld -shared -o pop_poll.exe pop_poll.obj

    so the problem can be reproduced outside of gcc build.

    https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/vms-alpha.c;h=c4b248494ee624f7b1d6acbf45065469cda7c682;hb=HEAD

    says:

    <quote>
    /* vms.c -- BFD back-end for EVAX (openVMS/Alpha) files.
    Copyright (C) 1996-2025 Free Software Foundation, Inc.

    Initial version written by Klaus Kaempf (kkaempf@rmi.de)
    Major rewrite by Adacore.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA. */

    /* TODO:
    o overlayed sections
    o PIC
    o Generation of shared image
    o Relocation optimizations
    o EISD for the stack
    o Vectors isect
    o 64 bits sections
    o Entry point
    o LIB$INITIALIZE
    o protected sections (for messages)
    ...
    */
    </quote>

    It is on the TODO list.

    Which of course does not help you much.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Sat Aug 30 17:09:21 2025
    On 8/29/2025 1:57 PM, Simon Clubley wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.


    A decade ago, I got as far as getting a simple C program for VMS Alpha
    to compile and link on Linux. Anything else more complicated than that
    (ie: other languages) failed and I suspect that either bits were missing
    from the public kits or the additional steps required were not obvious.

    I discussed this at length in comp.os.vms at the time. Anyone interested
    will have to rely on the notes I posted at the time as I have completely forgotten the details of any of this (and have no motivation to get back
    up to speed on them because my hobbies these days are very different and because there's no longer a proper hobbyist licence for VMS Alpha).

    I did the search:

    https://groups.google.com/g/comp.os.vms/c/KN9yqM7_8PU/m/T4xwyTz5A3oJ

    https://groups.google.com/g/comp.os.vms/c/S7-VwQmmOZU/m/LXQ2TrbCBAAJ

    https://groups.google.com/g/comp.os.vms/c/oSNzXLKeu4o/m/8Tq5dIFaDAAJ

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to arne@vajhoej.dk on Sun Aug 31 02:05:24 2025
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 1:32 PM, Waldek Hebisch wrote:
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.

    GNV got both ar and ld, but that does not help you.

    Where are the sources? Working sources certainly would help.

    There are the SourceForge version of GNV and there is the
    VSI version of GNV.

    The SF version is here:

    https://sourceforge.net/p/gnv/ld_tools/ci/default/tree/reference/ld_tools/

    Thanks. AFAICS main work is done by VMS binaries, so it does not
    help in my immediate problem, but it contains interesting information.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to Simon Clubley on Sun Aug 31 02:35:52 2025
    Simon Clubley <clubley@remove_me.eisner.decus.org-earth.ufp> wrote:
    On 2025-08-29, Waldek Hebisch <antispam@fricas.org> wrote:
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.

    GNV got both ar and ld, but that does not help you.

    Where are the sources? Working sources certainly would help.


    Aren't they simply wrappers around the native VMS utilities ?

    Unfortunately yes.

    But are you sure you want to do it this way?

    My understanding is that you want to do:

    source-(compiler on Linux)->.obj->(ld on Linux)->VMS .exe

    I would go for:

    source-(compiler on Linux)->.obj->(LINK on VMS)->VMS .exe

    That is plan B. Working binutils would be simpler because
    I could use existing automated process.


    Binutils worked at one time because I was able to do the whole
    sequence, including generating the final C VMS executable, on Linux.

    Thanks, good to know this.

    Actually, ATM I getting errors during gcc build. I can use
    crude workaround to go further, but I am affraid that to get
    working compiler I need either working binutils or to examine
    all build steps involving binutils and do equvalent work in
    different way.


    That's where I gave up. I either didn't understand the required
    VMS-specific build steps or there were bits missing from the public
    source kits.

    There are missing pieces, build needs VMS header files and libraries.
    If those pieces are incomplete, then configuration may go wrong
    and lead to trobles later.

    Currently I have fairly incomplete set of header files, so I expect
    trouble due to this. OTOH libgcc seem to compile fine, so C
    compiler probably will work. I worked around trouble with
    shared images by configuring gcc with '--disable-shared',
    suboptimal but must do for now.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to arne@vajhoej.dk on Mon Sep 1 12:49:32 2025
    On 2025-08-30, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 1:57 PM, Simon Clubley wrote:

    A decade ago, I got as far as getting a simple C program for VMS Alpha
    to compile and link on Linux. Anything else more complicated than that
    (ie: other languages) failed and I suspect that either bits were missing
    from the public kits or the additional steps required were not obvious.

    I discussed this at length in comp.os.vms at the time. Anyone interested
    will have to rely on the notes I posted at the time as I have completely
    forgotten the details of any of this (and have no motivation to get back
    up to speed on them because my hobbies these days are very different and
    because there's no longer a proper hobbyist licence for VMS Alpha).

    I did the search:

    https://groups.google.com/g/comp.os.vms/c/KN9yqM7_8PU/m/T4xwyTz5A3oJ

    https://groups.google.com/g/comp.os.vms/c/S7-VwQmmOZU/m/LXQ2TrbCBAAJ

    https://groups.google.com/g/comp.os.vms/c/oSNzXLKeu4o/m/8Tq5dIFaDAAJ


    Yeah, there's useful stuff in the above that I had completely forgotten
    about. It looks like 2017 was a _really_ busy year for me, both at the
    start and the end of the year. :-)

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Waldek Hebisch on Mon Sep 1 13:00:59 2025
    On 2025-08-30, Waldek Hebisch <antispam@fricas.org> wrote:
    Simon Clubley <clubley@remove_me.eisner.decus.org-earth.ufp> wrote:

    That's where I gave up. I either didn't understand the required
    VMS-specific build steps or there were bits missing from the public
    source kits.

    There are missing pieces, build needs VMS header files and libraries.
    If those pieces are incomplete, then configuration may go wrong
    and lead to trobles later.

    Currently I have fairly incomplete set of header files, so I expect
    trouble due to this. OTOH libgcc seem to compile fine, so C
    compiler probably will work. I worked around trouble with
    shared images by configuring gcc with '--disable-shared',
    suboptimal but must do for now.


    If you look at the links Arne posted, you will see I took across to
    Linux the VMS-supplied header files inc addition to the libraries.
    According to those notes, it appears I also had to write patches
    for those headers.

    When I talked about bits missing, I wasn't thinking about the headers
    and libraries. Given that Adacore didn't start using Newlib or something similar to support VMS, that was pretty much expected.

    I was thinking more about bits missing within the compiler or binutils
    itself, especially given the crashes I had with Fortran. I was wondering
    if, for example, there are bits missing in the image initialisation
    sequence, along with other similar types of missing bits.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to arne@vajhoej.dk on Mon Sep 1 18:07:50 2025
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 1:57 PM, Simon Clubley wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.


    A decade ago, I got as far as getting a simple C program for VMS Alpha
    to compile and link on Linux. Anything else more complicated than that
    (ie: other languages) failed and I suspect that either bits were missing
    from the public kits or the additional steps required were not obvious.

    I discussed this at length in comp.os.vms at the time. Anyone interested
    will have to rely on the notes I posted at the time as I have completely
    forgotten the details of any of this (and have no motivation to get back
    up to speed on them because my hobbies these days are very different and
    because there's no longer a proper hobbyist licence for VMS Alpha).

    I did the search:

    https://groups.google.com/g/comp.os.vms/c/KN9yqM7_8PU/m/T4xwyTz5A3oJ

    https://groups.google.com/g/comp.os.vms/c/S7-VwQmmOZU/m/LXQ2TrbCBAAJ

    https://groups.google.com/g/comp.os.vms/c/oSNzXLKeu4o/m/8Tq5dIFaDAAJ

    Thanks, I have read the posts. ATM I am at earlier stage than Simon.
    IIUC problems with binutils-27 should not affect me as I am currently
    using binutils 2.21.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Waldek Hebisch on Mon Sep 1 15:02:04 2025
    On 9/1/2025 2:33 PM, Waldek Hebisch wrote:
    Simon Clubley <clubley@remove_me.eisner.decus.org-earth.ufp> wrote:
    When I talked about bits missing, I wasn't thinking about the headers
    and libraries. Given that Adacore didn't start using Newlib or something
    similar to support VMS, that was pretty much expected.

    I was thinking more about bits missing within the compiler or binutils
    itself, especially given the crashes I had with Fortran. I was wondering
    if, for example, there are bits missing in the image initialisation
    sequence, along with other similar types of missing bits.

    Do you have any indications that gcc Fortran or C++ worked on VMS say 25 years ago? Presumably Ada Core cared mostly about Ada. To build Ada compiler they needed to build C compiler first. I do not know if they
    ever supported on VMS gcc version recent enough to require C++ to build.
    If C++ and/or Fortran was never supported, then missing pieces in runtime support are expected. Also, there may be new pieces of platform support needed by newer compiler versions, that nobody bothered to add for VMS.

    C and C++ worked in 1.4x on VAX and 2.8.x on Alpha.

    The first I remember. I used it pretty extensively.

    The second I can demo:

    $ type hello.c
    #include <stdio.h>

    int main()
    {
    printf("Hello world from C!\n");
    return 0;
    }
    $ gcc hello.c
    $ gcclink hello
    $ r hello
    Hello world from C!

    and:

    $ type hello.cc
    #include <iostream.h>

    int main()
    {
    cout << "Hello world from C++!" << endl;
    return 0;
    }
    $ gxx hello.cc
    $ gxxlink hello
    $ r hello
    Hello world from C++!

    ProGIS tried to make a business out of GCC and GXX on VMS. I don't
    think that ever turned profitable.

    I don't think I ever say G77 on VMS (back then it was G77 not GFortran).

    Also note that C++ back then was before C++98 and the language and
    runtime was not quite as well defined.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to All on Mon Sep 1 15:06:46 2025
    On 9/1/2025 3:02 PM, Arne Vajhøj wrote:
    C and C++ worked in 1.4x on VAX and 2.8.x on Alpha.

    The first I remember. I used it pretty extensively.

    The second I can demo:

    I believe that both the 1.4x and 2.8.x stuff made it
    to DECUS LT tapes.

    There is a copy of the 2.8.x Alpha stuff here:
    https://www.vajhoej.dk/arne/vmsstuff/gccbeta/

    It is the original with a few changes to COM files
    (and maybe OPT files) back then to make it work better
    and a few changes to COM files later to accomodate
    newer VMS versions.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to Simon Clubley on Mon Sep 1 18:33:38 2025
    Simon Clubley <clubley@remove_me.eisner.decus.org-earth.ufp> wrote:
    On 2025-08-30, Waldek Hebisch <antispam@fricas.org> wrote:
    Simon Clubley <clubley@remove_me.eisner.decus.org-earth.ufp> wrote:

    That's where I gave up. I either didn't understand the required
    VMS-specific build steps or there were bits missing from the public
    source kits.

    There are missing pieces, build needs VMS header files and libraries.
    If those pieces are incomplete, then configuration may go wrong
    and lead to trobles later.

    Currently I have fairly incomplete set of header files, so I expect
    trouble due to this. OTOH libgcc seem to compile fine, so C
    compiler probably will work. I worked around trouble with
    shared images by configuring gcc with '--disable-shared',
    suboptimal but must do for now.


    If you look at the links Arne posted, you will see I took across to
    Linux the VMS-supplied header files inc addition to the libraries.
    According to those notes, it appears I also had to write patches
    for those headers.

    I saw Arne message only after writing message above. My approach
    differs, namely I use headers that I created. They have minimal
    content, basically what is needed to compile libgcc and a few other
    things. ATM I am working at creating needed libraries. My
    understanding is that for linking purposes I do not need any real
    code in the libraries, just function names (in correct order).

    I hoped that linking could be done without any libraries (this is
    possible on most platforms), but VMS ld in binutils insists on having
    libraries and up to now I have no work around for this.

    When I talked about bits missing, I wasn't thinking about the headers
    and libraries. Given that Adacore didn't start using Newlib or something similar to support VMS, that was pretty much expected.

    I was thinking more about bits missing within the compiler or binutils itself, especially given the crashes I had with Fortran. I was wondering
    if, for example, there are bits missing in the image initialisation
    sequence, along with other similar types of missing bits.

    Do you have any indications that gcc Fortran or C++ worked on VMS say 25
    years ago? Presumably Ada Core cared mostly about Ada. To build Ada
    compiler they needed to build C compiler first. I do not know if they
    ever supported on VMS gcc version recent enough to require C++ to build.
    If C++ and/or Fortran was never supported, then missing pieces in runtime support are expected. Also, there may be new pieces of platform support
    needed by newer compiler versions, that nobody bothered to add for VMS.

    BTW: I compared VMS specific headers in binutils-2.21 and binutils-2.43.
    They are the same, except for some comment changes. OTOH headers seem
    to match reasonably well with file structure.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Clubley@21:1/5 to Waldek Hebisch on Mon Sep 1 21:00:44 2025
    On 2025-09-01, Waldek Hebisch <antispam@fricas.org> wrote:
    Simon Clubley <clubley@remove_me.eisner.decus.org-earth.ufp> wrote:
    When I talked about bits missing, I wasn't thinking about the headers
    and libraries. Given that Adacore didn't start using Newlib or something
    similar to support VMS, that was pretty much expected.

    I was thinking more about bits missing within the compiler or binutils
    itself, especially given the crashes I had with Fortran. I was wondering
    if, for example, there are bits missing in the image initialisation
    sequence, along with other similar types of missing bits.

    Do you have any indications that gcc Fortran or C++ worked on VMS say 25 years ago? Presumably Ada Core cared mostly about Ada. To build Ada compiler they needed to build C compiler first. I do not know if they
    ever supported on VMS gcc version recent enough to require C++ to build.
    If C++ and/or Fortran was never supported, then missing pieces in runtime support are expected. Also, there may be new pieces of platform support needed by newer compiler versions, that nobody bothered to add for VMS.


    I do not know about Fortran, but C++ used to work IIRC, and Arne
    appears to be confirming that as well. I cannot remember if I tried
    C++ but I have a vague memory I did and had similar problems to Fortran,
    but it's long enough ago that I may be wrong about that.

    The other reason I suspect things might be missing or may have an
    unusual build sequence I am not aware of is because I could not get
    the Ada compiler itself to build.

    Simon.

    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Simon Clubley on Mon Sep 1 18:47:18 2025
    On 9/1/2025 5:00 PM, Simon Clubley wrote:
    On 2025-09-01, Waldek Hebisch <antispam@fricas.org> wrote:
    Simon Clubley <clubley@remove_me.eisner.decus.org-earth.ufp> wrote:
    When I talked about bits missing, I wasn't thinking about the headers
    and libraries. Given that Adacore didn't start using Newlib or something >>> similar to support VMS, that was pretty much expected.

    I was thinking more about bits missing within the compiler or binutils
    itself, especially given the crashes I had with Fortran. I was wondering >>> if, for example, there are bits missing in the image initialisation
    sequence, along with other similar types of missing bits.

    Do you have any indications that gcc Fortran or C++ worked on VMS say 25
    years ago? Presumably Ada Core cared mostly about Ada. To build Ada
    compiler they needed to build C compiler first. I do not know if they
    ever supported on VMS gcc version recent enough to require C++ to build.
    If C++ and/or Fortran was never supported, then missing pieces in runtime
    support are expected. Also, there may be new pieces of platform support
    needed by newer compiler versions, that nobody bothered to add for VMS.

    I do not know about Fortran, but C++ used to work IIRC, and Arne
    appears to be confirming that as well. I cannot remember if I tried
    C++ but I have a vague memory I did and had similar problems to Fortran,
    but it's long enough ago that I may be wrong about that.

    Note that the 2.8.x stuff used VMS LINK.

    $ gccl*ink :== @gccbetadir:[000000]gcclink.com
    $ gxxl*ink :== @gccbetadir:[000000]gxxlink.com

    gcclink.com:

    $ link 'p1', -
    gnu_cc_library:libgcc.olb/library, -
    gnu_cc_library:crt0.obj
    $ exit

    gxxlink.com:

    $ if p2 .eqs. ""
    $ then
    $ link/exe='f$parse(p1,,,"NAME")' gnu_cc_library:crtbegin.obj, -
    'f$parse(p1,"sys$disk:[].obj")', -
    gnu_cc_library:libstdcxx.olb/lib, -
    gnu_cc_library:libgccplus.olb/lib, -
    gnu_cc_library:libgxx.olb/lib, -
    gnu_cc_library:libgcc.olb/lib, -
    gnu_cc_library:crtend.obj, -
    sys$library:vaxcrtl.olb/lib, -
    gnu_cc_library:gxx_main.obj
    $ else
    $ link/exe='f$parse(p1,,,"NAME")' gnu_cc_library:crtbegin.obj, -
    'f$parse(p1,"sys$disk:[].obj")', -
    'p2'/lib,-
    gnu_cc_library:libstdcxx.olb/lib, -
    gnu_cc_library:libgccplus.olb/lib, -
    gnu_cc_library:libgxx.olb/lib, -
    gnu_cc_library:libgcc.olb/lib, -
    gnu_cc_library:crtend.obj, -
    sys$library:vaxcrtl.olb/lib, -
    gnu_cc_library:gxx_main.obj
    $ endif
    $ exit

    The C++ link needed many more pieces than the C link.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to arne@vajhoej.dk on Tue Sep 2 12:59:08 2025
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 1:57 PM, Simon Clubley wrote:
    On 2025-08-29, Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 10:14 AM, Waldek Hebisch wrote:
    I wonder if anybody is using GNU binutils targeting VMS. I am
    trying to set up toolchain for cross-compilation (from Linux) to
    Alpha VMS. Trying reasonably recent (2.43 and 2.39) binutils I
    get errors suggesting serious brokennes, for example when I use
    'ar' to create a library and later extract a member I get changed
    file and 'objdump' says that extracted file is malformed.

    I am now trying binutils 2.21 and apparently they do not have the
    problem above. But I see some weirdness and apparently '-shared'
    option (to create shared image) is not supported.

    I suspect very few try to build VMS executables on Linux.


    A decade ago, I got as far as getting a simple C program for VMS Alpha
    to compile and link on Linux. Anything else more complicated than that
    (ie: other languages) failed and I suspect that either bits were missing
    from the public kits or the additional steps required were not obvious.

    I discussed this at length in comp.os.vms at the time. Anyone interested
    will have to rely on the notes I posted at the time as I have completely
    forgotten the details of any of this (and have no motivation to get back
    up to speed on them because my hobbies these days are very different and
    because there's no longer a proper hobbyist licence for VMS Alpha).

    I did the search:

    https://groups.google.com/g/comp.os.vms/c/KN9yqM7_8PU/m/T4xwyTz5A3oJ

    https://groups.google.com/g/comp.os.vms/c/S7-VwQmmOZU/m/LXQ2TrbCBAAJ

    https://groups.google.com/g/comp.os.vms/c/oSNzXLKeu4o/m/8Tq5dIFaDAAJ

    I looked deeper at the last message (one with 8Tq5dIFaDAAJ at the end).
    The fix for PR 17512 is clearly wrong: 'struct vms_eihd' is deliberatly
    bigger than typical headers. Reverting this and similar fix for
    PR 21813 allows objdump from binutils-2.39 to disassemble VMS shared
    images with small header. However, cross binutils-2.39 can not read
    VMS object files, and any attempts at linking give result like:

    foo.obj: file not recognized: file format not recognized

    To summarize, cross binutils-2.21 have one bug known to me: 'ar' can
    not correctly extract '.obj' from a library. Apparently extracting
    file looses information about record length (that probably only affects
    cross ar, in native case probably RMS manages lengths).
    binutils-2.39 is affected by the second issue mentioned by Simon. '--disable-plugins' option to configure is not needed to get working
    objdump, but 'ar' from binutils-2.39 can not create libraries from VMS
    object files even after giving '--disable-plugins' to configure. binutils-2.43.1 seem behave in similar way to binutils-2.39.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Waldek Hebisch on Tue Sep 2 16:37:12 2025
    On 9/2/2025 8:59 AM, Waldek Hebisch wrote:
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 1:57 PM, Simon Clubley wrote:
    A decade ago, I got as far as getting a simple C program for VMS Alpha
    to compile and link on Linux. Anything else more complicated than that
    (ie: other languages) failed and I suspect that either bits were missing >>> from the public kits or the additional steps required were not obvious.

    I discussed this at length in comp.os.vms at the time. Anyone interested >>> will have to rely on the notes I posted at the time as I have completely >>> forgotten the details of any of this (and have no motivation to get back >>> up to speed on them because my hobbies these days are very different and >>> because there's no longer a proper hobbyist licence for VMS Alpha).

    I did the search:

    https://groups.google.com/g/comp.os.vms/c/KN9yqM7_8PU/m/T4xwyTz5A3oJ

    https://groups.google.com/g/comp.os.vms/c/S7-VwQmmOZU/m/LXQ2TrbCBAAJ

    https://groups.google.com/g/comp.os.vms/c/oSNzXLKeu4o/m/8Tq5dIFaDAAJ

    I looked deeper at the last message (one with 8Tq5dIFaDAAJ at the end).
    The fix for PR 17512 is clearly wrong: 'struct vms_eihd' is deliberatly bigger than typical headers. Reverting this and similar fix for
    PR 21813 allows objdump from binutils-2.39 to disassemble VMS shared
    images with small header. However, cross binutils-2.39 can not read
    VMS object files, and any attempts at linking give result like:

    foo.obj: file not recognized: file format not recognized
    VMS EXE is FIX 512, which is FTP binary friendly.

    VMS OBJ is VAR, which is not FTP binary friendly and FTP
    text will likely fuck up the file.

    I would:
    * $ SET FILE/ATTR=(RFM:FIX,MRS:512) on the OBJ file on VMS
    * FTP binary to Linux
    * see if objdump on Linux can recognize it

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From hb0815@21:1/5 to All on Tue Sep 2 23:22:40 2025
    On 9/2/25 22:37, Arne Vajhøj wrote:
    On 9/2/2025 8:59 AM, Waldek Hebisch wrote:
    ...
    I looked deeper at the last message (one with 8Tq5dIFaDAAJ at the end).
    The fix for PR 17512 is clearly wrong: 'struct vms_eihd' is deliberatly
    bigger than typical headers.  Reverting this and similar fix for
    PR 21813 allows objdump from binutils-2.39 to disassemble VMS shared
    images with small header.  However, cross binutils-2.39 can not read
    VMS object files, and any attempts at linking give result like:

    foo.obj: file not recognized: file format not recognized
    VMS EXE is FIX 512, which is FTP binary friendly.

    VMS OBJ is VAR, which is not FTP binary friendly and FTP
    text will likely fuck up the file.

    I would:
    * $ SET FILE/ATTR=(RFM:FIX,MRS:512) on the OBJ file on VMS
    * FTP binary to Linux
    * see if objdump on Linux can recognize it

    Check out with "objdump -i" if your objdump supports the VMS object
    format for Alpha.

    The one I installed from the distributions repository does not. You very
    likely have to rebuild objdump.

    Changing the file attributes or zipping the object file with "-V" will
    preserve the internal record structure. Works for me:

    $ ./gsdeobj -v m.obj
    GSD for OpenVMS/Alpha object files, V0.94
    EMH:
    name: M
    version: V1.0
    date: 15-AUG-2025 09:41
    LNM:
    VSI C V7.4-002
    Type Flags caPSIndx PSIndx Name
    PSECT P--r-SE------ 0 $CODE$
    PSECT P--r-S-R--N-- 1 $LITERAL$
    PSECT ---r---R----- 2 $LINK$
    PROCEDURE -D-R--N- 0 2 M
    UDFSYM -------- F
    UDFSYM -------- G
    EOM:
    total linkage pairs: 2
    completion code: 0x0
    SUCCESS
    transfer address flag: 0x1
    WEAK
    transfer address PSECT index: 2
    transfer address: 0x0
    Record summary:
    emh: 2, eom: 1, gsd: 2, tir: 2, dbg: 0, tbt: 4
    psc: 3, sym: 3
    Keys to PSECT flags:
    P - PIC, position independent L - LIB, from shareable image
    O - OVR, overlaid allocation r - REL, relocatable
    G - GBL, global S - SHR, shareable
    E - EXE, executable R - RD, readable
    W - WRT, writeable V - VEC, vector
    N - NOMOD, not stored into C - COM, allocation for common symbol
    A - ALLOC_64BIT, allocate in 64-bit space
    Keys to symbol flags:
    W - WEAK, weak D - DEF, definition
    U - UNI, universal R - REL, relocatable
    C - COMM, common V - VECEP, vectored entry point
    N - NORM, procedure Q - QUAD_VAL, value is 64 bits
    $

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Townley@21:1/5 to All on Tue Sep 2 23:14:48 2025
    On 02/09/2025 21:37, Arne Vajhøj wrote:

    VMS OBJ is VAR, which is not FTP binary friendly and FTP
    text will likely fuck up the file.

    Arne

    I trust that is a technical term ;)

    --
    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Waldek Hebisch on Tue Sep 2 19:03:37 2025
    On 9/2/2025 6:30 PM, Waldek Hebisch wrote:
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 9/2/2025 8:59 AM, Waldek Hebisch wrote:
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 1:57 PM, Simon Clubley wrote:
    A decade ago, I got as far as getting a simple C program for VMS Alpha >>>>> to compile and link on Linux. Anything else more complicated than that >>>>> (ie: other languages) failed and I suspect that either bits were missing >>>>> from the public kits or the additional steps required were not obvious. >>>>>
    I discussed this at length in comp.os.vms at the time. Anyone interested >>>>> will have to rely on the notes I posted at the time as I have completely >>>>> forgotten the details of any of this (and have no motivation to get back >>>>> up to speed on them because my hobbies these days are very different and >>>>> because there's no longer a proper hobbyist licence for VMS Alpha).

    I did the search:

    https://groups.google.com/g/comp.os.vms/c/KN9yqM7_8PU/m/T4xwyTz5A3oJ

    https://groups.google.com/g/comp.os.vms/c/S7-VwQmmOZU/m/LXQ2TrbCBAAJ

    https://groups.google.com/g/comp.os.vms/c/oSNzXLKeu4o/m/8Tq5dIFaDAAJ

    I looked deeper at the last message (one with 8Tq5dIFaDAAJ at the end).
    The fix for PR 17512 is clearly wrong: 'struct vms_eihd' is deliberatly
    bigger than typical headers. Reverting this and similar fix for
    PR 21813 allows objdump from binutils-2.39 to disassemble VMS shared
    images with small header. However, cross binutils-2.39 can not read
    VMS object files, and any attempts at linking give result like:

    foo.obj: file not recognized: file format not recognized
    VMS EXE is FIX 512, which is FTP binary friendly.

    VMS OBJ is VAR, which is not FTP binary friendly and FTP
    text will likely fuck up the file.

    I would:
    * $ SET FILE/ATTR=(RFM:FIX,MRS:512) on the OBJ file on VMS
    * FTP binary to Linux
    * see if objdump on Linux can recognize it

    I di this before writing my previous message. objdump from
    binutils-2.21 recognizes both files produced by gas from binutils-2.21
    and file transferred from VMS (after doing what you wrote). After transfering .obj file produced by binutils-2.21 from Linux to
    VMS (which was tricky) ANALYZE said that it constins no
    errors. Transferring was tricky, becuse transfer via scp gave
    fixed 512 bytes blocks. Doing SET FILE/ATTR=RFM:VAR resulted in
    null padding at the end and ANALYZE were complaining about
    empty records (but no other errors). zipping .obj file, transfering
    that to VMS gave streamlf file. Doing SET FILE/ATTR=RFM:VAR on
    this file apparently worked. But zip treating it as text file
    can potentially mangle it, so I am looking for better method.

    I think I would go for:
    * FTP binary from Linux to VMS
    * SET FILE/ATTR=RFM:VAR on it

    And if padding gives problems, then:
    * SET FILE/ATTR=(EFBLK:n,FFB:m) on it

    Anyway, objdump from binutils-2.39 can not recognize .obj files
    produced by gas from binutils-2.21 (which due to tests above I
    believe have correct format). Also, using gas from binutils-2.39
    or binutils-2.43 I get similar results. In other words,
    objdump from binutils-2.21 recoginzes .obj files regardless of
    source (tranferred from VMS or made by gas from any binutils).
    objdump from later binutils does not recognize .obj files
    from above mentioned sources.

    VMS Alpha support missing in newer versions??

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to arne@vajhoej.dk on Tue Sep 2 22:30:35 2025
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 9/2/2025 8:59 AM, Waldek Hebisch wrote:
    Arne Vajhøj <arne@vajhoej.dk> wrote:
    On 8/29/2025 1:57 PM, Simon Clubley wrote:
    A decade ago, I got as far as getting a simple C program for VMS Alpha >>>> to compile and link on Linux. Anything else more complicated than that >>>> (ie: other languages) failed and I suspect that either bits were missing >>>> from the public kits or the additional steps required were not obvious. >>>>
    I discussed this at length in comp.os.vms at the time. Anyone interested >>>> will have to rely on the notes I posted at the time as I have completely >>>> forgotten the details of any of this (and have no motivation to get back >>>> up to speed on them because my hobbies these days are very different and >>>> because there's no longer a proper hobbyist licence for VMS Alpha).

    I did the search:

    https://groups.google.com/g/comp.os.vms/c/KN9yqM7_8PU/m/T4xwyTz5A3oJ

    https://groups.google.com/g/comp.os.vms/c/S7-VwQmmOZU/m/LXQ2TrbCBAAJ

    https://groups.google.com/g/comp.os.vms/c/oSNzXLKeu4o/m/8Tq5dIFaDAAJ

    I looked deeper at the last message (one with 8Tq5dIFaDAAJ at the end).
    The fix for PR 17512 is clearly wrong: 'struct vms_eihd' is deliberatly
    bigger than typical headers. Reverting this and similar fix for
    PR 21813 allows objdump from binutils-2.39 to disassemble VMS shared
    images with small header. However, cross binutils-2.39 can not read
    VMS object files, and any attempts at linking give result like:

    foo.obj: file not recognized: file format not recognized
    VMS EXE is FIX 512, which is FTP binary friendly.

    VMS OBJ is VAR, which is not FTP binary friendly and FTP
    text will likely fuck up the file.

    I would:
    * $ SET FILE/ATTR=(RFM:FIX,MRS:512) on the OBJ file on VMS
    * FTP binary to Linux
    * see if objdump on Linux can recognize it

    I di this before writing my previous message. objdump from
    binutils-2.21 recognizes both files produced by gas from binutils-2.21
    and file transferred from VMS (after doing what you wrote). After
    transfering .obj file produced by binutils-2.21 from Linux to
    VMS (which was tricky) ANALYZE said that it constins no
    errors. Transferring was tricky, becuse transfer via scp gave
    fixed 512 bytes blocks. Doing SET FILE/ATTR=RFM:VAR resulted in
    null padding at the end and ANALYZE were complaining about
    empty records (but no other errors). zipping .obj file, transfering
    that to VMS gave streamlf file. Doing SET FILE/ATTR=RFM:VAR on
    this file apparently worked. But zip treating it as text file
    can potentially mangle it, so I am looking for better method.

    Anyway, objdump from binutils-2.39 can not recognize .obj files
    produced by gas from binutils-2.21 (which due to tests above I
    believe have correct format). Also, using gas from binutils-2.39
    or binutils-2.43 I get similar results. In other words,
    objdump from binutils-2.21 recoginzes .obj files regardless of
    source (tranferred from VMS or made by gas from any binutils).
    objdump from later binutils does not recognize .obj files
    from above mentioned sources.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence =?iso-8859-13?q?D=FFOlivei@21:1/5 to All on Wed Sep 3 00:13:37 2025
    On Tue, 2 Sep 2025 16:37:12 -0400, Arne Vajhøj wrote:

    VMS OBJ is VAR, which is not FTP binary friendly and FTP text will
    likely fuck up the file.

    No it won’t. The content is still intact, if you do a binary transfer. The problem is that VMS-based tools like the linker and librarian insist on
    going through RMS to deal with files, and RMS insists on using file
    attributes to govern the way it blocks and deblocks records. If those attributes are lost, then it just gives up.

    There’s no reason for Linux-based tools, say, to be so nitpicky and
    stupid. The VMS .OBJ file format is perfectly readable without the
    necessary record attributes. They are not conveying anything important.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to mw40171@mucweb.de on Tue Sep 2 23:37:27 2025
    hb0815 <mw40171@mucweb.de> wrote:
    On 9/2/25 22:37, Arne Vajhøj wrote:
    On 9/2/2025 8:59 AM, Waldek Hebisch wrote:
    ...
    I looked deeper at the last message (one with 8Tq5dIFaDAAJ at the end).
    The fix for PR 17512 is clearly wrong: 'struct vms_eihd' is deliberatly
    bigger than typical headers.  Reverting this and similar fix for
    PR 21813 allows objdump from binutils-2.39 to disassemble VMS shared
    images with small header.  However, cross binutils-2.39 can not read
    VMS object files, and any attempts at linking give result like:

    foo.obj: file not recognized: file format not recognized
    VMS EXE is FIX 512, which is FTP binary friendly.

    VMS OBJ is VAR, which is not FTP binary friendly and FTP
    text will likely fuck up the file.

    I would:
    * $ SET FILE/ATTR=(RFM:FIX,MRS:512) on the OBJ file on VMS
    * FTP binary to Linux
    * see if objdump on Linux can recognize it

    Check out with "objdump -i" if your objdump supports the VMS object
    format for Alpha.

    The one I installed from the distributions repository does not. You very likely have to rebuild objdump.

    Yes, I am using binutils compile for Alpha VMS. I configured it using
    the followng line:

    (CC=/sklad/kompi/gcc/pp/mygcc; ../binutils-2.21/configure --target=alpha-dec-vms --prefix=/sklad/usr)

    mygcc is a wrapper around gcc to replace '-Werror' by '-Wno-error'
    (otherwise compilation using modern gcc would fail due to new
    warnings being treated as errors).

    Changing the file attributes or zipping the object file with "-V" will preserve the internal record structure. Works for me:

    Thanks, works for me too.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to All on Tue Sep 2 20:35:54 2025
    On 9/2/2025 8:13 PM, Lawrence D’Oliveiro wrote:
    On Tue, 2 Sep 2025 16:37:12 -0400, Arne Vajhøj wrote:
    VMS OBJ is VAR, which is not FTP binary friendly and FTP text will
    likely fuck up the file.

    No it won’t. The content is still intact, if you do a binary transfer.

    No.

    The differences between VMS and *nix files can create
    weird situations.

    If you create a RFM VAR file on VMS with:

    A
    BB
    CCC

    then it is stored as:

    01 00 41 00
    02 00 42 42
    03 00 43 43 43 00

    When you do a binary FTP to Linux you end up with just 6 bytes:

    41 42 42 43 43 43

    With a binary FTP from VMS of a VAR file you get just the
    data bytes with no structure defining bytes at all.

    It works fine with FIX 512 files.

    (at least with standard FTP server)

    Arne

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