• Re: gno & orca

    From Christopher G. Mason@21:1/5 to Tom Thumb on Tue Nov 1 16:43:16 2022
    On 11/1/2022 4:37 PM, Tom Thumb wrote:
    As for 2.0.6, so, it installs orcacdefs and orcalib in /lib but also /lang/orca with empty languages, shell, utilities, libraries directories. I populated the shell, languages and utilities directories from 2.0.4 /ORCA.gno and left the libraries
    directory empty. I created an “alias cc /usr/bin/occ” and can create foo.c and compile it issuing “cc -o foo foo.c” and if it’s a simple hello world or uses %d in a printf works okay, compiles and runs. If I then use %f it will crash every time.
    I mean the replacements are appropriate for the given variables. The source in question is anexample from K&R that prints a Fahrenheit - Celsius table. It works everywhere but compiled under gno 2.0.6 so I moved and saved 2.0.6 /lib and replaced it with
    2.0.4 /library and now occ produces an exe that works, first tried replacing orcacdefs but that didn’t work.


    GNO/ME 2.0.6 has some broken C header files. I landed up finding fixes
    for various compile errors searching Usenet posts. Apparently these
    files were never fixed all these years.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tom Thumb@21:1/5 to All on Tue Nov 1 13:37:41 2022
    So I bought Gno/ME 2.0 in 1994, came with a hand written receipt for $89 and apparently I updated it to 2.0.4 though I don’t remember doing it; 28 years and I have trouble with yesterday; so now I see v2.0.6 and downloaded that and installed it as per
    instructions to /gno and /gno-hfs.

    I’m familiar with and use linux and mac os x terminal and prefer gno to orca shell but I have a problem using C. In gno 2.0.4 I’ll use vi to create foo.c but cant cmpl it because the subtype is set as txt. I don’t know how to set the language or
    set a file’s subtype with gno shell. I can run orca and “change foo.c cc” but that pretty much defeats the purpose of using gno. I feel I must have something setup wrong; 2.0/2.0.4 installer sets things up after answering yes to orca installed.

    As for 2.0.6, so, it installs orcacdefs and orcalib in /lib but also /lang/orca with empty languages, shell, utilities, libraries directories. I populated the shell, languages and utilities directories from 2.0.4 /ORCA.gno and left the libraries
    directory empty. I created an “alias cc /usr/bin/occ” and can create foo.c and compile it issuing “cc -o foo foo.c” and if it’s a simple hello world or uses %d in a printf works okay, compiles and runs. If I then use %f it will crash every time.
    I mean the replacements are appropriate for the given variables. The source in question is anexample from K&R that prints a Fahrenheit - Celsius table. It works everywhere but compiled under gno 2.0.6 so I moved and saved 2.0.6 /lib and replaced it with
    2.0.4 /library and now occ produces an exe that works, first tried replacing orcacdefs but that didn’t work.

    So now 2.0.6 “cc -o foo foo.c” works also “cmpl foo.c keep=foo” but I can’t accept that. 2.0.4’s orcalib is 59K and 2.0.6’s is 29k; 2.0.4 ORCAInclude is 156k, 2.0.6 154k and 2.0.4’s ORCADefs is 496k and 2.0.6’s orcadefs is 451k so there
    is a lot going on there.

    Anyone have any insight as how to properly setup gno 2.0.4 and 2.0.6, for use with orca/c? Preferably the latter but both would be nice or just any comments or thoughts.

    This works in 2.0.6 “out of box”
    #include <stdio.h>

    void main(void)
    {
    int x;
    x = 5;
    printf(“x = %d \n”, x);

    This does not but does after switching out 2.0.6 /lib for 2.0.4 /libraries (renamed to lib)
    void main(void)
    {
    float x;
    x = 5.56;
    printf(“x = %f \n”, x);

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tom Thumb@21:1/5 to Christopher G. Mason on Tue Nov 1 16:29:18 2022
    On Tuesday, November 1, 2022 at 4:44:16 PM UTC-4, Christopher G. Mason wrote:
    On 11/1/2022 4:37 PM, Tom Thumb wrote:
    As for 2.0.6, so, it installs orcacdefs and orcalib in /lib but also /lang/orca with empty languages, shell, utilities, libraries directories. I populated the shell, languages and utilities directories from 2.0.4 /ORCA.gno and left the libraries
    directory empty. I created an “alias cc /usr/bin/occ” and can create foo.c and compile it issuing “cc -o foo foo.c” and if it’s a simple hello world or uses %d in a printf works okay, compiles and runs. If I then use %f it will crash every time.
    I mean the replacements are appropriate for the given variables. The source in question is anexample from K&R that prints a Fahrenheit - Celsius table. It works everywhere but compiled under gno 2.0.6 so I moved and saved 2.0.6 /lib and replaced it with
    2.0.4 /library and now occ produces an exe that works, first tried replacing orcacdefs but that didn’t work.

    GNO/ME 2.0.6 has some broken C header files. I landed up finding fixes
    for various compile errors searching Usenet posts. Apparently these
    files were never fixed all these years.

    That will make it a bit difficult these days. Maybe I can find some stuff archived

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tom Thumb@21:1/5 to All on Tue Nov 1 18:12:00 2022
    I put everything back as it was and am going to follow the FAQs at gno.org. I had been there for another reason before. I should have looked at the orca/c centric stuff before blurting here and see what works out.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephen Heumann@21:1/5 to Tom Thumb on Thu Nov 3 17:48:42 2022
    On 2022-11-02 01:12:00 +0000, Tom Thumb said:

    I put everything back as it was and am going to follow the FAQs at
    gno.org. I had been there for another reason before. I should have
    looked at the orca/c centric stuff before blurting here and see what
    works out.

    Following the instructions in the FAQ should work, at least for ORCA/C
    2.1 or later on GNO 2.0.6. I would recommend just using the latest
    versions, and not trying to mix components from different ones.

    To change file types and languages on GNO, you can use the chtyp
    utility, e.g. "chtyp -lcc foo.c". As you noticed, occ will change the
    type automatically for C source files, although not for any headers
    they include.

    Also, there are some updates available for both GNO and ORCA/C. These
    are not needed to get started, but I would recommend them:

    GNO updates:
    https://github.com/ksherlock/gno/releases/latest

    ORCA/C updates:
    https://github.com/byteworksinc/ORCA-C/releases/latest

    Updated ORCALib for GNO (for use with updated ORCA/C): https://github.com/byteworksinc/ORCALib/releases/latest

    --
    Stephen Heumann

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tom Thumb@21:1/5 to stephen...@gmail.com on Thu Nov 3 19:41:09 2022
    On Thursday, November 3, 2022 at 6:48:44 PM UTC-4, stephen...@gmail.com wrote:

    Following the instructions in the FAQ should work, at least for ORCA/C
    2.1 or later on GNO 2.0.6. I would recommend just using the latest
    versions, and not trying to mix components from different ones.

    I followed the FAQ for gno 2.0.6 and orca/c 2.1.x:



    You must have the following libraries in the sequence given. You
    should not add any other libraries to this directory as it will
    slow down linking for all programs.

    /lib/libc (GNO v2.0.6) [rename to "nlibc" for HFS]
    /lib/lsaneglue (GNO v2.0.6) [renaem to "nlsaneglue" for HFS]
    /lib/OrcaLib (GNO v2.0.6)
    /lib/PasLib (ORCA/Pascal v2.1.x, required if and only if
    you use ORCA Pascal)
    /lib/SysFloat (GNO v2.0.6)
    /lib/SysLib (ORCA/C v2.1.x)

    <<

    And that works but I didn’t have lsaneglue anywhere and used the first one I found at:

    https://mirrors.apple2.org.za/ground.icaen.uiowa.edu/Mirrors/trenco/gno/base/v206.interim/beta.980324/libs.980324.shk

    I didn’t know all this work had been done and first thing I thought was how am I going to keep versions of libraries straight and compatabilities. Your post helps alot, I’ve been over to github and I’ll have to sort through all these new to me
    libraries, patches and updates.

    Orca compiled the Fahrenheit - Celsius table exe to about 6k, gno 2.0.4 about 10k and gno 2.0.6 to about 41k but maybe another libc version or libraries might cut that down. I had read somewhere the lack of optimization and the reasoning behind it.

    There’s a lot more there than I thought, it will take some time.

    And here I was just playing with my //e and plotting colored rectangles by reading the paddles. I seem to have come far afield.


    To change file types and languages on GNO, you can use the chtyp
    utility, e.g. "chtyp -lcc foo.c". As you noticed, occ will change the
    type automatically for C source files, although not for any headers
    they include.

    Also, there are some updates available for both GNO and ORCA/C. These
    are not needed to get started, but I would recommend them:

    GNO updates:
    https://github.com/ksherlock/gno/releases/latest

    ORCA/C updates:
    https://github.com/byteworksinc/ORCA-C/releases/latest

    Updated ORCALib for GNO (for use with updated ORCA/C): https://github.com/byteworksinc/ORCALib/releases/latest

    --
    Stephen Heumann

    Thank you so much for this!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From stephenheumann@gmail.com@21:1/5 to justliketom...@gmail.com on Fri Nov 4 18:03:38 2022
    On Thursday, November 3, 2022 at 9:41:11 PM UTC-5, justliketom...@gmail.com wrote:
    And that works but I didn’t have lsaneglue anywhere and used the first one I found at:

    https://mirrors.apple2.org.za/ground.icaen.uiowa.edu/Mirrors/trenco/gno/base/v206.interim/beta.980324/libs.980324.shk

    I think that version should be fine.

    I didn’t know all this work had been done and first thing I thought was how am I going to keep versions of libraries straight and compatabilities. Your post helps alot, I’ve been over to github and I’ll have to sort through all these new to me
    libraries, patches and updates.

    Once you have a working installation of ORCA/C 2.1 on GNO (which it sounds like you do now), the updates can basically be installed as follows:
    1. Copy GNO updates into the root directory of your GNO installation.
    2. Copy ORCA/C update into /lang/orca
    3. Copy updated ORCALib for GNO into /lib
    In each case, let the updates replace any older versions of the files they contain.

    Orca compiled the Fahrenheit - Celsius table exe to about 6k, gno 2.0.4 about 10k and gno 2.0.6 to about 41k but maybe another libc version or libraries might cut that down. I had read somewhere the lack of optimization and the reasoning behind it.

    GNO 2.0.6 has its own stdio implementation that is much larger than the ORCA one, which probably accounts for most of the size difference. It's kind of bloated, but not really much of a problem unless you have very limited memory or disk space.

    It is possible to use the stock ORCA/C libraries under GNO (by setting prefix 13 to point to them), but then you can't use the Unix-like library functions from GNO. To start with, it's probably best to use the normal GNO configuration with its versions
    of the libraries.

    --
    Stephen Heumann

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tom Thumb@21:1/5 to stephen...@gmail.com on Thu Nov 10 12:19:35 2022
    On Friday, November 4, 2022 at 9:03:40 PM UTC-4, stephen...@gmail.com wrote:

    Once you have a working installation of ORCA/C 2.1 on GNO (which it sounds like you do now), the updates can basically be installed as follows:
    1. Copy GNO updates into the root directory of your GNO installation.
    2. Copy ORCA/C update into /lang/orca
    3. Copy updated ORCALib for GNO into /lib
    In each case, let the updates replace any older versions of the files they contain.
    --
    Stephen Heumann

    I'm just posting to express my gratitude. Gno is well, Orca/C is well. I can go about trying to do what is I've been thinking of.

    I'm just really impressed at all the work and effort you've put in. Just the cc.notes.txt I've been looking over seems an enormous amount of work to me, and the porting and the bug fixes, so, thank you very much. If I were more talented I would try to
    lend a hand. As it is, I have much to learn of this environment to complete the task I've assigned myself.

    -- Mark Wade aka Tom

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