 |
 |
 |
 |
| Programming & Packaging A place to discuss programming and packaging. |

7th August 2011, 08:58 AM
|
|
Registered User
|
|
Join Date: Aug 2010
Posts: 61

|
|
|
Mock: Problems finding BuildRequires dependencies
I'm trying to package pcsx2 for fedora. I've successfully built an rpm in my normal environment, but when I try to package in Mock, somehow I'm not picking up the dependencies I've set. I'm fairly new to all this - I wonder if someone could tell me where I'm going wrong.
my spec file lists the following dependencies:
Code:
Name: pcsx2
Version: 4841
Release: 1%{?dist}
Summary: A Sony Playstation2 emulator
Group: Applications/Emulators
License: GNU GPLv3
URL: http://pcsx2.net/
Source0: http://pcsx2.googlecode.com/svn/trunk/%{name}/%{name}-%{version}.tar.gz
Source1: %{name}.desktop
Source2: %{name}.xpm
BuildArch: i686
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils, cmake, bzip2-devel, bzip2, glew-devel, glew, mesa-libGL-devel, mesa-libGL, mesa-libGLU-devel, mesa-libGLU, mesa-libGLw-devel, mesa-libGLw, mesa-libOSMesa-devel, mesa-libOSMesa, alsa-lib-devel, alsa-lib, Cg, libCg, libXxf86vm-devel, libXxf86vm, xorg-x11-proto-devel, xorg-x11-xtrans-devel, libX11-devel, libX11-common, libX11, soundtouch-devel, soundtouch, SDL, SDL-devel, sparsehash-devel, freetype-devel, freetype, gtk2, gtk2-devel, zlib, zlib-devel, libjpeg-devel, libjpeg, libjpeg-static, wxGTK, wxGTK-devel, portaudio, portaudio-devel, atk-devel, bakefile, cairo-devel, glib, glib-devel, gtk+, gtk+-devel, imake, lesstif, lesstif-devel, libGLEWmx, libXft-devel, libXp, libXp-devel, pango-devel, pixman-devel, python-empy, wxBase, wxGTK-gl, wxGTK-media
Requires: cmake, bzip2-devel.i686, bzip2.i686, glew-devel.i686, glew.i686, mesa-libGL-
...
%description
PCSX2 is an open source Playstation 2 emulator
I install the build dependencies into mock in the usual way:
Code:
mock -r fedora-14-i386 --install desktop-file-utils cmake bzip2-devel bzip2 glew-devel glew mesa-libGL-devel mesa-libGL mesa-libGLU-devel mesa-libGLU mesa-libGLw-devel mesa-libGLw mesa-libOSMesa-devel mesa-libOSMesa alsa-lib-devel alsa-lib Cg libCg libXxf86vm-devel libXxf86vm xorg-x11-proto-devel xorg-x11-xtrans-devel libX11-devel libX11-common libX11 soundtouch-devel soundtouch SDL SDL-devel sparsehash-devel freetype-devel freetype gtk2 gtk2-devel zlib zlib-devel libjpeg-devel libjpeg libjpeg-static wxGTK wxGTK-devel portaudio portaudio-devel atk-devel bakefile cairo-devel glib glib-devel gtk+ gtk+-devel imake lesstif lesstif-devel libGLEWmx libXft-devel libXp libXp-devel pango-devel pixman-devel python-empy wxBase wxGTK-gl wxGTK-media
But I can't get mock to recognise any of the BuildRequires dependencies:
Code:
$ mock -r fedora-14-i386 --arch i686 --shell
...
mock-chroot> rpmbuild -ba pcsx2.spec
rpmdb: __db_meta_setup: /var/lib/rpm/Name: unexpected file type or format
error: cannot open Name index using db3 - Invalid argument (22)
rpmdb: __db_meta_setup: /var/lib/rpm/Providename: unexpected file type or format
error: cannot open Providename index using db3 - Invalid argument (22)
rpmdb: __db_meta_setup: /var/lib/rpm/Providename: unexpected file type or format
rpmdb: __db_meta_setup: /var/lib/rpm/Providename: unexpected file type or format
...
rpmdb: __db_meta_setup: /var/lib/rpm/Providename: unexpected file type or format
rpmdb: __db_meta_setup: /var/lib/rpm/Providename: unexpected file type or format
error: Failed build dependencies:
desktop-file-utils is needed by pcsx2-4841-1.fc14.i686
cmake is needed by pcsx2-4841-1.fc14.i686
bzip2-devel is needed by pcsx2-4841-1.fc14.i686
bzip2 is needed by pcsx2-4841-1.fc14.i686
glew-devel is needed by pcsx2-4841-1.fc14.i686
glew is needed by pcsx2-4841-1.fc14.i686
mesa-libGL-devel is needed by pcsx2-4841-1.fc14.i686
mesa-libGL is needed by pcsx2-4841-1.fc14.i686
mesa-libGLU-devel is needed by pcsx2-4841-1.fc14.i686
mesa-libGLU is needed by pcsx2-4841-1.fc14.i686
mesa-libGLw-devel is needed by pcsx2-4841-1.fc14.i686
mesa-libGLw is needed by pcsx2-4841-1.fc14.i686
mesa-libOSMesa-devel is needed by pcsx2-4841-1.fc14.i686
mesa-libOSMesa is needed by pcsx2-4841-1.fc14.i686
alsa-lib-devel is needed by pcsx2-4841-1.fc14.i686
alsa-lib is needed by pcsx2-4841-1.fc14.i686
Cg is needed by pcsx2-4841-1.fc14.i686
libCg is needed by pcsx2-4841-1.fc14.i686
libXxf86vm-devel is needed by pcsx2-4841-1.fc14.i686
libXxf86vm is needed by pcsx2-4841-1.fc14.i686
xorg-x11-proto-devel is needed by pcsx2-4841-1.fc14.i686
xorg-x11-xtrans-devel is needed by pcsx2-4841-1.fc14.i686
libX11-devel is needed by pcsx2-4841-1.fc14.i686
libX11-common is needed by pcsx2-4841-1.fc14.i686
libX11 is needed by pcsx2-4841-1.fc14.i686
soundtouch-devel is needed by pcsx2-4841-1.fc14.i686
soundtouch is needed by pcsx2-4841-1.fc14.i686
SDL is needed by pcsx2-4841-1.fc14.i686
SDL-devel is needed by pcsx2-4841-1.fc14.i686
sparsehash-devel is needed by pcsx2-4841-1.fc14.i686
freetype-devel is needed by pcsx2-4841-1.fc14.i686
freetype is needed by pcsx2-4841-1.fc14.i686
gtk2 is needed by pcsx2-4841-1.fc14.i686
gtk2-devel is needed by pcsx2-4841-1.fc14.i686
zlib is needed by pcsx2-4841-1.fc14.i686
zlib-devel is needed by pcsx2-4841-1.fc14.i686
libjpeg-devel is needed by pcsx2-4841-1.fc14.i686
libjpeg is needed by pcsx2-4841-1.fc14.i686
libjpeg-static is needed by pcsx2-4841-1.fc14.i686
wxGTK is needed by pcsx2-4841-1.fc14.i686
wxGTK-devel is needed by pcsx2-4841-1.fc14.i686
portaudio is needed by pcsx2-4841-1.fc14.i686
portaudio-devel is needed by pcsx2-4841-1.fc14.i686
atk-devel is needed by pcsx2-4841-1.fc14.i686
bakefile is needed by pcsx2-4841-1.fc14.i686
cairo-devel is needed by pcsx2-4841-1.fc14.i686
glib is needed by pcsx2-4841-1.fc14.i686
glib-devel is needed by pcsx2-4841-1.fc14.i686
gtk+ is needed by pcsx2-4841-1.fc14.i686
gtk+-devel is needed by pcsx2-4841-1.fc14.i686
imake is needed by pcsx2-4841-1.fc14.i686
lesstif is needed by pcsx2-4841-1.fc14.i686
lesstif-devel is needed by pcsx2-4841-1.fc14.i686
libGLEWmx is needed by pcsx2-4841-1.fc14.i686
libXft-devel is needed by pcsx2-4841-1.fc14.i686
libXp is needed by pcsx2-4841-1.fc14.i686
libXp-devel is needed by pcsx2-4841-1.fc14.i686
pango-devel is needed by pcsx2-4841-1.fc14.i686
pixman-devel is needed by pcsx2-4841-1.fc14.i686
python-empy is needed by pcsx2-4841-1.fc14.i686
wxBase is needed by pcsx2-4841-1.fc14.i686
wxGTK-gl is needed by pcsx2-4841-1.fc14.i686
wxGTK-media is needed by pcsx2-4841-1.fc14.i686
What am I doing wrong..?
|

