From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2706806738310710982==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: Re: make the shared library optional Date: Fri, 07 Nov 2014 15:16:10 +0100 Message-ID: <1415369770.19702.30.camel@bordewijk.wildebeest.org> In-Reply-To: 54579526.5080003@imgtec.com --===============2706806738310710982== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Mon, 2014-11-03 at 14:45 +0000, Vicente Olivert Riera wrote: > I'm having a failure when doing a static build of elfutils because it > tries to build a shared library (.so). Could it be possible to add a > configure option to disable the shared library so only the static one > (.a) would be built? > = > This is the failure I'm talking about: > = > /home/chroot/media/code/buildroot/autobuilder/instance-0/output/host/opt/= ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/4.8.3/../../../.= ./mipsel-buildroot-linux-uclibc/bin/ld: > /home/chroot/media/code/buildroot/autobuilder/instance-0/output/host/opt/= ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/4.8.3/crtbeginT.= o: > relocation R_MIPS_HI16 against `a local symbol' can not be used when > making a shared object; recompile with -fPIC > /home/chroot/media/code/buildroot/autobuilder/instance-0/output/host/opt/= ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/4.8.3/crtbeginT.= o: > could not read symbols: Bad value > collect2: error: ld returned 1 exit status > Makefile:939: recipe for target 'libelf.so' failed > make[3]: *** [libelf.so] Error 1 Does that failure also happen with a normal (not patched) build? It looks like the issue is with the crtbeginT.o code, not with any of the elfutils objects? I don't immediately know why that particular object is linked into the shared library. Does the toolchain pick up the correct version? > The full build log is here: > = > http://autobuild.buildroot.net/results/16f/16f6956d5a215fe678a45cc4b24ba1= 96309ee05c/build-end.log It looks like that is a fairly old 0.155 build with several patches applied. Have you tried latest elfutils 0.160 or current git? If you think any of those patches are useful could you submit them so we can review them for inclusion upstream? Thanks, Mark --===============2706806738310710982==--