LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem building packge perl-Tk (https://www.linuxquestions.org/questions/linux-software-2/problem-building-packge-perl-tk-476361/)

Musikolo 08-22-2006 04:51 PM

Problem building packge perl-Tk
 
Hi, I have a problem building a package with perl-Tk module. The package is built fine, but when I install it get a dependency error.

I've already posted this issue in my distro forum, but since we are very few people, I've decided to find help in this large community as well.

Everything is here: http://www.yoper.com/forum/index.php...iew=getnewpost

Any help would be really appreciated...

Thanks! :)

theNbomr 08-23-2006 02:48 PM

Try installing it with cpan:

cpan Tk

--- rod.

Musikolo 08-24-2006 01:16 AM

Quote:

Originally Posted by theNbomr
Try installing it with cpan:

cpan Tk

--- rod.

Thanks a lot for your help. However, I'm afraid this will not sort the problem out. I had already installed that package (actually, both tk and tk-devel). :scratch:

The problem is that somehow rpmbuild wrongly detects the "perl >= 1:5" dependency. What I really need to know is either the reason why this is happening or a way to fix it. Maybe there is something I can add to my perl-tk.spec file that fixes this. I've compared mine with others I've found in the Internet and apparently there isn't any substantial difference. :confused:

Please, any help you can provide will be really appreciated.

Thanks. :)

theNbomr 08-24-2006 10:55 AM

I guess I don't understand your objective. You say you already installed the package, but now you are having problems intalling the package. This is not making sense. CPAN does not use the same installation methods that are used by other package managers. I believe it detects the perl version by actually running perl -v and parsing the output.

--- rod.

Musikolo 08-26-2006 06:53 AM

Quote:

Originally Posted by theNbomr
I guess I don't understand your objective. You say you already installed the package, but now you are having problems intalling the package. This is not making sense. CPAN does not use the same installation methods that are used by other package managers. I believe it detects the perl version by actually running perl -v and parsing the output.

--- rod.

Well, maybe I haven't understood what you meant. Anyway, I'll try to clear all this issue:

I have:
- TK package installed (I cannot tell you the version right now)
- Perl 5.8.8 package installed

I have achived:
- To build my own perl-tk package

The problem:
- When I installed it says I need a dependency I don't know what it means. Something like perl >= 1:5


Any clue about what's going on in here? :confused:

theNbomr 08-26-2006 05:29 PM

When you say you have the TK package installed, are you referring to the perl-Tk perl module, or Tk as in Tcl/Tk? If you already have the perl-Tk module installed, then why do you need to install another one?

When you say "I have achived: - To build my own perl-tk package", do you mean you have built the perl-tK module, but it will not install? Or are you saying that you have written some software that uses perl-Tk, and are somehow trying to install it? Or something else altogether?

Did you actually try to install perl-Tk using CPAN? If it failed, can you post the error message?

--- rod.

Musikolo 08-28-2006 12:27 PM

Quote:

Originally Posted by theNbomr
When you say you have the TK package installed, are you referring to the perl-Tk perl module, or Tk as in Tcl/Tk? If you already have the perl-Tk module installed, then why do you need to install another one?

When you say "I have achived: - To build my own perl-tk package", do you mean you have built the perl-tK module, but it will not install? Or are you saying that you have written some software that uses perl-Tk, and are somehow trying to install it? Or something else altogether?

Did you actually try to install perl-Tk using CPAN? If it failed, can you post the error message?

--- rod.

Well, I mean, as you've said, that I've built the perl-Tk module but it doesn't install because the apt-get tools complains about an unknown dependency: perl >= 1:5 :mad:

I haven't built any software based on perl-Tk nor have any problem with perl or Tcl/Tk. The ONLY problem is installing the perl-Tk RPM package I've built.

Is there any thing I have to add to the spec file I haven't yet to generate the package properly? Do you know how to fix this dependency problem? :confused:

Thanks a lot for your help! :)

PS: Below my perl-Tk.spec file.
Code:

%define        module        Tk
%define        name        perl-%{module}
%define        version        804.027
%define release        1

Summary:        Tk modules for Perl
Name:                %{name}
Version:        %{version}
Release:        %{release}
Group:                Perl/Modules
BuildRequires:        perl gcc xorg-x11-devel
License:        GPL or Artistic
URL:                http://www.cpan.org/
Source:                %{name}-%{version}.tar.bz2
Provides:        perl/tk ptk pTk
Requires:        perl
Buildroot:        %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Provides:        perl(Tk::LabRadio) perl(Tk::TextReindex)