9th August 2011, 10:53 PM
|
 |
Retired Community Manager
|
|
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,371

|
|
|
Re: Mock: Problems finding BuildRequires dependencies
Not sure at first glance, but you may have a funky entry in your spec file?
Quote:
error: cannot open Name index using db3 - Invalid argument (22)
rpmdb: __db_meta_setup: /var/lib/rpm/Providename: unexpected file type or format
error: cannot open Providename index using db3 - Invalid argument (22)
rpmdb: __db_meta_setup: /var/lib/rpm/Providename: unexpected file type or format
rpmdb: __db_meta_setup: /var/lib/rpm/Providename: unexpected file type or format
|
You may also just need to clean out the yum cache .. ?
yum clean all
If you haven't already done so, install the mock-rpmfusion-free and mock-rpmfusion-nonfree
Some of your BuildRequires: Cg libCg
for example, are proprietary.
Since you have a src rpm already built, try running:
mock -r fedora-14-i386-rpmfusion_nonfree rebuild /path/to/your/package-1.src.rpm
See how that goes.
Look at the logs if it errors out and post back.
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
|

10th August 2011, 11:30 AM
|
|
Registered User
|
|
Join Date: Aug 2010
Posts: 61

|
|
|
Re: Mock: Problems finding BuildRequires dependencies
Great, thanks for the suggestions. I'll be back with results soon
|

