/usr/bin/ld: final link failed: No space left on device is the error coming when I'm trying to complie Open Source code project

I have about 7GB free space over the Disk so I think that cannot be the cause of the issue.

I have read some where, that if source file is too big the linker error like this can be encountered; this can be true because source file is really huge. If the linker is giving an error due to file size then what can be done to solve the problem.

  • 1
    And the project name is?.. You might have better luck checking the project's FAQ. – alex Jul 6 '11 at 7:43
  • Copy-paste the full compilation log, so we can see exactly where you're getting this error. – Gilles Jul 6 '11 at 12:17

The linker needs to store temporary files. Guess: the temporary directory (often /tmp) is full. Remedy: clean up /tmp, make /tmp bigger, or use a different temporary directory (export TMPDIR=/path/to/directory/with/).


You may want to check :

  1. What filesystem do you have. e.g. FAT32 does not allow more than 2GB files.
  2. Is there i-node available, df -i. You can have multiple files that are smaller than the block size, then you have free space but cannot create more file since I-node list is full.

On both cases you may have to reformat to a new type of partition allowing bigger files and/or more inodes.

  • so M'vy what's best file partition which has maximum number of nodes so that my problem can be solved – y ramesh rao Jul 6 '11 at 11:41
  • Did you tested the df -i first? – M'vy Jul 6 '11 at 11:56
  • its showing something like this 1146880-INodes 138156-IUsed 1008724-IFree can this help – y ramesh rao Jul 6 '11 at 12:26
  • So it has free inodes. – M'vy Jul 6 '11 at 12:33
  • okay that means what can be next possibility then M'vy – y ramesh rao Jul 7 '11 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.