CFD Online Logo CFD Online URL
Home > Forums

Error Compiling OpenFOAM .. Linker Error ld "--add-needed is not supported"

Register Blogs Members List Search Today's Posts Mark Forums Read

In this blog, quick reference notes about OpenFOAM are posted in a form of a summary to address a specific topic per post, which I think could be helpful as a reminder for my Alzheimer condition
Rate this Entry

Error Compiling OpenFOAM .. Linker Error ld "--add-needed is not supported"

Posted October 21, 2013 at 15:44 by Hisham

If an error occurs while compiling OpenFOAM from source that has to do with the "linker" ld does not support the --add-nedded option (Read more at: and

The problem summary:

The 'nixOS has two linker programs ld.bfd and They both are situated in /usr/bin/. The /usr/bin/ld is a link to either. If this link is set to the error occurs because the gold version does not support the --add-needed.

To know which linker your system is using:
ls -l /usr/bin/ld*
if you have:
$ ls -l /usr/bin/ld*
lrwxrwxrwx 1 root root      15 Oct 21 21:27 /usr/bin/ld -> /usr/bin/
Then you need to (type carefully!):

$ sudo rm /usr/bin/ld
$ sudo ln -s /usr/bin/ld.bfd /usr/bin/ld
Then compile OF
Posted in Uncategorized
Views 1483 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0



All times are GMT -4. The time now is 13:52.