Error in building Gold on FreeBSD

Hi

I followed the steps on http://llvm.org/docs/GoldPlugin.html#lto-how-to-build to build the gold plugin on FreeBSD but !

Heres a link to the screenshot of the error:http://postimg.org/image/anlpuufbl/

This is the error message that it shows and so I am also unable to get ld-new. I checked and no CFLAGS were set in etc/make.conf.

How to proceed with the installation? I am using the deault clang version supplied with FreeBSD 10.1.

The FreeBSD port ships with some local patch that might have not been
upstreamed (yet).
If binutils pkg doesn't work for you, you might want to check the port
to see how newer binutils versions are built on FreeBSD.
https://svnweb.freebsd.org/ports/head/devel/binutils/

Dear Aditya,

Regarding the error, it looks like binutils is trying to build its documentation. For your project, this is a step that you can skip. You can try using "make -k" to skip over errors and proceed to the "make install" step. That might work.

As an aside, you should include the error as a plain text attachment instead of taking a graphic screenshot. The error is sufficiently small to attach as plain text, and some developers don't like following links to web sites that they don't recognize.

Regards,

John Criswell

I triend the command make all-gold -k
But the error message that it says now is:
/usr/binutils/gold/system.h:38:11:fatal error: ‘libintl.h’ file not found
#include <libintl.h>

Okay. Look at /usr/ports/devel/binutils/Makefile and see what version of binutils they support for your platform (this should be listed in the line that sets the PORTVERSION variable). Is this version a different version of binutils than the one you’re compiling? If so, you should try compiling the version of binutils that matches the version listed in the aforementioned Makefile instead of the version listed in the LTO documentation (which is most likely binutils trunk). As an aside, are you familiar with the FreeBSD ports system? Regards, John Criswell

By the way, it looks like version of binutils in FreeBSD 10 configures binutils to enable plugins. If you’re on FreeBSD 10, it might be easier to just compile gold from the binutils Ports package in /usr/ports/devel/binutils than trying to grab and configure the version from the GNU project. Regards, John Criswell