In this blog, quick reference notes about OpenFOAM are posted in a form of a summary to address a specific topic per post.
Error Compiling OpenFOAM .. Linker Error ld "--add-needed is not supported"
Posted October 21, 2013 at 16: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: http://www.openfoam.org/mantisbt/view.php?id=685 and http://www.cfd-online.com/Forums/ope...roblem-ld.html).
The problem summary:
The 'nixOS has two linker programs ld.bfd and ld.gold. They both are situated in /usr/bin/. The /usr/bin/ld is a link to either. If this link is set to ld.gold the error occurs because the gold version does not support the --add-needed.
To know which linker your system is using:
if you have:
Then you need to (type carefully!):
Then compile OF
The problem summary:
The 'nixOS has two linker programs ld.bfd and ld.gold. They both are situated in /usr/bin/. The /usr/bin/ld is a link to either. If this link is set to ld.gold the error occurs because the gold version does not support the --add-needed.
To know which linker your system is using:
Code:
ls -l /usr/bin/ld*
Code:
$ ls -l /usr/bin/ld* lrwxrwxrwx 1 root root 15 Oct 21 21:27 /usr/bin/ld -> /usr/bin/ld.gold
Code:
$ sudo rm /usr/bin/ld $ sudo ln -s /usr/bin/ld.bfd /usr/bin/ld
Total Comments 0