cc aparent error - Minix

This is a discussion on cc aparent error - Minix ; comp.os.minix cc aparent error when using: cc -w fname1.c fname2.c fname3.c and expecting a linked a.out as the result, several " : not found" statements appear. This looks like a linker's error statement missing the "what's missing" portion, possibly a ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: cc aparent error

  1. cc aparent error

    comp.os.minix
    cc aparent error

    when using:
    cc -w fname1.c fname2.c fname3.c

    and expecting a linked a.out as the result, several " : not found"
    statements appear. This looks like a linker's error statement missing
    the "what's missing" portion, possibly a file name.
    Any suggestions on clarifying such a situation?

    Hul

  2. Re: cc aparent error

    > when using:
    > cc -w fname1.c fname2.c fname3.c
    >
    > and expecting a linked a.out as the result, several " : not found"
    > statements appear. This looks like a linker's error statement missing
    > the "what's missing" portion, possibly a file name.
    > Any suggestions on clarifying such a situation?


    There is no way of answering your question without more details. What
    is the full error message? What are the contents of the files? Why
    don't you want to display warnings about the code?

    Do note that the ACK compiler shipped with Minix is often somewhat
    pickier than GCC. For example, C++-style comments (// ...) are not
    allowed, only C-style comments (/* ... */). Some programs may only
    compile with GCC

  3. Re: cc aparent error

    The "cc -w fname1.c fname2.c fname3.c" was in a shell script,
    comprising the whole file, when the error occurs. However, the command
    worked well when entered directly.

    Looking further to the source code for sh, the dodot() function
    (sh3.c) was the only location of the " : not found" string. This is on the
    Minix 2.0.2 version. Any one familiar with such an error in sh or other
    possible cause's/locations?

    Hul

    Hul Tytus wrote:
    > comp.os.minix
    > cc aparent error


    > when using:
    > cc -w fname1.c fname2.c fname3.c


    > and expecting a linked a.out as the result, several " : not found"
    > statements appear. This looks like a linker's error statement missing
    > the "what's missing" portion, possibly a file name.
    > Any suggestions on clarifying such a situation?


    > Hul


  4. Re: cc aparent error

    dr@kbrx.com wrote:
    > The "cc -w fname1.c fname2.c fname3.c" was in a shell script,
    > comprising the whole file, when the error occurs. However, the command
    > worked well when entered directly.
    >
    > Looking further to the source code for sh, the dodot() function
    > (sh3.c) was the only location of the " : not found" string. This is on the
    > Minix 2.0.2 version. Any one familiar with such an error in sh or other
    > possible cause's/locations?


    Actually, that error message is almost certainly produced using the perror()
    function. (Which prints its argument, followed by ": ", followed by the string
    form of the contents of errno.)

    I'm afraid I can't really comment without more information; however you might
    like to try running cc with the -v option. A single -v will tell you which
    phase of the compilation cc is on; two -v options will tell you what commands
    cc is running.

    --
    ┌── dg*cowlark.com ─── http://www.cowlark.com ──────────────── ──
    │ "This is the captain. We have a little problem with our reentrysequence,
    │ so we may experience some slight turbulence and then explode." --- Mal
    │ Reynolds, _Serenity_

  5. Re: cc aparent error

    David - have you used cc in a shell script? These errors seem to occur
    only when in a script, ie a script within a script as I assume cc is also
    a shell script.

    Hul

    David Given wrote:
    > dr@kbrx.com wrote:
    > > The "cc -w fname1.c fname2.c fname3.c" was in a shell script,
    > > comprising the whole file, when the error occurs. However, the command
    > > worked well when entered directly.
    > >
    > > Looking further to the source code for sh, the dodot() function
    > > (sh3.c) was the only location of the " : not found" string. This is on the
    > > Minix 2.0.2 version. Any one familiar with such an error in sh or other
    > > possible cause's/locations?


    > Actually, that error message is almost certainly produced using the perror()
    > function. (Which prints its argument, followed by ": ", followed by the string
    > form of the contents of errno.)


    > I'm afraid I can't really comment without more information; however you might
    > like to try running cc with the -v option. A single -v will tell you which
    > phase of the compilation cc is on; two -v options will tell you what commands
    > cc is running.


    > --
    > ????????? ?????????????????????????????????????????? ????????? http://www.cowlark.com ?????????????????????????????????????????????????? ???????
    > ??? "This is the captain. We have a little problem with our reentry sequence,
    > ??? so we may experience some slight turbulence and then explode." --- Mal
    > ??? Reynolds, _Serenity_


  6. Re: cc aparent error

    dr@kbrx.com wrote:
    > David - have you used cc in a shell script? These errors seem to occur
    > only when in a script, ie a script within a script as I assume cc is also
    > a shell script.


    Kind of. I've used it from various build tools, although I don't think I've
    used in an honest-to-gods Bourne shell script.

    (Actually, cc isn't a shell script. It's a compiled program that does quite a
    lot of work to figure out how to compile the files you specify, and then runs
    the several individual executables that make up the compiler. Using 'cc -v'
    will show you what it's doing:

    $ cc -v -O6 hilo.c
    cem hilo.c
    opt hilo.k
    ego /tmp/Ack_65a3b.m
    opt2 hilo.gk
    be hilo.g
    as hilo.s
    led hilo.o
    cv hilo.out

    And, in fact, ego in turn calls about six additional executables.)

    Can you post a complete error message? I can't suggest anything without more
    information.

    --
    ┌── dg*cowlark.com ─── http://www.cowlark.com ──────────────── ──

    │ "Under communism, man exploits man. Under capitalism, it's justthe
    │ opposite." --- John Kenneth Galbrith

  7. Re: cc aparent error

    David - that was the complete message; " : not found"

    Hul

    David Given wrote:
    > dr@kbrx.com wrote:
    > > David - have you used cc in a shell script? These errors seem to occur
    > > only when in a script, ie a script within a script as I assume cc is also
    > > a shell script.


    > Kind of. I've used it from various build tools, although I don't think I've
    > used in an honest-to-gods Bourne shell script.


    > (Actually, cc isn't a shell script. It's a compiled program that does quite a
    > lot of work to figure out how to compile the files you specify, and then runs
    > the several individual executables that make up the compiler. Using 'cc -v'
    > will show you what it's doing:


    > $ cc -v -O6 hilo.c
    > cem hilo.c
    > opt hilo.k
    > ego /tmp/Ack_65a3b.m
    > opt2 hilo.gk
    > be hilo.g
    > as hilo.s
    > led hilo.o
    > cv hilo.out


    > And, in fact, ego in turn calls about six additional executables.)


    > Can you post a complete error message? I can't suggest anything without more
    > information.


    > --
    > ????????? ?????????????????????????????????????????? ????????? http://www.cowlark.com ?????????????????????????????????????????????????? ???????
    > ???
    > ??? "Under communism, man exploits man. Under capitalism, it's just the
    > ??? opposite." --- John Kenneth Galbrith


  8. Re: cc aparent error

    David - in a similiar, but more simple, situation the script below
    generates errors that look like those cc or sh made. The file dog.sh has:

    cp cat raa
    cp cat rbb

    the file cat contains, roughly, "this file is named cat"
    the result is that raa is written as would be expected but rbb is not. The
    result seen on the screen is:

    #sh dog.sh
    cp: not found
    : not found

    Any ideas? If you have a minix setup nearby, you might try it and see
    what happens. The system here Minix 2.0.2

    Hul

    David Given wrote:
    > dr@kbrx.com wrote:
    > > David - have you used cc in a shell script? These errors seem to occur
    > > only when in a script, ie a script within a script as I assume cc is also
    > > a shell script.


    > Kind of. I've used it from various build tools, although I don't think I've
    > used in an honest-to-gods Bourne shell script.


    > (Actually, cc isn't a shell script. It's a compiled program that does quite a
    > lot of work to figure out how to compile the files you specify, and then runs
    > the several individual executables that make up the compiler. Using 'cc -v'
    > will show you what it's doing:


    > $ cc -v -O6 hilo.c
    > cem hilo.c
    > opt hilo.k
    > ego /tmp/Ack_65a3b.m
    > opt2 hilo.gk
    > be hilo.g
    > as hilo.s
    > led hilo.o
    > cv hilo.out


    > And, in fact, ego in turn calls about six additional executables.)


    > Can you post a complete error message? I can't suggest anything without more
    > information.


    > --
    > ????????? ?????????????????????????????????????????? ????????? http://www.cowlark.com ?????????????????????????????????????????????????? ???????
    > ???
    > ??? "Under communism, man exploits man. Under capitalism, it's just the
    > ??? opposite." --- John Kenneth Galbrith


  9. Re: cc aparent error

    dr@kbrx.com wrote:
    [...]
    > Any ideas? If you have a minix setup nearby, you might try it and see
    > what happens. The system here Minix 2.0.2


    Ah, you didn't say that. I thought you were on Minix 3.

    The only thing I can suggest is putting 'set -x' as the first line of the
    shell script (and, BTW, it's always worth putting the #!/bin/sh header on
    shell scripts; some OSs require it). That way the shell will trace each
    command just before it attempts to execute it, so you can see exactly what's
    going on.

    --
    ┌── dg*cowlark.com ─── http://www.cowlark.com ──────────────── ──

    │ Uglúk u bagronk sha pushdug Internet-glob bbhosh skai.


+ Reply to Thread