Fedora Linux Support Community & Resources Center
  #1  
Old 1st May 2011, 08:17 AM
calanor Offline
Registered User
 
Join Date: Sep 2009
Location: India
Posts: 93
linuxchrome
failed dependencies while installing

Hi, this is my first attempt at making an RPM. In the software's install script it installs libs in /usr/lib when on fedora x86_64 it should be /usr/lib64 or it doesn't work. Is there a way I can mv the lib to correct location while installing ?


Also installing the package fails with this error:

Resolving Dependencies
--> Running transaction check
---> Package eiskaltdcpp.x86_64 0:2.2.2-1.fc15 will be installed
--> Processing Dependency: /usr/bin/php5 for package: eiskaltdcpp-2.2.2-1.fc15.x86_64
--> Processing Dependency: /usr/bin/php5 for package: eiskaltdcpp-2.2.2-1.fc15.x86_64
--> Finished Dependency Resolution
Error: Package: eiskaltdcpp-2.2.2-1.fc15.x86_64 (/eiskaltdcpp-2.2.2-1.fc15.x86_64)
Requires: /usr/bin/php5

But I have php-cli installed. The binary is called php and not php5 how do I tell it to use that ?

Spec file:
Name: eiskaltdcpp
Version: 2.2.2
Release: 1%{?dist}
Summary: Eiskaltdcpp Direct Connect protocol client
License: GPLv3
URL: http://code.google.com/p/eiskaltdc/
Source0: http://eiskaltdc.googlecode.com/file...p-2.2.2.tar.xz
BuildRequires: cmake, gcc, zlib-devel, bzip2-devel, lua-devel
BuildRequires: pkgconfig, boost-devel, aspell-devel, openssl-devel
BuildRequires: subversion, git, libidn-devel, qt-devel, gcc-c++
Requires: qt, qt-x11, bzip2, zlib, php-cli
Requires: gettext, openssl, lua, aspell

%description

%prep
%setup -q

%build
mkdir -p builddir && cd builddir
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT/usr -DUSE_QT=ON -DUSE_GTK=OFF -DUSE_JS=ON -DUSE_ASPELL=ON -DFREE_SPACE_BAR_C=ON -DCREATE_MO=ON -DLUA_SCRIPT=ON -DWITH_SOUNDS=ON -DWITH_LUASCRIPTS=ON -DUSE_MINIUPNP=OFF ../
make -j2
make install