10th August 2011, 06:23 PM
|
|
Registered User
|
|
Join Date: Aug 2010
Posts: 61

|
|
|
Re: Mock: Problems finding BuildRequires dependencies
Hmmm. The build fails on F14. I think a library is misnamed for the version.
From the fc14 log:
Code:
DEBUG util.py:250: Error: No Package found for libGLEWmx
So: How do I do the equivalent of "yum provides libGLEWmx" to see if a package exists in fc14...? (i'm natively in fc15)
To see if this was the only problem, I then tried rebuilding in mock-fc15. This stopped much later with errors.
I can't see an obvious reason why that rebuild crashed in the log.
I've attached both the log files as well as the spec file (so you can see if it's obviously borked).
|

10th August 2011, 08:23 PM
|
 |
Retired Community Manager
|
|
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,371

|
|
|
Re: Mock: Problems finding BuildRequires dependencies
Often, not always package requirements are labelled differently from different distributions of Linux.
For example, the package that you probably want is
glew-devel
in Fedora
From your FC14 root log:
Quote:
|
Error: No Package found for libGLEWmx
|
so remove that from your spec file as it is an error.
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
|

11th August 2011, 09:42 AM
|
|
Registered User
|
|
Join Date: Aug 2010
Posts: 61

|
|
|
Re: Mock: Problems finding BuildRequires dependencies
I think the package requirements are correct as I can build pcsx2 fine from source.
glew-devel is already specified; I added libGLEWmx when initially building the rpm outside of mock in fc15: rpmbuild said it was missing, and adding it to the buildrequires list in the SPEC remedied this: My understanding was that buildrequires did not install package dependencies and a full list of these should be included, so it seemed to make sense.
There's no question of libGLEWmx not existing as a fedora 15 package:
Code:
$yum search libGLEWmx
Loaded plugins: downloadonly, fastestmirror, langpacks, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora: mirror.netrino.co.uk
* rpmfusion-free: mirrors.coreix.net
* rpmfusion-free-updates: mirrors.coreix.net
* rpmfusion-nonfree: mirrors.coreix.net
* rpmfusion-nonfree-updates: mirrors.coreix.net
* updates: mirror.netrino.co.uk
updates/pkgtags | 40 kB 00:00
================================= N/S Matched: libGLEWmx ==================================
libGLEWmx.i686 : libGLEWmx
I thought from what mock spat out that libGLEWmx might be called something else in fc14 and was wondering what that name might be, but can't think of a command that will search the fc14 repositories from my fc15 setup.
Incidently, I had this same problem with mock not compiling the buildrequires section of a spec file when I rebuilt the wxWidgets libraries using a modified official fedora spec file. I got around the problem by removing buildrequires altogether and doing: mock -r xxxx.cfg install [required packages]. I'm tempted to do this again, just to get the rpm out: although it won't build a correct source rpm
|

13th August 2011, 04:27 AM
|
 |
Retired Community Manager
|
|
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,371

