Author Topic: Methods of determining dependencies ?  (Read 530 times)

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Methods of determining dependencies ?
« on: December 04, 2012, 08:14:52 AM »
There are 4 things to be considered in packaging.
Depends and Provides.
Build time and Run time.

Other than any documentation on their website I have understood the following methods:
1. Readme / Install / Instructions etc text files that come with the source.
2. For Qt software, .pro .pri files.
3. make file ?

I am at a loss further. Kindly help.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Re: Methods of determining dependencies ?
« Reply #1 on: December 04, 2012, 09:01:11 AM »
Other than any documentation on their website I have understood the following methods:
1. Readme / Install / Instructions etc text files that come with the source.
2. For Qt software, .pro .pri files.
3. make file ?
I am at a loss further. Kindly help.

If the source is a GNU automake project the configure script will check and report any missing dependencies.  You can also run the configure script with --help to get a list of any "optional" features/dependencies which are available.  For cmake projects the cmake command checks and reports any missing dependencies.

Terry.
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1160
Re: Methods of determining dependencies ?
« Reply #2 on: December 04, 2012, 09:28:31 AM »
just to add three more sometimes you have imake or scons or waf, can't remember whether there was a special file for imake but the rest has own files. but this types appear very seldom.
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3793
Re: Methods of determining dependencies ?
« Reply #3 on: December 04, 2012, 12:41:14 PM »
After you've read the documentation on the website for installing, then looked at a couple of existing spec files, looked at ./configure --help, then you build it and watch for errors. This is no big deal for small programs that build really fast. ;D

Galen

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: Methods of determining dependencies ?
« Reply #4 on: December 04, 2012, 08:32:20 PM »
I see one problem with using existing .spec files - They may be outdated.

The library versions they refer to may be need to be updated. (learnt from my FirstEffort and more recent BueDevil)

Older requirements may no longer be needed.

How to know these things? Is it written somewhere inside the source code?
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3793
Re: Methods of determining dependencies ?
« Reply #5 on: December 04, 2012, 11:05:18 PM »
If the dependencies have changed, it is usually documented. Most of the time, it will also not build and generate an error. Then you google, ask on the forum, and occasionally you may have to ask the original developer for assistance.

Galen

Offline tele

  • Full Member
  • ***
  • Posts: 196
Re: Methods of determining dependencies ?
« Reply #6 on: December 05, 2012, 07:01:30 AM »
1. If the dependency is not used it will not be an error.
  Best way
Quote
Posted by: gseaman
After you've read the documentation on the website for installing, then looked at a couple of existing spec files,

But this we can have without documentation, I'm looking for this too.

About make file, and ./configure
I can't find command or ways how print all dependencies from make or ./configure. , maybe exist, I do not know.
When I use ./configure I see all in output from terminal, but not all code source have file ./configure.
./configure was written  developer source code, so part of dependencies can have other name in different Linux distributions.
We can create Dictionary of packages and libraries for pclinux when we looking for dependencies,
some packages have name's ... -devel, but not all.
Sometimes dependencies are created in or when make file run, I can only open files from code source to text editor and look,
but look at the code and run make with debug mode it is not comfortable.


Other way is debug, but this working after build rpm and
ldd - but I thing this print only shared library dependencies  
http://www.debian.org/doc/manuals/debian-reference/ch12.en.html#_check_dependency_on_libraries
, like:

Code: [Select]
$ ldd /bin/ls
linux-gate.so.1 =>  (0xffffe000)
librt.so.1 => /lib/i686/librt.so.1 (0xb787b000)
libcap.so.2 => /lib/libcap.so.2 (0xb7876000)
libacl.so.1 => /lib/libacl.so.1 (0xb786e000)
libc.so.6 => /lib/i686/libc.so.6 (0xb7706000)
libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb76ec000)
/lib/ld-linux.so.2 (0xb78b0000)
libattr.so.1 => /lib/libattr.so.1 (0xb76e6000)

And now I can search this, like:
apt-cache searchfile name_of_lib
Code: [Select]
$ apt-cache searchfile linux-gate
$

So nothing, not always ldd work as I want, I can search in web , what it is
http://www.trilithium.com/johan/2005/08/linux-gate/
but not this way I 'm looking

If this will exist, I can check to see if I have installed package with this lib
rpm -qa | grep name_of_package

TerryN once wrote about ldd and rpm -q in:
http://www.pclinuxos.com/forum/index.php/topic,101266.msg905539.html#msg905539

It looks interesting also "tracing program activities" but It also has limitations and this is not comfortable
http://www.debian.org/doc/manuals/debian-reference/ch09.en.html#_tracing_program_activities

Quote
$ strace ls
execve("/bin/ls", ["ls"], [/* 88 vars */]) = 0
brk(0)                                  = 0x93b1000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb774b000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=177577, ...}) = 0
mmap2(NULL, 177577, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7705000
close(3)                                = 0
open("/lib/i686/librt.so.1", O_RDONLY)  = 3
......

________
If I wrote something wrong, please correct me.

« Last Edit: December 05, 2012, 09:28:27 AM by tele »
---
Sorry, if my language is wrong,
you please write notice where I do mistakes, I will try to learn.

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3991
Re: Methods of determining dependencies ?
« Reply #7 on: December 05, 2012, 09:42:17 AM »
Search in Synaptic for "Provided Packages" rather than name. If a package has a different name in pclos it should have a Provides: line in its .spec file giving the usual name for the package so it can be installed as a dependency.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf