Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "python does not have .gnu.prelink_undo section"

I need to package a virtualenv as an rpm. I found a sample spec file for plone here

My project uses python 2.7 and for that I've built python from source. Therefore I changed some of the spec file to

/usr/local/bin/virtualenv-3.4 --no-site-packages --distribute %{_builddir}/usr/local/virtualenvs/%{shortname}

I'm getting the following error on rpmbuild -bb requirements.spec

+ /usr/sbin/prelink -u /var/lib/jenkins/rpmbuild/BUILDROOT/requirements-1.0-1.x86_64/usr/local/virtualenvs/requirements/bin/python
/usr/sbin/prelink: /var/lib/jenkins/rpmbuild/BUILDROOT/requirements-1.0-1.x86_64/usr/local/virtualenvs/requirements/bin/python does not have .gnu.prelink_undo section

I'm assuming I need to rebuild python and enable the prelinking during the ./configure. How can I do that?

like image 377
Sam Hammamy Avatar asked May 11 '26 00:05

Sam Hammamy


1 Answers

I had a similar issue recently with a SPEC file that was also based on this example from plone.

In my case I'm using python27 RPMs from IUS repository and want to avoid building it from source.

My workaround was to disable prelink completely in my SPEC file:

  • add this: %define __prelink_undo_cmd %{nil}

  • comment out this:

    # # This avoids prelink & RPM helpfully breaking the package signatures:

    # /usr/sbin/prelink -u $RPM_BUILD_ROOT/usr/local/virtualenvs/%{shortname}/bin/python

like image 165
powo Avatar answered May 12 '26 15:05

powo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!