|
|
|
Re: Mock: Problems finding BuildRequires dependencies
Quote:
Originally Posted by Witgetsteinsbee
I think the package requirements are correct as I can build pcsx2 fine from source.
glew-devel is already specified; I added libGLEWmx when initially building the rpm outside of mock in fc15: rpmbuild said it was missing, and adding it to the buildrequires list in the SPEC remedied this: My understanding was that buildrequires did not install package dependencies and a full list of these should be included, so it seemed to make sense.
There's no question of libGLEWmx not existing as a fedora 15 package:
Code:
$yum search libGLEWmx
Loaded plugins: downloadonly, fastestmirror, langpacks, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora: mirror.netrino.co.uk
* rpmfusion-free: mirrors.coreix.net
* rpmfusion-free-updates: mirrors.coreix.net
* rpmfusion-nonfree: mirrors.coreix.net
* rpmfusion-nonfree-updates: mirrors.coreix.net
* updates: mirror.netrino.co.uk
updates/pkgtags | 40 kB 00:00
================================= N/S Matched: libGLEWmx ==================================
libGLEWmx.i686 : libGLEWmx
I thought from what mock spat out that libGLEWmx might be called something else in fc14 and was wondering what that name might be, but can't think of a command that will search the fc14 repositories from my fc15 setup.
Incidently, I had this same problem with mock not compiling the buildrequires section of a spec file when I rebuilt the wxWidgets libraries using a modified official fedora spec file. I got around the problem by removing buildrequires altogether and doing: mock -r xxxx.cfg install [required packages]. I'm tempted to do this again, just to get the rpm out: although it won't build a correct source rpm 
|
You spec file has a requirement for libGLEWmx
It doesn't exist as a package and that is why your getting the error you are. Remove that requirement.
libGLEWmx is the Library libGLEWmx.so
which is provided by glew-devel
Code:
$ rpm -ql glew-devel
/usr/include/GL/glew.h
/usr/include/GL/glxew.h
/usr/include/GL/wglew.h
/usr/lib64/libGLEW.so
/usr/lib64/libGLEWmx.so
/usr/lib64/pkgconfig/glew.pc
/usr/lib64/pkgconfig/glewmx.pc
/usr/share/doc/glew-devel-1.5.8
/usr/share/doc/glew-devel-1.5.8/advanced.html
/usr/share/doc/glew-devel-1.5.8/basic.html
/usr/share/doc/glew-devel-1.5.8/credits.html
/usr/share/doc/glew-devel-1.5.8/glew.css
/usr/share/doc/glew-devel-1.5.8/glew.html
/usr/share/doc/glew-devel-1.5.8/glew.png
/usr/share/doc/glew-devel-1.5.8/glew.txt
/usr/share/doc/glew-devel-1.5.8/glxew.html
/usr/share/doc/glew-devel-1.5.8/gpl.txt
/usr/share/doc/glew-devel-1.5.8/index.html
/usr/share/doc/glew-devel-1.5.8/install.html
/usr/share/doc/glew-devel-1.5.8/khronos.txt
/usr/share/doc/glew-devel-1.5.8/log.html
/usr/share/doc/glew-devel-1.5.8/mesa.txt
/usr/share/doc/glew-devel-1.5.8/new.png
/usr/share/doc/glew-devel-1.5.8/ogl_sm.jpg
/usr/share/doc/glew-devel-1.5.8/wglew.html
Mock also forces your spec file to be constructed with the packaging guidelines. In lay terms, if you use an incorrect syntax or invalid macro it will produce errors.
Most of your BuildRequires as posted are not correct for various reasons which you will continue to find by building them under mock. I only pointed out Cg LibCG and libGLEWmx for now.
It may well build outside of mock in your own environment, but mock is stricter and follows Fedora packaging requirements as i a must for all official packagers to use.
Other tools such as rpmlint can also help you identify issues.
%BuildRequires
Is placed in the section of a spec file that you manually construct. It tells the rpmbuild environment that these packages are a requirement to successfully build the software in Fedora. Each time the spec file is invoked it will check to see if those BuildRequires are installed, if so, then it proceeds to the next section. If not, the rpmbuild process will stop and echo the packages that are not installed.
See the Fedora Packaging guidelines for some more reading, and I'm sure a better explanation that I am capable of.
http://fedoraproject.org/wiki/Packag...#BuildRequires
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
|

13th August 2011, 04:29 PM
|
|
Registered User
|
|
Join Date: Aug 2010
Posts: 61

|
|
|
Re: Mock: Problems finding BuildRequires dependencies
Thank-you Seve. Removing that package from buildrequires did get things working. Build is all okay now, just ironing out some problems with the %files section. I'll let you now how things progress
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 06:25 (Tuesday, 18-06-2013)
|
|
 |
 |
 |
 |
|
|