Compiling problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • s0suk3@gmail.com

    Compiling problem

    Hello,

    I'm having some trouble with GCC on a Mac OS X. When I run it with a
    source filename as an argument, I get this error:

    gcc-3.3: installation problem, cannot exec `cc1': No such file or
    directory

    What does that mean? What is cc1? (It's not the filename of my
    program.)

    I apologize if this is not directly related to C (in that case, I'd
    also appreciate some pointers :)

    Thanks,
    Sebastian
  • Filipe Cabecinhas

    #2
    Re: Compiling problem

    s0suk3@gmail.co m writes:
    Hello,
    >
    I'm having some trouble with GCC on a Mac OS X. When I run it with a
    source filename as an argument, I get this error:
    >
    gcc-3.3: installation problem, cannot exec `cc1': No such file or
    directory
    I saw from your headers that you were using Mac OS X for an Intel
    machine (if you're posting with the same machine that you use to
    develop). If that's the case, you can't use gcc 3.3, only gcc 4.0
    or later (which should be the default).
    What does that mean? What is cc1? (It's not the filename of my
    program.)
    cc1 is the name of the actual c compiler that gcc invokes in its
    execution.


    --

    - Filipe Cabecinhas

    (defvar real-email
    (apply #'concatenate 'string
    '("filcab" "@" "gmail" "." "com"))
    "My real email address.")

    Comment

    • suresh shenoy

      #3
      Re: Compiling problem

      On Jun 7, 10:53 am, s0s...@gmail.co m wrote:
      Hello,
      >
      I'm having some trouble with GCC on a Mac OS X. When I run it with a
      source filename as an argument, I get this error:
      >
      gcc-3.3: installation problem, cannot exec `cc1': No such file or
      directory
      >
      What does that mean? What is cc1? (It's not the filename of my
      program.)
      >
      I apologize if this is not directly related to C (in that case, I'd
      also appreciate some pointers :)
      >
      thanks,
      Sebastian

      try gcc --version.
      If you dont get a version info then you might not have installed gcc
      on your system or your PATH is not set up correctly.


      Comment

      • Richard Tobin

        #4
        Re: Compiling problem

        In article <d0a024b2-537b-4b2e-acf9-77e89b728ed5@l6 4g2000hse.googl egroups.com>,
        <s0suk3@gmail.c omwrote:
        >I'm having some trouble with GCC on a Mac OS X. When I run it with a
        >source filename as an argument, I get this error:
        >
        >gcc-3.3: installation problem, cannot exec `cc1': No such file or
        >directory
        >
        >What does that mean? What is cc1?
        It's part of the compiler. That's why it says there's an installation
        problem: part of the compiler is missing.

        Your best bet is probably to reinstall the "Xcode" software from your
        installation CDs.

        -- Richard
        --
        In the selection of the two characters immediately succeeding the numeral 9,
        consideration shall be given to their replacement by the graphics 10 and 11 to
        facilitate the adoption of the code in the sterling monetary area. (X3.4-1963)

        Comment

        • Kenny McCormack

          #5
          Re: Compiling problem

          In article <m2tzg5jnls.fsf @farnsworth.alb asani.net>,
          Filipe Cabecinhas <filcab@nospam. comwrote:
          >s0suk3@gmail.c om writes:
          >
          >Hello,
          >>
          >I'm having some trouble with GCC on a Mac OS X. When I run it with a
          >source filename as an argument, I get this error:
          >>
          >gcc-3.3: installation problem, cannot exec `cc1': No such file or
          >directory
          >
          >I saw from your headers that you were using Mac OS X for an Intel
          >machine (if you're posting with the same machine that you use to
          >develop). If that's the case, you can't use gcc 3.3, only gcc 4.0
          >or later (which should be the default).
          Why don't earlier versions work (serious quesion) ?

          (Which leads to) How did that earlier version get installed on his system?

          (And note further that) No C compiler is installed by default in Mac OSX.
          You have to install it yourself. And you might not do it right (since
          no instructions [other than what you can find for yourself on the net
          and newsgroups] exist).

          Comment

          • Richard Tobin

            #6
            Re: Compiling problem

            In article <g2ec4f$ogr$2@n ews.xmission.co m>,
            Kenny McCormack <gazelle@xmissi on.xmission.com wrote:
            >>I saw from your headers that you were using Mac OS X for an Intel
            >>machine (if you're posting with the same machine that you use to
            >>develop). If that's the case, you can't use gcc 3.3, only gcc 4.0
            >>or later (which should be the default).
            >Why don't earlier versions work (serious quesion) ?
            No doubt earlier versions of gcc could work, but Apple obviously
            didn't distribute gcc for Intel back when they were using only PPC
            processors.
            >(Which leads to) How did that earlier version get installed on his system?
            My guess is that it got copied from another, PPC, Mac, or was installed
            from a PPC distribution by mistake. cc1 probably appears to be missing
            because it's looking for one in /usr/libexec/gcc/i686-apple-darwin9
            and that directory doesn't exist, only a PPC one.
            >(And note further that) No C compiler is installed by default in Mac OSX.
            >You have to install it yourself.
            Normally you just install the Xcode package, which is trivial.

            -- Richard
            --
            In the selection of the two characters immediately succeeding the numeral 9,
            consideration shall be given to their replacement by the graphics 10 and 11 to
            facilitate the adoption of the code in the sterling monetary area. (X3.4-1963)

            Comment

            • Filipe Cabecinhas

              #7
              Re: Compiling problem

              gazelle@xmissio n.xmission.com (Kenny McCormack) writes:
              In article <m2tzg5jnls.fsf @farnsworth.alb asani.net>,
              Why don't earlier versions work (serious quesion) ?
              I would guess that they didn't backport the code for that ABI. Anyway,
              Only 3.4 (ppc) and 4.0.1 (ppc+intel) are included with Tiger (10.4),
              and Leopard only has 4.0.1 (ppc+intel) AFAICT.
              (Which leads to) How did that earlier version get installed on his system?
              gcc 3.3 must have been installed in some unofficial way because Apple
              never released that compiler for Intel macs. I don't think even fink
              or macports have it. I would guess it was installed manually (or
              copied from somewhere else), but I can only guess.
              (And note further that) No C compiler is installed by default in Mac OSX.
              You have to install it yourself. And you might not do it right (since
              no instructions [other than what you can find for yourself on the net
              and newsgroups] exist).
              Installing the developer tools is very straightforward . You just
              double-click a .pkg


              --

              - Filipe Cabecinhas

              (defvar real-email
              (apply #'concatenate 'string
              '("filcab" "@" "gmail" "." "com"))
              "My real email address.")

              Comment

              • Bartc

                #8
                Re: Compiling problem


                "Richard Tobin" <richard@cogsci .ed.ac.ukwrote in message
                news:g2eaja$1iu j$2@pc-news.cogsci.ed. ac.uk...
                In article
                <d0a024b2-537b-4b2e-acf9-77e89b728ed5@l6 4g2000hse.googl egroups.com>,
                <s0suk3@gmail.c omwrote
                >>I'm having some trouble with GCC on a Mac OS X. When I run it with a
                >>source filename as an argument, I get this error:
                >>
                >>gcc-3.3: installation problem, cannot exec `cc1': No such file or
                >>directory
                >>
                >>What does that mean? What is cc1?
                >
                It's part of the compiler. That's why it says there's an installation
                problem: part of the compiler is missing.
                I get 'installation problem, cannot exec cc1plus' if I try and compile
                something.C instead of .c. But the installation is fine.

                cc1 anyway seems to be hidden some 5 levels deep in a subdirectory (on my
                3.4.5). Maybe it just can't find it!

                (It would be useful if it reported the full path of whatever file it can't
                find, then any problem can be sorted out instantly just by checking out that
                location.)

                --
                Bartc



                Comment

                • Filipe Cabecinhas

                  #9
                  Re: Compiling problem

                  "Bartc" <bc@freeuk.comw rites:
                  I get 'installation problem, cannot exec cc1plus' if I try and compile
                  something.C instead of .c. But the installation is fine.
                  How did you install the compiler? And why did you install such an old
                  compiler?

                  --

                  - Filipe Cabecinhas

                  (defvar real-email
                  (apply #'concatenate 'string
                  '("filcab" "@" "gmail" "." "com"))
                  "My real email address.")

                  Comment

                  • Richard Tobin

                    #10
                    Re: Compiling problem

                    In article <acB2k.5126$E41 .2354@text.news .virginmedia.co m>,
                    Bartc <bc@freeuk.comw rote:
                    >I get 'installation problem, cannot exec cc1plus' if I try and compile
                    >something.C instead of .c. But the installation is fine.
                    Presumably you don't have the C++ part of gcc installed.

                    -- Richard
                    --
                    In the selection of the two characters immediately succeeding the numeral 9,
                    consideration shall be given to their replacement by the graphics 10 and 11 to
                    facilitate the adoption of the code in the sterling monetary area. (X3.4-1963)

                    Comment

                    • Mark McIntyre

                      #11
                      Re: Compiling problem

                      Richard Tobin wrote:
                      In article <acB2k.5126$E41 .2354@text.news .virginmedia.co m>,
                      Bartc <bc@freeuk.comw rote:
                      >
                      >I get 'installation problem, cannot exec cc1plus' if I try and compile
                      >something.C instead of .c. But the installation is fine.
                      >
                      Presumably you don't have the C++ part of gcc installed.
                      To clarify, many Unix/Linux compiler suites assume that files with a
                      suffix of uppercase C are C++ while files with lowercase c are c.

                      Comment

                      • s0suk3@gmail.com

                        #12
                        Re: Compiling problem

                        On Jun 7, 11:33 am, Filipe Cabecinhas <fil...@nospam. comwrote:
                        gaze...@xmissio n.xmission.com (Kenny McCormack) writes:
                        In article <m2tzg5jnls.... @farnsworth.alb asani.net>,
                        Why don't earlier versions work (serious quesion) ?
                        >
                        I would guess that they didn't backport the code for that ABI. Anyway,
                        Only 3.4 (ppc) and 4.0.1 (ppc+intel) are included with Tiger (10.4),
                        and Leopard only has 4.0.1 (ppc+intel) AFAICT.
                        >
                        (Which leads to) How did that earlier version get installed on his system?
                        >
                        gcc 3.3 must have been installed in some unofficial way because Apple
                        never released that compiler for Intel macs. I don't think even fink
                        or macports have it. I would guess it was installed manually (or
                        copied from somewhere else), but I can only guess.
                        >
                        I didn't install it myself, and if it doesn't come pre-installed with
                        Mac, then I think it must have been Xcode what installed it.
                        (And note further that) No C compiler is installed by default in Mac OSX..
                        You have to install it yourself. And you might not do it right (since
                        no instructions [other than what you can find for yourself on the net
                        and newsgroups] exist).
                        Installing the developer tools is very straightforward . You just
                        double-click a .pkg
                        I found a .pkg under /Library/Receipts/gcc-4.0.pkg. I clicked it and
                        told it to install it, but then says an error occurred during the
                        installation. I think I'll just follow the installation instructions
                        at the GCC site.

                        By the way, if you don't mind the curiosity, may I ask how in heaven
                        did you get at my headers? (interesting!)

                        Comment

                        • Filipe Cabecinhas

                          #13
                          Re: Compiling problem

                          s0suk3@gmail.co m writes:
                          I didn't install it myself, and if it doesn't come pre-installed with
                          Mac, then I think it must have been Xcode what installed it.
                          You should re-install your Developer Tools from your Tiger or Leopard
                          DVD (or download them from Apple's site and install the most recent ones).
                          I found a .pkg under /Library/Receipts/gcc-4.0.pkg. I clicked it and
                          told it to install it, but then says an error occurred during the
                          installation. I think I'll just follow the installation instructions
                          at the GCC site.
                          The receipts are not the installation packages. You can't reinstall
                          your package from a receipt. (I also never understood their purpose)
                          By the way, if you don't mind the curiosity, may I ask how in heaven
                          did you get at my headers? (interesting!)
                          I just peeked at the headers of your message with my NNTP client
                          (C-u g, in gnus).


                          --

                          - Filipe Cabecinhas

                          char* params[] = {"fil", "cab", "@", "gmail", ".", "com"};
                          puts("Real signature:");
                          for (int i = 0; i < sizeof(params)/sizeof(*params) ; ++i)
                          printf("%s", params[i]);
                          putchar('
                          ');

                          Comment

                          • santosh

                            #14
                            Re: Compiling problem

                            s0suk3@gmail.co m wrote:
                            Hello,
                            >
                            I'm having some trouble with GCC on a Mac OS X. When I run it with a
                            source filename as an argument, I get this error:
                            >
                            gcc-3.3: installation problem, cannot exec `cc1': No such file or
                            directory
                            >
                            What does that mean? What is cc1? (It's not the filename of my
                            program.)
                            The executable called 'gcc' is just a "driver" program that invokes
                            several other separate programs in succession to compile. In this case
                            the driver program is telling you that it cannot find one of these
                            necessary programs.

                            The most likely reason is your installation is somehow broken. Why not
                            try a fresh reinstall before pondering further?
                            I apologize if this is not directly related to C (in that case, I'd
                            also appreciate some pointers :)
                            >
                            Thanks,
                            Sebastian

                            Comment

                            • Bill Cunningham

                              #15
                              Re: Compiling problem


                              "santosh" <santosh.k83@gm ail.comwrote in message
                              news:g390e5$1hq $2@registered.m otzarella.org.. .Sebastian wrote:
                              >What does that mean? What is cc1? (It's not the filename of my
                              >program.)
                              I think that's like the old c1. The old second pass compiler. There was c0
                              c1 and c2 which was optional and for optimization.

                              Bill


                              Comment

                              Working...