[swift-dev] Build Error: Relocation R_X86_64_PC32

Ryan Lovelett swift-dev at ryan.lovelett.me
Mon Feb 29 22:04:54 CST 2016


Perfect.

That corresponds with what I am seeing. On the morning of the 22nd (when
it built fine) it used binutils-2.25.1-3 and then on the morning of the
23rd (when it failed) it used binutils-2.26-1.

I'll look into the build flag for the gold linker

Out of curiosity is there a issue in the bug tracker for this that I
could follow; or should I file one?

Thanks again for the quick response.

On Mon, Feb 29, 2016, at 10:55 PM, Dmitri Gribenko wrote:
> On Mon, Feb 29, 2016 at 7:51 PM, Ryan Lovelett via swift-dev
> <swift-dev at swift.org> wrote:
> > I have a daily build of Swift that I make on a Arch Linux box. On the
> > morning of February 23rd the build starting failing with the following
> > error:
> >
> > /usr/bin/ld: stdlib/public/core/linux/x86_64/Swift.o: relocation
> > R_X86_64_PC32 against protected symbol `_TMPSa' can not be used when
> > making a shared object
> > /usr/bin/ld: final link failed: Bad value
> > clang-3.7: error: linker command failed with exit code 1 (use -v to see
> > invocation)
> 
> Hi Ryan,
> 
> If you are running binutils 2.26, this is a known issue.  A workaround
> is to use the gold linker (build-script-impl has an option for this).
> 
> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-dev mailing list