Date: Thu, 20 Sep 2018 15:26:44 -0400 From: Ed Maste <emaste@freebsd.org> To: acm@freebsd.org, amdmi3@freebsd.org, andrey@bsdnir.info, bbtruk@users.sourceforge.net, Bernard Spil <brnrd@freebsd.org>, Cy Schubert <cy@freebsd.org>, Alexey Dokuchaev <danfe@freebsd.org>, db@freebsd.org, ehaupt@freebsd.org, eugen@freebsd.org, freebsd@skinc.ru, jwb@freebsd.org, kuriyama@freebsd.org, mi@aldan.algebra.com, michael.osipov@siemens.com, mr@freebsd.org, thierry@freebsd.org, vbox@freebsd.org, x11@freebsd.org, yuri@freebsd.org, Ryan Steinmetz <zi@freebsd.org> Cc: Mahdi Mokhtari <mmokhi@freebsd.org> Subject: Heads-up: you have a port that does not link with lld on i386 Message-ID: <CAPyFy2C2WgdGCpFcw1x7kRSqHf1%2BX=XbdKB8=Mc-PspBzQPfQg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Antoine just finished an exp-run in PR214864 for issues with LLVM's lld linker as /usr/bin/ld, and the folks in the To: line are listed as maintainer for one or more of the 85 or so ports that failed in that exp-run. Poudriere build link:http://package18.nyi.freebsd.org/build.html?mastername=headi386PR214864-default&build=2018-09-18_21h13m11s One of the most common issues that lld exposes is ports that link non-PIC code into shared objects; by default lld disallows this and results in an error. This shows up as an error like: /usr/bin/ld: error: can't create dynamic relocation R_386_32 against symbol: _glapi_Dispatch in readonly segment; recompile object files with -fPIC >>> defined in .libs/shared_glapi_libglapi_la-u_current.o >>> referenced by entry.c >>> .libs/shared_glapi_libglapi_la-entry.o:(.text+0x1) In many cases I've taken to adding LDFLAGS_i386=-Wl,-znotext which just overrides lld's default and makes it the same as GNU ld (allowing .text relocations), although a better fix would entail understanding the port's build and any reason it may explicitly be avoiding PIC on i386. If you have a moment I'd appreciate it if you can investigate your port's failure and apply a fix. If the problem is other than the one described above, or the LDFLAGS_i386 workaround is not effective, I'm happy to help find a different fix. -Ed
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2C2WgdGCpFcw1x7kRSqHf1%2BX=XbdKB8=Mc-PspBzQPfQg>