4

Basically, I do a lot of C programming (for class) so I use gcc a lot on my mac. Recently since two days, whenever I ran it, the entire computer is getting frozen, and a force restart is necessary to get it working again.

So I suspected what might be the error, so I ran disk-utility and checked Yosemite partition for errors. Apparently there are a lot of errors, so I booted into single user mode, and ran the following commands.

$ fsck -fy
$ fsck -fy
$ reboot

Upon reboot, my disk is now repaired, but the computer still froze when I ran gcc So this time, I ran a permissions verification in the disk utility. It said the following.

Verifying permissions for “Yosemite”
Open error 22: “Invalid argument” on usr/bin/gatherheaderdoc
Open error 22: “Invalid argument” on usr/bin/gcc
Open error 22: “Invalid argument” on usr/bin/gcov
Open error 22: “Invalid argument” on usr/bin/git

I tried to repair the permissions, but these persist. I even tried repairing the permissions multiple times, even from RecoveryHD and also from single user mode, but these errors persist.

What do these mean? What should I do to fix it?

Edit:

Here's the output of ls -l usr/bin/gcc

Harshas-Mac-Pro:~ sriharshachilakapati$ ls -l /usr/bin/gcc
-rwxr-xr-x  1 root  wheel  14160 Sep 27 07:36 /usr/bin/gcc
Harshas-Mac-Pro:~ sriharshachilakapati$ 

Edit:

My partition is again damaged. This is the output after I just repaired it from single-user mode.

Verifying volume “Yosemite”
Verifying file system.
Using live mode.
Checking Journaled HFS Plus volume.
Checking extents overflow file.
Checking catalog file.
Checking catalog hierarchy.
(It should be 337485 instead of 337484)
Volume bitmap needs minor repair for under-allocation
Checking volume information.
The volume Yosemite was found corrupt and needs to be repaired.
The volume Yosemite was found corrupt and needs to be repaired.
The volume Yosemite was found corrupt and needs to be repaired.
The volume Yosemite was found corrupt and needs to be repaired.
The volume Yosemite was found corrupt and needs to be repaired.
The volume Yosemite was found corrupt and needs to be repaired.
The volume Yosemite was found corrupt and needs to be repaired.
The volume Yosemite was found corrupt and needs to be repaired.
The volume Yosemite was found corrupt and needs to be repaired.
The volume Yosemite was found corrupt and needs to be repaired.
File system check exit code is 8.
Error: This disk needs to be repaired using the Recovery HD. Restart your computer, holding down the Command key and the R key until you see the Apple logo. When the OS X Utilities window appears, choose Disk Utility.

This occurred just after I had repaired my partition from single user mode. Why?

4
  • 2
    Can you add the output of ls -l /usr/bin/gcc?
    – nohillside
    Commented Nov 28, 2014 at 13:47
  • @patrix Edited the question. Commented Nov 28, 2014 at 13:59
  • I'm experiencing the same, or a very similar issue. Would be very interested in learning what your solution was.
    – thomax
    Commented Jan 20, 2015 at 9:40
  • 1
    @thomax I took the computer to the Apple store, and they replaced the hard disk. Commented Jan 20, 2015 at 10:08

1 Answer 1

1

error 22 is the EINVAL in libc error codes. Maybe your glibc is corrupted? I think you can reinstall it from Xcode based on this question https://stackoverflow.com/questions/9353444/how-to-use-install-gcc-on-mac-os-x-10-8-xcode-4-4

5
  • I don't use Xcode, I use GCC through Command Line Developer tools package for Yosemite. Are you saying me to re-install them? Commented Nov 28, 2014 at 14:57
  • Yes your method to install gcc/libc.
    – f01
    Commented Nov 28, 2014 at 15:02
  • That didn't help. Edited the question. Commented Nov 29, 2014 at 16:37
  • Perhaps try manually deleting the files that got "Open Error 22" when you did a permissions repair, then reinstalling the CLI developer tools. I'd suggest checking the filesystem between the deletion and reinstalling, too.
    – andonuts
    Commented Nov 29, 2014 at 17:21
  • @andonuts I'm not sure of this, tomorrow, I'm going to take this to Apple Store. Perhaps, they may gimme a replacement atleast, I still have warranty. Commented Nov 29, 2014 at 17:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .