[9fans] Building new kernel. - Plan9

This is a discussion on [9fans] Building new kernel. - Plan9 ; Hi all, I am having trouble building a new kernel for a terminal. I do mk 'CONF=pcf' and I get the error mk: don't know how to make '/386/bin/fossil/fossil' in directory /sys/src/9/pc A mk 'CONF=pc' works fine. I am hoping ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 21

Thread: [9fans] Building new kernel.

  1. [9fans] Building new kernel.

    Hi all,

    I am having trouble building a new kernel for a terminal.
    I do
    mk 'CONF=pcf'
    and I get the error

    mk: don't know how to make '/386/bin/fossil/fossil' in directory
    /sys/src/9/pc

    A
    mk 'CONF=pc'
    works fine.

    I am hoping this is some simple newbie mistake.....

    Thanks

    Bob



  2. Re: [9fans] Building new kernel.

    The kernel mkfiles don't know how to build dependencies from
    the cmd tree. The mk you're doing knows fossil is missing or out
    of date, but not how to do anything about it. Build it yourself. I
    mk all of /sys/src/cmd to be safe, but you could just hit the list
    you need for your kernel (whatever files you're building in).

    The 'pc' configuration doesn't have this problem because it
    doesn't include fossil (and a few other things pcf has). See the
    'bootdir' section of the config file.
    Anthony



  3. Re: [9fans] Building new kernel.

    > I am having trouble building a new kernel for a terminal.
    > I do
    > mk 'CONF=pcf'
    > and I get the error
    >
    > mk: don't know how to make '/386/bin/fossil/fossil' in directory
    > /sys/src/9/pc


    does /386/bin/fossil/fossil exist? if not, it's a little
    worrying that it doesn't. perhaps the iso was
    missing some files. or your network install was
    interrupted. assuming that the damage is
    not too great, you probablly want to use
    /usr/glenda/bin/rc/pull to sync up with sources.

    - erik



  4. Re: [9fans] Building new kernel.

    Thank you both for your infromative replies.

    A 'mk all' in /sys/src/cmd gave errors so I am doing a pull now....

    Bob



  5. Re: [9fans] Building new kernel.

    erik quanstrom wrote:
    >> I am having trouble building a new kernel for a terminal.
    >> I do
    >> mk 'CONF=pcf'
    >> and I get the error
    >>
    >> mk: don't know how to make '/386/bin/fossil/fossil' in directory
    >> /sys/src/9/pc
    >>

    >
    > does /386/bin/fossil/fossil exist? if not, it's a little
    > worrying that it doesn't. perhaps the iso was
    > missing some files. or your network install was
    > interrupted. assuming that the damage is
    > not too great, you probablly want to use
    > /usr/glenda/bin/rc/pull to sync up with sources.
    >
    > - erik
    >
    >
    >

    Ok. I pulled and remade fossil which got over that error. But now I do
    mk 'CONF=pcf' and get

    size 9pcf
    links: incompatible type signitures ...... (for a whole load of init
    files ie tcpinit, udpinit etc)

    and then

    mk: 8c -FTVv '-DKERNDATE='`{date ... : exit status=rc 1887: 8l 1891 error

    Something not quite right with my system??? It's from the plan9 iso
    dated June 26th..

    Thanks again

    Bob





  6. Re: [9fans] Building new kernel.

    > Ok. I pulled and remade fossil which got over that error. But now I do
    > mk 'CONF=pcf' and get
    >
    > size 9pcf
    > links: incompatible type signitures ...... (for a whole load of init
    > files ie tcpinit, udpinit etc)
    >
    > and then
    >
    > mk: 8c -FTVv '-DKERNDATE='`{date ... : exit status=rc 1887: 8l 1891 error
    >
    > Something not quite right with my system??? It's from the plan9 iso
    > dated June 26th..


    this would be expected due to the pull which sets the mtimes of
    new files to be older than the .8s. try "mk clean" before proceeding.

    - erik



  7. Re: [9fans] Building new kernel.

    > this would be expected due to the pull which sets the mtimes of
    > new files to be older than the .8s. try "mk clean" before proceeding.


    i should explain that type signatures are 32-bit
    signatures in .$O files that define the type of
    external symbols. the c compiler sets the type
    signature to zero unless the -T flag is given.
    if both signatures are not zero, the linker
    checks to see that they match.

    thus if you try to link a.c with decl
    extern int fu;
    with b.c
    long fu
    it will work perfectly if the -T flag is not
    given (since there is a deep assumption
    in plan 9 that int == long). but i the
    -T flag is given, it will fail with a type
    signature error.

    - erik

    ----
    minooka; cat a.c
    long fu;
    minooka; cat b.c
    #include
    #include

    extern int fu;

    void
    main(void)
    {
    print("%d\n", fu);
    }

    minooka; 8c a.c && 8c b.c && 8l a.8 b.8 && 8.out
    0

    minooka; 8c -T a.c && 8c b.c && 8l a.8 b.8 && 8.out
    0

    minooka; 8c a.c && 8c -T b.c && 8l a.8 b.8 && 8.out
    0

    minooka; 8c -T a.c && 8c -T b.c && 8l a.8 b.8 && 8.out
    main: incompatible type signatures 5ef20f47(a.8) and 4151d5bd(b.8) for fu



  8. Re: [9fans] Building new kernel.

    > it will work perfectly if the -T flag is not
    > given (since there is a deep assumption
    > in plan 9 that int == long). but i the


    not exactly. it will work on most Unix systems and
    on Plan 9 without -T because nothing checks
    external types across object module boundaries. the linker/loader in both systems
    will allocate in BSS the largest size seen for a given symbol,
    so it doesn't matter whether int == long or not.



  9. Re: [9fans] Building new kernel.

    > not exactly. it will work on most Unix systems and
    > on Plan 9 without -T because nothing checks
    > external types across object module boundaries. the linker/loader in both systems
    > will allocate in BSS the largest size seen for a given symbol,
    > so it doesn't matter whether int == long or not.


    by "work" you mean not generate an out-of-range
    memory access nor not produce unexpected values?

    - erik



  10. Re: [9fans] Building new kernel.

    erik quanstrom wrote:
    >> Ok. I pulled and remade fossil which got over that error. But now I do
    >> mk 'CONF=pcf' and get
    >>
    >> size 9pcf
    >> links: incompatible type signitures ...... (for a whole load of init
    >> files ie tcpinit, udpinit etc)
    >>
    >> and then
    >>
    >> mk: 8c -FTVv '-DKERNDATE='`{date ... : exit status=rc 1887: 8l 1891 error
    >>
    >> Something not quite right with my system??? It's from the plan9 iso
    >> dated June 26th..
    >>

    >
    > this would be expected due to the pull which sets the mtimes of
    > new files to be older than the .8s. try "mk clean" before proceeding.
    >
    > - erik
    >
    >

    Thanks. I realised that wouild be a good idea about 1.5 nanoseconds
    after I sent the email....

    So, now in /sys/src I do

    mk clean ok,
    mk all fails with

    mk ip
    8c -FTVv 6in4.c
    mk: no recipe to make 'pptpd.8' in directory /sys/src/cmd/ip

    doing a mk all in /sys/src/cmd/ip/ gives the same error...

    Any ideas.....

    If I delete all sources and do a pull then try again????

    Thanks for your patience :-)

    Bob





  11. Re: [9fans] Building new kernel.

    9,

    >> Something not quite right with my system??? It's from the plan9 iso
    >> dated June 26th..


    I'm having the same exact issue with a July 19th iso.

    >> this would be expected due to the pull which sets the mtimes of
    >> new files to be older than the .8s. try "mk clean" before proceeding.

    > So, now in /sys/src I do
    > mk clean ok,
    > mk all fails with
    > mk ip
    > 8c -FTVv 6in4.c
    > mk: no recipe to make 'pptpd.8' in directory /sys/src/cmd/ip


    I'm getting the same error after a pull. Any thoughts?


    Sincerely,
    Jerome


  12. Re: [9fans] Building new kernel.

    > I'm having the same exact issue with a July 19th iso.
    >
    >>> this would be expected due to the pull which sets the mtimes of
    >>> new files to be older than the .8s. try "mk clean" before proceeding.

    >> So, now in /sys/src I do
    >> mk clean ok,
    >> mk all fails with
    >> mk ip
    >> 8c -FTVv 6in4.c
    >> mk: no recipe to make 'pptpd.8' in directory /sys/src/cmd/ip

    >
    > I'm getting the same error after a pull. Any thoughts?


    does /sys/src/cmd/ip/pptpd.c exist? if not, there must be an
    error in the pull database on sources. you can copy it
    by hand with
    9fs sources && cp -x /n/sources/plan9/sys/src/cmd/ip/pptpd.c /sys/src/cmd/ip/

    - erik



  13. Re: [9fans] Building new kernel.

    9,

    >> mk: no recipe to make 'pptpd.8' in directory /sys/src/cmd/ip

    > does /sys/src/cmd/ip/pptpd.c exist? if not, there must be an
    > error in the pull database on sources. you can copy it
    > by hand with
    > 9fs sources && cp -x /n/sources/plan9/sys/src/cmd/ip/pptpd.c /sys/src/cmd/ip/


    Erik, it already exists and has the same MD5 checksum than the one in
    sources.


    Jerome


  14. Re: [9fans] Building new kernel.

    > Erik, it already exists and has the same MD5 checksum than the one in
    > sources.


    i'm fresh out of ideas, then.

    what i know is
    a) it build just fine on my system, but i don't use pull.
    b) if for some xyzw mk requires xyzw.8 and there's no xyzw.$x
    so that there's a mk rule like so "%.8: %.$x", i get the following
    error message

    ; mk xyzw.8
    mk: no recipe to make 'xyzw.8' in directory /sys/src/9/pc

    since i know there's a rule "%.8: %.c", there must be some reason
    that mk thinks that pptp.c doesn't exist. i have no idea what that
    would be. mode bits?

    you might want to fiddle around with mk -de pptp.8

    - erik



  15. Re: [9fans] Building new kernel.

    9,

    >> mk: no recipe to make 'pptpd.8' in directory /sys/src/cmd/ip

    > does /sys/src/cmd/ip/pptpd.c exist? if not, there must be an
    > error in the pull database on sources. you can copy it
    > by hand with
    > 9fs sources && cp -x /n/sources/plan9/sys/src/cmd/ip/pptpd.c /sys/src/cmd/ip/
    > Erik, it already exists and has the same MD5 checksum than the one in
    > sources.


    Using July 19th's iso and today's (Tue Jul 22 13:51:21 PDT 2008) pull:

    http://www.eskimo.com/~jibanes/pull.png


    Hope this helps,
    Jerome


  16. Re: [9fans] Sam on 9pm or plan9port

    Benjamin Huntsman wrote:
    > might it be more straightforward to modify the plan9port sam to run on 9pm, or would the only way to get it running on Windows be to port the whole lib9 from p9p at the same time?
    >
    > ... I hate Windows, but alas, it's what I have to live with for my job ..
    >


    Here is a stab in the dark -- could p9p possibly compile and run under
    Cygwin? If so, that could be one way to get p9p working. An extra of
    indirection may not be the most efficient thing, but...

    Ed


  17. Re: [9fans] Building new kernel.

    > what i know is
    > a) it build just fine on my system, but i don't use pull.
    > b) if for some xyzw mk requires xyzw.8 and there's no xyzw.$x
    > so that there's a mk rule like so "%.8: %.$x", i get the following
    > error message
    > ; mk xyzw.8
    > mk: no recipe to make 'xyzw.8' in directory /sys/src/9/pc
    > since i know there's a rule "%.8: %.c", there must be some reason
    > that mk thinks that pptp.c doesn't exist. i have no idea what that
    > would be. mode bits?


    pptpd.c is dated Dec 31, 1969, mk doesn't like this. So I touch'd it, and
    then it compiled just fine.


    Jerome


  18. Re: [9fans] Building new kernel.

    Bob,

    > mk: don't know how to make '/386/bin/fossil/fossil' in directory
    > /sys/src/9/pc


    touch /386/bin/fossil/fossil then you can mk 'CONF=pcf' if you want.


    Hope this helps,
    Jerome Ibanes


  19. Re: [9fans] Building new kernel.

    > Bob,
    >
    >> mk: don't know how to make '/386/bin/fossil/fossil' in directory
    >> /sys/src/9/pc

    >
    > touch /386/bin/fossil/fossil then you can mk 'CONF=pcf' if you want.


    if you are trying to boot from a fossil root and do this,
    your kernel will not be able to successfully mount the root
    filesystem.

    don't do this if you expect to boot.

    - erik



  20. Re: [9fans] Building new kernel.

    >> touch /386/bin/fossil/fossil then you can mk 'CONF=pcf' if you want.
    >
    > if you are trying to boot from a fossil root and do this,
    > your kernel will not be able to successfully mount the root
    > filesystem.
    >
    > don't do this if you expect to boot.


    Only if there was no /386/bin/fossil/fossil before.
    If instead the problem is that fossil/fossil has mtime==0
    but is otherwise a valid binary (as an earlier post suggested
    was the problem with pptpd.c), then touch is a fine
    solution.

    Presumably mk fails to distinguish mtime==0 from
    "file does not exist" internally.

    Russ



+ Reply to Thread
Page 1 of 2 1 2 LastLast