Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atom linter-gcc not working on mac os #62

Closed
pwnywiz opened this Issue May 30, 2016 · 20 comments

Comments

Projects
None yet
@pwnywiz
Copy link

pwnywiz commented May 30, 2016

Hi,
I've been using linter gcc on linux for a good time, helping me out quite a lot but when i tried to download it on mac os, it simply doesnt want to cooperate. My machine tries to use clang instead even though I've passed the path of my gcc compiler.. Is there any way to switch over to gcc instead of downloading the clang linter?
Thanks a lot

@pwnywiz

This comment has been minimized.

Copy link
Author

pwnywiz commented May 31, 2016

Solved

Self Update (for other curious users / people with the same problem)

xcode had installed its own gcc version which was probably beeing masked by clang even though it appeared in the ''which gcc'' path.
So I manually downloaded a stable gcc version through Homebrew (brew install gcc).
The summary reported that gcc was installed in the path /usr/local/Cellar/gcc/5.3.0.
The most important step was to pass the executable path of my manually installed gcc compiler to the settings of linter-gcc.
That should be /usr/local/Cellar/gcc/5.3.0/bin/gcc-5 (or whatever the summary path of your installation was, plus the /bin/gcc- ).
Hope this was helpful enough to someone else as well and will soften the pain! :)

@pwnywiz pwnywiz changed the title Not able to use linter gcc on mac os Atom linter-gcc not working on mac os May 31, 2016

@cgradwohl

This comment has been minimized.

Copy link

cgradwohl commented Jun 3, 2016

@pwnywiz huge help for me!! thank you!!

@hebaishi

This comment has been minimized.

Copy link
Owner

hebaishi commented Jun 4, 2016

This is really useful information. I think I'll add it to the readme

@hebaishi hebaishi referenced this issue Jun 13, 2016

Closed

Unable to open output file #65

3 of 3 tasks complete
@LeonardoLeite

This comment has been minimized.

Copy link

LeonardoLeite commented Jun 14, 2016

Thanks. Huge help here! 👍🏻

@hebaishi hebaishi added the wontfix label Jun 16, 2016

@hebaishi hebaishi closed this Jun 16, 2016

@ayberkt

This comment has been minimized.

Copy link

ayberkt commented Aug 24, 2016

I have set things up as described in this issue. Things are working fine except the following error I am getting.

clang -cclass: error: unable to open output file 'foo.o': 'Permission denied'.

Anyone had a similar problem?

@elphant0m

This comment has been minimized.

Copy link

elphant0m commented Oct 19, 2016

Yes I have the same issue, except it is clang -cc1as (not -cclass). It says it is trying to open the name of my file with a ".o' extension, despite that I have saved it as a ".c" file.

@epiks

This comment has been minimized.

Copy link

epiks commented Nov 30, 2016

It disappears when I add -fsyntax-only to C++ flags.

It will not disappear when I add -fsyntax-only to C flags.

My gcc is /usr/local/bin/gcc-6 installed with homebrew.

@AntMartDev

This comment has been minimized.

Copy link

AntMartDev commented Dec 9, 2016

I am having the same issue as @ayberkt , I tried everything but I can't fix it.. I keep getting this error:

clang -cclass: error: unable to open output file 'somefile.o': 'Permission denied'.

Can anyone help with this?

@luisgiii

This comment has been minimized.

Copy link

luisgiii commented Dec 20, 2016

Hi, I'm still getting an error message in Atom:

linter-gcc: Executable not found
"/usr/local/Cellar/gcc/6.2.0/bin/gcc-6" not found

So, the solution proposed is not fixing the issue even tho it would make perfect sense.

@luisgiii

This comment has been minimized.

Copy link

luisgiii commented Dec 20, 2016

Ok, it was fixed by adding the gcc path "/usr/local/opt/gcc/bin/gcc-6" to /etc/paths file.
Sorry for the extra comment

@lhcavalcanti

This comment has been minimized.

Copy link

lhcavalcanti commented Feb 23, 2017

I also getting clang -cc1as: error unable to open output file 'co.o': 'Permission denied', Any one have solved it?

Thanks

@marcotollini

This comment has been minimized.

Copy link

marcotollini commented Mar 15, 2017

Same here!
For instance, I have already added /usr/local/opt/gcc/bin/gcc-6 to my PATH and added in GCC executable path /usr/local/Cellar/gcc/6.3.0_1/bin/gcc-6

@Linh1706

This comment has been minimized.

Copy link

Linh1706 commented Mar 31, 2017

@epiks I do as you say. It works.
@hebaishi should you fix this ?

@Linh1706

This comment has been minimized.

Copy link

Linh1706 commented Jun 28, 2017

@rezwanh001

This comment has been minimized.

Copy link

rezwanh001 commented Oct 28, 2017

I am getting

Rezwans-iMac:sample rezwan$ make -f mkfile.r
cc -c main.c 
error: unable to open output file 'main.o': 'Permission denied'
1 error generated.
make: *** [main.o] Error 1

Any one have solved it?

@rezwanh001

This comment has been minimized.

Copy link

rezwanh001 commented Oct 28, 2017

Hey, I have solved above issue using following command 👍

Rezwans-iMac:sample rezwan$ chmod +rw .

@ozzstrich ozzstrich referenced this issue Nov 23, 2017

Open

Linter isn't working. #152

4 of 4 tasks complete
@lamhoangtung

This comment has been minimized.

Copy link

lamhoangtung commented May 30, 2018

I installed gcc 8.1.0 via homebrew and added /usr/local/Cellar/gcc/8.1.0/bin/ to my PATH and added /usr/local/Cellar/gcc/8.1.0/bin/gcc-8 to the linter-gcc setting inside Atom. I aslo try to run ln -s gcc-8 gcc but nothing happened, linting on-the-fly still not working.

Anybody can help me with this problem ? Thanks you

@howlinweed

This comment has been minimized.

Copy link

howlinweed commented Jul 25, 2018

@lamhoangtung
After installing gcc from homebrew and linking gcc-8 to gcc, I added /usr/local/bin/gcc to the GCC Executable Path setting for the package. However, it does look like there might be an issue with lint on-the-fly and using the current directory in the include path; easy work around seems to be to make a dedicated include folder with everything in it and add that to the include path.

And for any MacOS users that have made it this far and are still getting a clang error with all the correct linter and path settings, add the -o /dev/null argument to the C flags settings.

@jneuendorf

This comment has been minimized.

Copy link

jneuendorf commented Aug 14, 2018

I wanted to use this package for linting C files so I installed gcc with hombrew.
After brew install gcc, gcc still points to the XCode clang thing (/usr/bin) but gcc-8 (in my case - I guess the version number may differ) points to what homebrew installed ($(brew --prefix)/bin/gcc-8).

Thus I set gcc-8 as GCC Executable Path in the package settings. Atom's Settings GUI did not work for me so I used Atom > Config... to edit my config directly by setting execPath:

"*":
    # ...
    "linter-gcc":
        execPath: "gcc-8"
    # ...
@qtw1998

This comment has been minimized.

Copy link

qtw1998 commented Oct 8, 2018

I believe that the following sentence could make sense.
PATH=$PATH:/usr/local/Cellar/gcc/8.2.0/bin/gcc-8

@adriankarlen adriankarlen referenced this issue Dec 19, 2018

Open

linter-gcc doesn't work on mac #181

2 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.