cc1: error: unrecognized command-line option ‘-quiet’

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
JoeBox9
Posts: 14
Joined: Mon Jan 02, 2023 2:01 pm

cc1: error: unrecognized command-line option ‘-quiet’

Post by JoeBox9 »

Hello, I am following the bare bones tutorial. I installed i686 GNU Cross Compilation Tool-Chains and it said that cc1 does not exist. After a bit of searching, I found that, I should make a link to cc, so I did and running

Code: Select all

i686-elf-gcc -c kernel.c -o kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra
gives this error:

Code: Select all

cc1: error: unrecognized command-line option ‘-quiet’
cc1: error: unrecognized command-line option ‘-quiet’
A simple search leads me no where.
Octocontrabass
Member
Member
Posts: 5562
Joined: Mon Mar 25, 2013 7:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by Octocontrabass »

JoeBox9 wrote:it said that cc1 does not exist. After a bit of searching, I found that, I should make a link to cc
That's not the correct fix for the problem.

How exactly did you install your cross-compiler?
JoeBox9
Posts: 14
Joined: Mon Jan 02, 2023 2:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by JoeBox9 »

Octocontrabass wrote:
JoeBox9 wrote:it said that cc1 does not exist. After a bit of searching, I found that, I should make a link to cc
That's not the correct fix for the problem.

How exactly did you install your cross-compiler?
Through this Github Repo (https://github.com/alessandromrc/i686-e ... s/releases). I copied everything to root. Then found out that /i686-elf has bin/ and lib/, so I opened Midnight Commander with root and moved them, still the same problem.
Octocontrabass
Member
Member
Posts: 5562
Joined: Mon Mar 25, 2013 7:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by Octocontrabass »

I extracted it to its own directory, ran it from there, and had no problems. Did you check to make sure libexec/gcc/i686-elf/11.1.0/cc1 did exist and was marked executable?

Copying it to the root directory sounds like a good way to break your system.
JoeBox9
Posts: 14
Joined: Mon Jan 02, 2023 2:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by JoeBox9 »

Octocontrabass wrote:I extracted it to its own directory, ran it from there, and had no problems. Did you check to make sure libexec/gcc/i686-elf/11.1.0/cc1 did exist and was marked executable?

Copying it to the root directory sounds like a good way to break your system.
Yes it does and Nautilus says it is executable.
JoeBox9
Posts: 14
Joined: Mon Jan 02, 2023 2:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by JoeBox9 »

Do I have to set path? How do I do that?
Octocontrabass
Member
Member
Posts: 5562
Joined: Mon Mar 25, 2013 7:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by Octocontrabass »

I'm not sure if you need to set the path, but you can temporarily set the path like this:

Code: Select all

export PATH=/your/compiler/bin:$PATH
JoeBox9
Posts: 14
Joined: Mon Jan 02, 2023 2:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by JoeBox9 »

Octocontrabass wrote:I'm not sure if you need to set the path, but you can temporarily set the path like this:

Code: Select all

export PATH=/your/compiler/bin:$PATH
Before you replied, I tried copying everything to the /bin folder, as it would have the same effect as $PATH, I then get this:

Code: Select all

i686-elf-gcc: fatal error: '-fuse-linker-plugin', but liblto_plugin.so not found
After you replied I tried setting the path to /libexec/gcc/i686-elf//11.1.0/, same error, I tried reverting the changes I made in /bin myself, by checking names of file in /libexec and comparing and deleting. I still get the same message, Did it magically fix itself. What do I do now? Also, I tried going further in the tutorial by ignoring compilation and just coding. I get the same error in the Meaty Skeleton Project.
Octocontrabass
Member
Member
Posts: 5562
Joined: Mon Mar 25, 2013 7:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by Octocontrabass »

JoeBox9 wrote:After you replied I tried setting the path to /libexec/gcc/i686-elf//11.1.0/,
That's not going to work; you should only add the "bin" directory to PATH.
JoeBox9 wrote:What do I do now?
What do you see when you run "which i686-elf-gcc"?
JoeBox9
Posts: 14
Joined: Mon Jan 02, 2023 2:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by JoeBox9 »

Octocontrabass wrote:
JoeBox9 wrote:After you replied I tried setting the path to /libexec/gcc/i686-elf//11.1.0/,
That's not going to work; you should only add the "bin" directory to PATH.
JoeBox9 wrote:What do I do now?
What do you see when you run "which i686-elf-gcc"?
I see this:

Code: Select all

i686-elf-gcc: fatal error: no input files
compilation terminated.
Octocontrabass
Member
Member
Posts: 5562
Joined: Mon Mar 25, 2013 7:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by Octocontrabass »

You didn't run the command I asked you to run.
JoeBox9
Posts: 14
Joined: Mon Jan 02, 2023 2:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by JoeBox9 »

Octocontrabass wrote:You didn't run the command I asked you to run.
Here is the correct one:

Code: Select all

/usr/bin/i686-elf-gcc
Octocontrabass
Member
Member
Posts: 5562
Joined: Mon Mar 25, 2013 7:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by Octocontrabass »

Did you extract the zip file into /usr? If not, the reason why you're having problems is because you have another i686-elf-gcc already installed.
JoeBox9
Posts: 14
Joined: Mon Jan 02, 2023 2:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by JoeBox9 »

Octocontrabass wrote:Did you extract the zip file into /usr? If not, the reason why you're having problems is because you have another i686-elf-gcc already installed.
Yeah, I was installing from the AUR but it was taking too long to compile, so I cancelled it in the middle and got the GitHub one. So, after pressing TAB in yay -r i686, it gave i686-elf-binutils, it said there was 16mb of stuff, it removed it, still the same compilation errors.
Octocontrabass
Member
Member
Posts: 5562
Joined: Mon Mar 25, 2013 7:01 pm

Re: cc1: error: unrecognized command-line option ‘-quiet’

Post by Octocontrabass »

JoeBox9 wrote:Yeah, I was installing from the AUR but it was taking too long to compile, so I cancelled it in the middle
If you had let it finish, you wouldn't be having these problems.

Run "ls /usr/bin/i686-elf-*" and see if anything is listed.
Post Reply