#% package        devel
#Summary:        Tk modules for Perl (development package)
#Group:                Development/C
#Requires:        perl-Tk = %{version}

#% package        doc
#Summary:        Tk modules for Perl (documentation package)
#Group:                Development/Perl
#Requires:        perl-Tk = %{version}

%description
This package provides the modules and Tk code for Perl/Tk,
as written by Nick Ing-Simmons (pTk), John Ousterhout(Tk),
and Ioi Kim Lam(Tix).
It gives you the ability to develop perl applications using the Tk GUI.
It includes the source code for the Tk and Tix elements it uses.
The licences for the various components differ, so check the copyright.

#% description        devel
#This package provides the modules and Tk code for Perl/Tk,
#as written by Nick Ing-Simmons (pTk), John Ousterhout(Tk),
#and Ioi Kim Lam(Tix).
#It gives you the ability to develop perl applications using the Tk GUI.
#It includes the source code for the Tk and Tix elements it uses.
#The licences for the various components differ, so check the copyright.

#This is the development package.

#% description        doc
#This package provides the modules and Tk code for Perl/Tk,
#as written by Nick Ing-Simmons (pTk), John Ousterhout(Tk),
#and Ioi Kim Lam(Tix).
#It gives you the ability to develop perl applications using the Tk GUI.
#It includes the source code for the Tk and Tix elements it uses.
#The licences for the various components differ, so check the copyright.

#This is the documentation package.

%prep

%setup -q
find . -type f | xargs perl -pi -e 's|^#!.*/bin/perl\S*|#!/usr/bin/perl|'

# Make it lib64 aware, avoid patch
perl -pi -e "s,(/usr/X11(R6|\\*)|\\\$X11|\(\?:)/lib,\1/%{_lib},g" \
  myConfig pTk/mTk/{unix,tixUnix/{itcl2.0,tk4.0}}/configure

#(peroyvind) --center does no longer seem to be working, obsoleted by -c
perl -pi -e "s#--center#-c#" ./Tk/MMutil.pm

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
#% make OPTIMIZE="$RPM_OPT_FLAGS" LD_RUN_PATH=""
make %{_smp_mflags}

%install
if [ -d "$RPM_BUILD_ROOT" ] && [ "$RPM_BUILD_ROOT" != "/" ] ; then rm -rf $RPM_BUILD_ROOT; fi

make install DESTDIR=$RPM_BUILD_ROOT

# Fix the dir structure. Set the right one
mv $RPM_BUILD_ROOT/var/tmp/perl-root/usr $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT/var

#rm -rf $RPM_BUILD_ROOT
# %makeinstall_std
#% {__chmod} 644 $RPM_BUILD_ROOT%{_mandir}/man3*/*

# Remove unpackaged files, add them if you find a use
# Tie::Watch is packaged separately
rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/{Tie/Watch.pm,Tk/prolog.ps}
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{ptk{ed,sh},widget}.1*
rm -f $RPM_BUILD_ROOT%{_mandir}/man3/Tie::Watch.3pm*

## compress all .pm files (as using perl-PerlIO-gzip).
#find $RPM_BUILD_ROOT -name "*.pm" | xargs gzip -9

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc COPYING ToDo Changes README README.linux
/*


theNbomr 08-28-2006 01:37 PM

No, I don't know how to fix the dependency problem. It looks to me as if it must be a bug. That is why I suggest installing from CPAN. Why are you so opposed to try this?

--- rod.

Musikolo 08-28-2006 02:07 PM

Quote:

Originally Posted by theNbomr
No, I don't know how to fix the dependency problem. It looks to me as if it must be a bug. That is why I suggest installing from CPAN. Why are you so opposed to try this?

--- rod.

Because I'm a packager of Yoper, an i686 optimized distro, and we build all packages carefully optimized for i686. That's why we have the fastest out-of-the-box distro! I would prefer to fix the issue, if possible. I don't know how long it will take, but I think the goal is worthy. :cool:

Thanks, thanks and thanks it's all I can say for all time you've spent replying this thread. I hope someone else helps me to close this issue happily. :)

PS: Have a look to the Yoper official web site if you feel like at: http://www.yoper.com


All times are GMT -5. The time now is 12:50 AM.