bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/29042] New: opcodes libtool regression


From: toolybird at tuta dot io
Subject: [Bug binutils/29042] New: opcodes libtool regression
Date: Sun, 10 Apr 2022 21:13:36 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29042

            Bug ID: 29042
           Summary: opcodes libtool regression
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: toolybird at tuta dot io
  Target Milestone: ---

2.38 release tarball
x86_64 Arch Linux

I'm seeing a regression upon `make install' in the opcodes dir. Essentially,
the build fails because the wrong libiberty.a (in /usr/lib) is picked up
instead of the one in the build tree. I only noticed this because my distro
accidentally installed a non-PIC libiberty.a into /usr/lib. The weird thing is,
the failure does not trigger every time. But it does fail every time when
running `make install -j1'

This bug is very similar to:
https://sourceware.org/bugzilla/show_bug.cgi?id=27360

Again, the problem rears its ugly head because libtool is now forcing a relink
upon `make install'. The relink is caused by this commit:

https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=2b677209

Reverting that commit makes the relink (and the failure) go away.

Adding -Wl,--verbose to LDFLAGS clearly shows /usr/lib/libiberty.a getting used
in the relink.

To Reproduce:
1. Install a non-PIC libiberty.a into /usr/lib
2. Build binutils with `--enabled-shared' and `--prefix=/usr'
3. Install into a tmp DESTDIR by running something like:
   make -j1 prefix="$pkgdir/usr" tooldir="$pkgdir/usr" install
4. Watch it fail to install with the error:

/usr/bin/ld: /usr/lib/libiberty.a(regex.o): warning: relocation against
`xre_max_failures' in read-only section `.text'
/usr/bin/ld: /usr/lib/libiberty.a(regex.o): relocation R_X86_64_PC32 against
symbol `xre_max_failures' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
libtool: install: error: relink `libopcodes.la' with the above command before
installing it
make[4]: *** [Makefile:847: install-bfdlibLTLIBRARIES] Error 1
make[4]: Leaving directory '/build/binutils/src/binutils-build/opcodes'
make[3]: *** [Makefile:1260: install-am] Error 2

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]