Fedora RPM Build problem

Bug #450015 reported by LinuxDonald
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Medium
rdb
1.7.x
Fix Released
Medium
rdb
python2.6 (Fedora)
Invalid
Medium

Bug Description

First small problem is:

Processing files: panda3d-1.7.0-1.x86_64
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/etc/Confauto.prc
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/etc/Config.prc
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/panda3d
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/mime-info/panda3d.mime
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/mime-info/panda3d.keys
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/mime/packages/panda3d.xml
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/application-registry/panda3d.applications
error: File not found by glob: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/applications/*.desktop
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/etc/ld.so.conf.d/panda3d.conf
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/bin
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/lib64
error: File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/include/panda3d

RPM build errors:
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/etc/Confauto.prc
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/etc/Config.prc
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/panda3d
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/mime-info/panda3d.mime
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/mime-info/panda3d.keys
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/mime/packages/panda3d.xml
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/application-registry/panda3d.applications
    File not found by glob: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/share/applications/*.desktop
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/etc/ld.so.conf.d/panda3d.conf
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/bin
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/lib64
    File not found: /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64/usr/include/panda3d
Storing dependency cache.
Elapsed Time: 4 sec

Build terminated.

Second Problem is:
Processing files: panda3d-1.7.0-1.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/LinuxDonald/rpmbuild/BUILDROOT/panda3d-1.7.0-1.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/lib/python2.6/site-packages/panda3d.pth

RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/lib/python2.6/site-packages/panda3d.pth
Storing dependency cache.
Elapsed Time: 5 sec

Build terminated.

First /usr/lib/python2.6/site-packages/panda3d.pth must be in /usr/lib64/python2.6/site-packages/panda3d.pth on 64 Bit systems because when it is in lib and not in lib64 panda3d will don't work.

When you have any question ask it :)

Revision history for this message
In , Karsten (karsten-redhat-bugs) wrote :

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b5) Gecko/20051008 Fedora/1.5-0.5.0.beta2 Firefox/1.4.1

Description of problem:
get_python_lib() is used in many packages , p.e. Pyrex to determine where the python files should be installed when 'python setup.py' is being run.
On a 64bit machine get_python_lib() returns '/usr/lib/python2.4/site-packages'
but should return '/usr/lib64/python2.4/site-packages'

Version-Release number of selected component (if applicable):
python-2.4.1-14

How reproducible:
Always

Steps to Reproduce:
On a x86_64 machine (64bit installation):
#python
Python 2.4.1 (#1, Oct 6 2005, 15:06:07)
[GCC 4.0.2 20050928 (Red Hat 4.0.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils.sysconfig import get_python_lib
>>> get_python_lib()
'/usr/lib/python2.4/site-packages'
>>>

This looks wrong. It should return '/usr/lib64/python2.4/site-packages'

Actual Results: This results in p.e. Pyrex not being buildable on 64bit archs as it correctly uses %{_libdir} in the specfile, but python provides the wrong path to install the filesin.

Additional info:

Revision history for this message
In , Jeremy (jeremy-redhat-bugs) wrote :

get_python_lib() returns the non arch-specific directory which is under
/usr/lib. You need to use get_python_lib(1) to get the platform specific
directory if that's required.

Since Pyrex is pure python, you _want_ things in /usr/lib, not /usr/lib64. If
they ended up in /usr/lib64 then a noarch package built on a 64bit box wouldn't
work on a 32bit box.

Revision history for this message
rdb (rdb) wrote : Re: [Bug 450015] [NEW] Fedora RPM Build problem

How can I reproduce this problem? Did you use the specfile that is used for the official binaries or did you run makepanda with the --installer option?

Revision history for this message
LinuxDonald (linuxdonald) wrote :

I have done it with makepanda/makepanda.py --t 3 --everything --installer

The Problem is that makepanda create the python module in linuxroot/usr/lib/python2.6 but that wrong on 64 bit systems it must be linuxroot/usr/lib64/python2.6

I think it can be an bug that in the make code "LIB_SUFFIX" is not implemented?

Revision history for this message
rdb (rdb) wrote : Re: [Bug 450015] Re: Fedora RPM Build problem

Actually, the problem is a bit deeper than that. Makepanda respects the lib64 prefix fine (actually, I just checked in a fix for a case where it didn't - but that was unrelated to your problem). But, it uses distutils.sysconfig.get_python_lib to determine the location of the Python site-packages directory.

Can you call this inside the python interpreter and see what it prints?
from distutils.sysconfig import get_python_lib
print get_python_lib()

Revision history for this message
rdb (rdb) wrote :

Also, please check that you don't accidentally have a 32-bits version of Python installed that you are running.

Revision history for this message
LinuxDonald (linuxdonald) wrote :

[LinuxDonald@localhost ~]$ python
Python 2.6 (r26:66714, Jun 8 2009, 16:07:29)
[GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils.sysconfig import get_python_lib
>>> print get_python_lib()
/usr/lib/python2.6/site-packages

I have only an 64 Bit python installed. I will ask the Fedora team about that.

Revision history for this message
rdb (rdb) wrote :

Hm, that would seem like a bug in Fedora indeed. But you'll probably
be able to work around the issue for now by hacking installpanda.py.

rdb (rdb)
Changed in python2.6 (Fedora):
importance: Undecided → Unknown
status: New → Unknown
Changed in python2.6 (Fedora):
status: Unknown → Invalid
Revision history for this message
rdb (rdb) wrote :

Okay, I've just checked in some fixes to makepanda based on upstream's suggestions.

Revision history for this message
LinuxDonald (linuxdonald) wrote :

Now there is an very small spec bug

on line 29 is %{python_sitelib} but it must be %{python_sitearch}

because:

%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

I have tested it. But i don't now where that is to fix in the panda3d code.

Revision history for this message
rdb (rdb) wrote :

Whoops! That is a silly mistake, sorry about that. I've just checked in a fix to makepanda.py (which generates the spec file).

Revision history for this message
LinuxDonald (linuxdonald) wrote :

Thank you for the fix now all is perfect :)

rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
Changed in python2.6 (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.