OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Mar 19, 2024 5:58 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Mon Jan 02, 2023 2:08 pm 
Offline

Joined: Mon Jan 02, 2023 2:01 pm
Posts: 14
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:
i686-elf-gcc -c kernel.c -o kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra
gives this error:
Code:
cc1: error: unrecognized command-line option ‘-quiet’
cc1: error: unrecognized command-line option ‘-quiet’

A simple search leads me no where.


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Tue Jan 03, 2023 9:58 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
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?


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Tue Jan 03, 2023 11:39 pm 
Offline

Joined: Mon Jan 02, 2023 2:01 pm
Posts: 14
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-elf-tools/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.


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 12:03 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
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.


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 12:23 am 
Offline

Joined: Mon Jan 02, 2023 2:01 pm
Posts: 14
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.


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 5:27 am 
Offline

Joined: Mon Jan 02, 2023 2:01 pm
Posts: 14
Do I have to set path? How do I do that?


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 11:50 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
I'm not sure if you need to set the path, but you can temporarily set the path like this:

Code:
export PATH=/your/compiler/bin:$PATH


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 12:17 pm 
Offline

Joined: Mon Jan 02, 2023 2:01 pm
Posts: 14
Octocontrabass wrote:
I'm not sure if you need to set the path, but you can temporarily set the path like this:

Code:
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:
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.


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 12:34 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
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"?


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 12:58 pm 
Offline

Joined: Mon Jan 02, 2023 2:01 pm
Posts: 14
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:
i686-elf-gcc: fatal error: no input files
compilation terminated.


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 1:12 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
You didn't run the command I asked you to run.


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 1:19 pm 
Offline

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

Here is the correct one:
Code:
/usr/bin/i686-elf-gcc


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 1:27 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
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.


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 1:39 pm 
Offline

Joined: Mon Jan 02, 2023 2:01 pm
Posts: 14
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.


Top
 Profile  
 
 Post subject: Re: cc1: error: unrecognized command-line option ‘-quiet’
PostPosted: Wed Jan 04, 2023 1:50 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group