%files
%defattr(-,root,root)
%{_bindir}/eiskaltdcpp-qt
/usr/lib/libeiskaltdcpp.so.2.2
/usr/share/*

%doc

%changelog
__________________
Fedora 15 x86_64, thinkpad edge 14

Common sense can not be compiled.
Reply With Quote
  #2  
Old 1st May 2011, 09:20 AM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: failed dependencies while installing

Try this spec file as yours had some major errors, you never prefix using the buildroot in the path.
The error was caused because rpm will automatically find the requires for any executeable,


Code:
Name: eiskaltdcpp
Version: 2.2.2
Release: 1%{?dist}
Summary: Eiskaltdcpp Direct Connect protocol client
License: GPLv3
URL: http://code.google.com/p/eiskaltdc/
Source0: http://eiskaltdc.googlecode.com/files/eiskaltdcpp-2.2.2.tar.xz
BuildRequires: cmake, gcc, zlib-devel, bzip2-devel, lua-devel
BuildRequires: pkgconfig, boost-devel, aspell-devel, openssl-devel
BuildRequires: subversion, git, libidn-devel, qt-devel, gcc-c++
Requires: qt-x11, bzip2, zlib, php-cli
Requires: gettext, openssl, lua, aspell

%description

%prep
%setup -q

%build
mkdir build
pushd build
%cmake -DCMAKE_BUILD_TYPE=Release -DUSE_QT=ON -DUSE_GTK=OFF -DUSE_JS=ON -DUSE_ASPELL=ON -DFREE_SPACE_BAR_C=ON -DCREATE_MO=ON -DLUA_SCRIPT=ON -DWITH_SOUNDS=ON -DWITH_LUASCRIPTS=ON -DUSE_MINIUPNP=OFF ../
make %{?_smp_mflags}
popd

%install
pushd build
make DESTDIR=%{buildroot} install
popd

#fix php5 requirement error
sed -i -e 's,/usr/bin/php5,/usr/bin/php,g' %{buildroot}%{_datadir}/eiskaltdcpp/qt/qtscripts/gnome/commands.ru_RU.UTF-8.php \
%{buildroot}%{_datadir}/eiskaltdcpp/examples/xmms2_audacious2.ru_RU.UTF-8.php \
%{buildroot}%{_datadir}/eiskaltdcpp/examples/commands.ru_RU.UTF-8.php

%files
%defattr(-, root, root)
%{_bindir}/eiskaltdcpp-qt
%{_libdir}/libeiskaltdcpp.so.2.2
%{_datadir}/*

%doc

%changelog
Reply With Quote
  #3  
Old 1st May 2011, 10:07 AM
calanor Offline
Registered User
 
Join Date: Sep 2009
Location: India
Posts: 93
linuxchrome
Re: failed dependencies while installing

And I thought I will learn packaging easily :P

Thanks for your time leigh, I have some questions (I hope you don't mind)

1)what does this do?
#fix php5 requirement error
sed -i -e 's,/usr/bin/php5,/usr/bin/php,g' %{buildroot}%{_datadir}/eiskaltdcpp/qt/qtscripts/gnome/commands.ru_RU.UTF-8.php \
%{buildroot}%{_datadir}/eiskaltdcpp/examples/xmms2_audacious2.ru_RU.UTF-8.php \
%{buildroot}%{_datadir}/eiskaltdcpp/examples/commands.ru_RU.UTF-8.php

2)when the software itself contains the install script why do we need this ?
%install
pushd build
make DESTDIR=%{buildroot} install
popd

3) why use %cmake and not a simple cmake?

4)As I understand, the files are placed in exactly the same directories as the fake install. So if the install script is designed to put libs in /usr/lib, why putting %{_libdir} doesn't result in a file not found error as it tries to find lib64 in fake install ?
__________________
Fedora 15 x86_64, thinkpad edge 14

Common sense can not be compiled.
Reply With Quote
  #4  
Old 1st May 2011, 10:18 AM
leigh123linux
Guest
 
Posts: n/a
linuxredhatfirefox
Re: failed dependencies while installing

1. sed removes /usr/bin/php5 and replaces it with /usr/bin/php in the three file I listed
2. your building a rpm why rely on some dodgy install script.
3. using %cmake will use the fedora cmake macro.
4. as I said the install script isn't good for rpm's , not everyone runs 32bit and the software compiles on 64bit

on a 32bit sytem %{_libdir} =/usr/lib
on a 64 bit system %{_libdir} =/usr/lib64
Reply With Quote
  #5  
Old 1st May 2011, 10:23 AM
calanor Offline
Registered User
 
Join Date: Sep 2009
Location: India
Posts: 93
linuxchrome
Re: failed dependencies while installing

on a 64 bit system %{_libdir} corresponds to /usr/lib64
while in the install phase(in the buildroot) the software puts libs in /usr/lib irrespective of the underlying architecture. So when on a 64 bit system I just specify %{_libdir}=/usr/lib64, why doesn't it complain about missing file/directory.
Maybe I am getting it all wrong.

Also how did you find where to replace php5 with php ?

One more thing
make DESTDIR=%{buildroot} install
this still uses the software's instal,l right ?
__________________
Fedora 15 x86_64, thinkpad edge 14

Common sense can not be compiled.

Last edited by calanor; 1st May 2011 at 10:28 AM.
Reply With Quote
  #6  
Old 1st May 2011, 10:39 AM
leigh123linux
Guest
 
Posts: n/a
linuxredhatfirefox
Re: failed dependencies while installing

Quote:
Originally Posted by calanor View Post
on a 64 bit system %{_libdir} corresponds to /usr/lib64
while in the install phase(in the buildroot) the software puts libs in /usr/lib irrespective of the underlying architecture. So when on a 64 bit system I just specify %{_libdir}=/usr/lib64, why doesn't it complain about missing file/directory.
Maybe I am getting it all wrong.

Also how did you find where to replace php5 with php ?

One more thing
make DESTDIR=%{buildroot} install
this still uses the software's instal,l right ?
Does it?, it didn't here.


Quote:
Also how did you find where to replace php5 with php
I just checked the built rpm for php files
Reply With Quote
  #7  
Old 1st May 2011, 10:47 AM
calanor Offline
Registered User
 
Join Date: Sep 2009
Location: India
Posts: 93
linuxchrome
Re: failed dependencies while installing

Quote:
Originally Posted by leigh123linux View Post
I just checked the built rpm for php files
how ????

And we are still using the software's install script ? (I guess yeah). Then how does it save us from a dodgy script ?
__________________
Fedora 15 x86_64, thinkpad edge 14

Common sense can not be compiled.
Reply With Quote
Reply

Tags
dependencies, failed, installing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Having problems with failed dependencies in installing RPM auny87 Programming & Packaging 15 24th January 2011 05:59 AM
Failed dependencies anitha2324 Using Fedora 2 2nd October 2007 08:38 AM
failed dependencies installing an RPM bane Using Fedora 2 7th March 2006 06:03 AM
Shown Failed Dependencies while installing Adobe Reader kalpana Using Fedora 4 5th October 2005 05:08 AM
installing centericq failed dependencies HadroLepton Using Fedora 3 8th January 2005 01:54 AM


Current GMT-time: 02:24 (Wednesday, 24-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat