If gold is the default linker, samba 4.0.0-beta2's configure script fails while checking the compiler. It comes down to samba 4.x's usage of the -mcmodel=large compiler flag in combination with -fPIC. [bero@localhost ~]$ cat test.c int puts(const char *s); int main(int argc, char **argv) { puts("test"); } [bero@localhost ~]$ gcc -mcmodel=large -fPIC test.c /usr/bin/ld: internal error in relocate, at ../../gold/x86_64.cc:3361 collect2: error: ld returned 1 exit status The same code w/ the same options links fine with bfd ld. Seen on the gold included in hjl's binutils 2.22.52.0.4 release (20120604).
Also faced the same problem with Android NDK (gold and fpic are defaults there): [...]gold/testsuite/gcctestdir/ld: internal error in relocate, at ../../binutils-gdb/gold/x86_64.cc:3397
It is a dup. *** This bug has been marked as a duplicate of bug 16870 ***