Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failed with separate-code linker option #17497

Open
2 tasks done
nuqleo opened this issue Nov 23, 2024 · 2 comments
Open
2 tasks done

Compilation failed with separate-code linker option #17497

nuqleo opened this issue Nov 23, 2024 · 2 comments
Labels
triage Needs further investigation

Comments

@nuqleo
Copy link

nuqleo commented Nov 23, 2024

Description

frr compilation failed on Fedora x86_64 and i686 but successed on aarch64, ppc64le, s390x with binutils-2.43.50-7.fc42.x86_64.

Version

frr 10.1

How to reproduce

Compile frr for Fedora 42 with latest binutils package.

Expected behavior

compilation succeeded

Actual behavior

make[1]: Entering directory '/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1'
lib/clippy ./python/xrelfo.py -Wlog-format -Wlog-args -o lib/libfrrsnmp.la.xref lib/libfrrsnmp.la
while processing lib/libfrrsnmp.la:
Traceback (most recent call last):
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 478, in _main
xrelfo.load_file(fn)
~~~~~~~~~~~~~~~~^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 364, in load_file
self.load_elf(filename, orig_filename)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 414, in load_elf
for ptr in ptrs:
^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 493, in iter_data
yield scls(ELFData(self, offset, size))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 324, in init
data = dataptr.get_data(struct.calcsize(pspec))
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 120, in get_data
return self._dstsect[self._dstoffs : self._dstoffs + reflen]
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 462, in getitem
return self._obj[k]
~~~~~~~~~^^^
OverflowError: Python int too large to convert to C ssize_t
make[1]: *** [Makefile:17918: lib/libfrrsnmp.la.xref] Error 1
make[1]: Leaving directory '/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1'
make[1]: *** Waiting for unfinished jobs....
make[1]: Entering directory '/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1'
lib/clippy ./python/xrelfo.py -Wlog-format -Wlog-args -o lib/libfrrcares.la.xref lib/libfrrcares.la
while processing lib/libfrrcares.la:
Traceback (most recent call last):
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 478, in _main
xrelfo.load_file(fn)
~~~~~~~~~~~~~~~~^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 364, in load_file
self.load_elf(filename, orig_filename)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 414, in load_elf
for ptr in ptrs:
^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 493, in iter_data
yield scls(ELFData(self, offset, size))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 324, in init
data = dataptr.get_data(struct.calcsize(pspec))
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 120, in get_data
return self._dstsect[self._dstoffs : self._dstoffs + reflen]
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 462, in getitem
return self._obj[k]
~~~~~~~~~^^^
OverflowError: Python int too large to convert to C ssize_t
make[1]: *** [Makefile:17918: lib/libfrrcares.la.xref] Error 1
make[1]: Leaving directory '/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1'
make[1]: Entering directory '/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1'
lib/clippy ./python/xrelfo.py -Wlog-format -Wlog-args -o qpb/libfrr_pb.la.xref qpb/libfrr_pb.la
while processing qpb/libfrr_pb.la:
Traceback (most recent call last):
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 478, in _main
xrelfo.load_file(fn)
~~~~~~~~~~~~~~~~^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 364, in load_file
self.load_elf(filename, orig_filename)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 414, in load_elf
for ptr in ptrs:
^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 493, in iter_data
yield scls(ELFData(self, offset, size))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 324, in init
data = dataptr.get_data(struct.calcsize(pspec))
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 120, in get_data
return self._dstsect[self._dstoffs : self._dstoffs + reflen]
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 462, in getitem
return self._obj[k]
~~~~~~~~~^^^
OverflowError: Python int too large to convert to C ssize_t
make[1]: *** [Makefile:17918: qpb/libfrr_pb.la.xref] Error 1
make[1]: Leaving directory '/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1'
make[1]: Entering directory '/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1'
lib/clippy ./python/xrelfo.py -Wlog-format -Wlog-args -o fpm/libfrrfpm_pb.la.xref fpm/libfrrfpm_pb.la
while processing fpm/libfrrfpm_pb.la:
Traceback (most recent call last):
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 478, in _main
xrelfo.load_file(fn)
~~~~~~~~~~~~~~~~^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 364, in load_file
self.load_elf(filename, orig_filename)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/./python/xrelfo.py", line 414, in load_elf
for ptr in ptrs:
^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 493, in iter_data
yield scls(ELFData(self, offset, size))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 324, in init
data = dataptr.get_data(struct.calcsize(pspec))
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 120, in get_data
return self._dstsect[self._dstoffs : self._dstoffs + reflen]
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/rpmbuild/BUILD/frr-10.1-build/frr-10.1/python/clippy/elf.py", line 462, in getitem
return self._obj[k]
~~~~~~~~~^^^
OverflowError: Python int too large to convert to C ssize_t
make[1]: *** [Makefile:17918: fpm/libfrrfpm_pb.la.xref] Error 1

Additional context

Compilation succeeded after disabling separate-code linker option by setting ldflags in rpm spec file

export LDFLAGS="%{build_ldflags} -Wl,-z,noseparate-code"

See https://bugzilla.redhat.com/show_bug.cgi?id=2327314

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@nuqleo nuqleo added the triage Needs further investigation label Nov 23, 2024
@donaldsharp
Copy link
Member

Can you include the configure line you used?

@nuqleo
Copy link
Author

nuqleo commented Nov 26, 2024

build.log
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --sbindir=/usr/libexec/frr --sysconfdir=/etc/frr --libdir=/usr/lib64/frr --libexecdir=/usr/libexec/frr --localstatedir=/run/frr --enable-multipath=64 --enable-vtysh=yes --disable-ospfclient --disable-ospfapi --enable-snmp=agentx --enable-user=frr --enable-group=frr --enable-vty-group=frrvty --enable-rtadv --disable-exampledir --enable-systemd=yes --enable-static=no --disable-ldpd --disable-babeld --with-moduledir=/usr/lib64/frr/modules --with-yangmodelsdir=/usr/share/frr-yang/ --with-crypto=openssl --enable-fpm --enable-grpc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

2 participants