[plan9mod] C compilers?? - Plan9

This is a discussion on [plan9mod] C compilers?? - Plan9 ; Just installed Plan 9 from a plan9.iso CD image. However, once installed tried running cc but that did not result in it being found (nor 8c etc). Tried google'ing and looking at the Plan 9 site but have come up ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: [plan9mod] C compilers??

  1. [plan9mod] C compilers??

    Just installed Plan 9 from a plan9.iso CD image. However, once
    installed tried running cc but that did not result in it being found
    (nor 8c etc). Tried google'ing and looking at the Plan 9 site but
    have come up dry. This seems to easy, so I'm sure I'm missing
    something obvious. Please help. If there are any links to a download
    that'll be necessary please provide, thanks.


  2. Re: [9fans] [plan9mod] C compilers??

    qwertyp9q@gmail.com schrieb:
    > Just installed Plan 9 from a plan9.iso CD image. However, once
    > installed tried running cc but that did not result in it being found
    > (nor 8c etc). Tried google'ing and looking at the Plan 9 site but
    > have come up dry. This seems to easy, so I'm sure I'm missing
    > something obvious. Please help. If there are any links to a download
    > that'll be necessary please provide, thanks.
    >
    >
    >
    >

    Dear qwertyp9q,
    I was heavily beaten as I ascertained some lack of documentation for
    starters with plan9. (Write code - not mails! Plan 9 is for programmers
    only. Load it down and you have the whole bunch......etc.) But Michael
    A. Covington (Univ. of Georgia) sent me a link to his "A plan 9 Newbie's
    Guide" (many thanks to him). Follow this link
    http://plan9.escet.urjc.es/newbie-guide.pdf. There is an example on page 14:

    The names of the compiler and linker are dependent on the CPU
    architecture. For the 386 they are 8c and 8l (a lower case L!). In his
    example it goes like this:
    ~> 8c myprog.c
    ~> 8l -o myprog myprog.8
    ~> myprog
    .............
    As he points out, you do not have to write ./myprog, because in Plan 9
    the current directory is in the path by default.

    One might make a file mk, here for instance for a sparc machine:
    #mk_easy: the easy mkfile
    myprog.k: myprog.c myprog.h
    kc myprog.c
    myprog: myprog.k
    kl -o myprog myprog.k


    A more sophisticated way for different architectures to support seems to
    me a little batch mkfile roughly like this:

    #mk_noarch: architecture independent mkfile
    < /$objtype/mkfile
    $=O.myprog: myprog.$O
    $LD $CFLAGS -o $O.myprog myprog.$O
    myprog.$O: myprog.c myprog.h
    $CC myprog.c

    mk reads environmetal variables as macros and with the < that will be
    added in a mkfile. The varable objtype will be set to cputype as plan 9
    starts. One may change this easily to compile to another architecture.
    $O is a variable that will be initialized in /$objtype/mkfile. You may
    check the settings by
    ~> cat /$objtype/mkfile
    ........ here a list of will follow
    The variable CPUS will show the supported architectures.
    With this variable will be set the architecture dependencys
    automatically. A compilation for a sparc machine than goes like that:
    ~> mk -f mk_noarch
    kc myprog.c
    kl -o k.myprog myprog.k

    To compile this to another architecture one has to set objtype to the
    name of the architecture. For instance for a mips machine:
    ~> objtype=mips mk -f mk_noarch
    vc myprog.c
    vl -o v.myprog myprog.v


    Hope that helps for a good start! And have fun with the machine!

    BB






  3. Re: [9fans] [plan9mod] C compilers??

    bblochi - you failed to solve his problem. Instead you spat out an
    insane commentary on how to compile C programs, and the following both
    show his problem and show he figured out how to do it:

    On Jul 23, 2008, at 5:02 AM, qwertyp9q@gmail.com wrote:
    > did not result in it being found (nor 8c etc).


    quertyp9q - I'm sorry, but I don't know why your system came up dry.
    Try running

    /usr/glenda/bin/rc/pull

    and tell me if the binaries start appearing.

    To everyone - I'm writing a C programming tutorial. Perhaps THAT will
    make you happy, bblochi.



  4. Re: [9fans] [plan9mod] C compilers??

    Sorry, I did not meant to say insane. It's a good commentary, but was
    not the answer to his problem.

    On Jul 24, 2008, at 8:28 AM, Pietro Gagliardi wrote:

    > bblochi - you failed to solve his problem. Instead you spat out an
    > insane commentary on how to compile C programs, and the following
    > both show his problem and show he figured out how to do it:
    >
    > On Jul 23, 2008, at 5:02 AM, qwertyp9q@gmail.com wrote:
    >> did not result in it being found (nor 8c etc).

    >
    > quertyp9q - I'm sorry, but I don't know why your system came up dry.
    > Try running
    >
    > /usr/glenda/bin/rc/pull
    >
    > and tell me if the binaries start appearing.
    >
    > To everyone - I'm writing a C programming tutorial. Perhaps THAT
    > will make you happy, bblochi.
    >
    >




  5. Re: [9fans] [plan9mod] C compilers??

    Pietro Gagliardi schrieb:
    > Sorry, I did not meant to say insane. It's a good commentary, but was
    > not the answer to his problem.
    >
    > On Jul 24, 2008, at 8:28 AM, Pietro Gagliardi wrote:
    >
    >> bblochi - you failed to solve his problem. Instead you spat out an
    >> insane commentary on how to compile C programs, and the following
    >> both show his problem and show he figured out how to do it:
    >>
    >> On Jul 23, 2008, at 5:02 AM, qwertyp9q@gmail.com wrote:
    >>> did not result in it being found (nor 8c etc).

    >>
    >> quertyp9q - I'm sorry, but I don't know why your system came up dry.
    >> Try running
    >>
    >> /usr/glenda/bin/rc/pull
    >>
    >> and tell me if the binaries start appearing.
    >>
    >> To everyone - I'm writing a C programming tutorial. Perhaps THAT will
    >> make you happy, bblochi.
    >>
    >>

    >
    >
    >

    Thanks! You should forward your friendly comments to Michael A.
    Covington. May be he will correct his Newbie`s guide?

    Kind regards
    BB


    PS: There are many ways to R.I.P. an OS.


  6. Re: [9fans] [plan9mod] C compilers??

    On Jul 24, 2008, at 10:23 AM, bblochl@fh-lauitz.de wrote:

    > Thanks! You should forward your friendly comments to Michael A.
    > Covington. May be he will correct his Newbie`s guide?


    I thought those were YOUR words, not his.



  7. Re: [9fans] [plan9mod] C compilers??

    All right, let's stop this now. I had just waken up and was a bit
    tired when I wrote that. But I had a reason: you did not answer the
    question of why the system didn't have an 8c.

    sorry.



  8. Re: [9fans] [plan9mod] C compilers??

    Pietro Gagliardi schrieb:
    > All right, let's stop this now. I had just waken up and was a bit
    > tired when I wrote that. But I had a reason: you did not answer the
    > question of why the system didn't have an 8c.
    >
    > sorry.
    >
    >
    >

    I have checked the original mail of qwery9q:
    "However, once installed tried running cc but that did not result in it
    being found (nor 8c etc). "

    So I must say my response was not targeted that good. But I lent help
    with Plan 9 a couple of times in the last weeks and the ""cc question"
    is obvious, so that I react with a refelexive answer just seeing the "cc
    question". Sorry.

    Just to make clear, I am not a Plan 9 expert, but well, an answer of a
    simple minded user like me might be:
    No there is no additional download necessary. I did about a dozen
    installations in the last weeks and never found such a curiosity of a
    running system missing the c compiler. Just to check, I also tried a
    live Plan 9 and found the c compiler there as well. Please check at the
    prompt % again.

    Kind regards

    BB


+ Reply to Thread