Re: Question about libcdda_paranoia

2003-10-09 Thread Henning Moll
 Look at the debian dir of the package you are backporting. ;)
 Hint - k3b-0.9/debian/patches/02_k3bcdparanoialib.dpatch

My fault: i did not do a backport. I just build a woody package from 
pure upstream sources... But thank you for the hint.

Henning




Question about libcdda_paranoia

2003-10-08 Thread Henning Moll
Hi!

I wonder why there is a symbolic link 

/usr/lib/libcdda_paranoia.so - libcdda_paranoia.so.0.9.8

in package 'libcdparanoia0-dev'. Shouldn't that be in 'libcdparanoia0'?

Regards
Henning




Re: Question about libcdda_paranoia

2003-10-08 Thread Colin Watson
On Wed, Oct 08, 2003 at 01:13:45PM +0200, Henning Moll wrote:
 I wonder why there is a symbolic link 
 
 /usr/lib/libcdda_paranoia.so - libcdda_paranoia.so.0.9.8
 
 in package 'libcdparanoia0-dev'. Shouldn't that be in 'libcdparanoia0'?

No, plain .so links are only needed for build-time linking, and
therefore live in development packages. See:

  http://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-dev

-- 
Colin Watson  [EMAIL PROTECTED]




Re: Question about libcdda_paranoia

2003-10-08 Thread Henning Moll
On Wednesday 08 October 2003 13:27, Colin Watson wrote:
 No, plain .so links are only needed for build-time linking, and
 therefore live in development packages.

Thank you for that information!

But now i am in a bit of trouble: i packaged a woody backport of k3b. 
This programm tries to dlopen (=at runtime) 'libcdda_paranoia.so'. But 
that is only possible if package 'libcdparanoia0-dev' is installed. 
This would mean a dependency to a development package. 
Is this a bug in k3b? Should k3b try to dlopen 'libcdda_paranoia.so.0' 
instead? Is there a standard for so-naming (which is respected by all/
most Gnu/Linux distributions)?

Where can i learn more about the naming of share object files?

Thanks in advance!
Henning




Re: Question about libcdda_paranoia

2003-10-08 Thread Colin Watson
On Wed, Oct 08, 2003 at 04:58:34PM +0200, Henning Moll wrote:
 But now i am in a bit of trouble: i packaged a woody backport of k3b. 
 This programm tries to dlopen (=at runtime) 'libcdda_paranoia.so'. But 
 that is only possible if package 'libcdparanoia0-dev' is installed. 
 This would mean a dependency to a development package. 
 Is this a bug in k3b? Should k3b try to dlopen 'libcdda_paranoia.so.0' 
 instead?

I think you should use the versioned library, yes. If the soname changes
then that indicates that binary compatibility has been broken, and
dlopen()ing the newer library from a program compiled to expect the
older library may be unsafe.

 Is there a standard for so-naming (which is respected by all/ most
 Gnu/Linux distributions)?

That depends on the library. Ideally, the upstream maintainer of the
library should be in control of sonames.

Cheers,

-- 
Colin Watson  [EMAIL PROTECTED]




Re: Question about libcdda_paranoia

2003-10-08 Thread Josef Spillner
On Wednesday 08 October 2003 16:58, Henning Moll wrote:
 Is this a bug in k3b? Should k3b try to dlopen 'libcdda_paranoia.so.0'
 instead? Is there a standard for so-naming (which is respected by all/
 most Gnu/Linux distributions)?

Shared object files that are private to a project are usually not named, i.e. 
only end in .so, and are installed into /usr/lib/something.
Shared libraries in /usr/lib are, well, shared, and so require to be linked 
in properly. This means no package should make assumptions about their 
signature (provided symbols etc.) since .so is only a symlink in this case, 
and the only safe way of dealing with them is linking at build time.
I haven't looked at k3b specifically, but if this library isn't used by 
anything else, it doesn't belong into /usr/lib. If it is, it shouldn't be 
dlopen()ed.

 Where can i learn more about the naming of share object files?

info libtool

Josef

-- 
Play for fun, win for freedom.
Linux-Info-Tag Dresden 2003: http://www.linux-dresden.de




Re: Question about libcdda_paranoia

2003-10-08 Thread David Z Maze
Henning Moll [EMAIL PROTECTED] writes:

 But now i am in a bit of trouble: i packaged a woody backport of k3b. 
 This programm tries to dlopen (=at runtime) 'libcdda_paranoia.so'. But 
 that is only possible if package 'libcdparanoia0-dev' is installed. 
 This would mean a dependency to a development package. 
 Is this a bug in k3b? Should k3b try to dlopen 'libcdda_paranoia.so.0' 
 instead?

That's probably what I would do...

 Is there a standard for so-naming (which is respected by all/ most
 Gnu/Linux distributions)?

Well, the actual process involved is something like this: you specify
-lfoo on the ld (cc) command line; the linker finds and reads
libfoo.so, and looks for the SONAME field in it; that soname
(typically libfoo.so.2) is written into the binary; when the binary is
loaded by ld.so, that looks for the libfoo.so.2 that was the soname.
So in the normal process, you only need lib*.so at build time, and
the major-version symlink at runtime.  Plus, if the major version of
the library chages, you'll probably need to change your program
anyways.  So I think explicitly writing in libcdda_paranoia.so.0 is
actually the right thing to do.

-- 
David Maze [EMAIL PROTECTED]  http://people.debian.org/~dmaze/
Theoretical politics is interesting.  Politicking should be illegal.
-- Abra Mitchell




Re: Question about libcdda_paranoia

2003-10-08 Thread Martin Pitt
Hi!

Am 2003-10-08 16:58 +0200 schrieb Henning Moll:
 But now i am in a bit of trouble: i packaged a woody backport of k3b. 
 This programm tries to dlopen (=at runtime) 'libcdda_paranoia.so'. But 
 that is only possible if package 'libcdparanoia0-dev' is installed. 
 This would mean a dependency to a development package. 

I would discourage that (see below).

 Is this a bug in k3b? Should k3b try to dlopen 'libcdda_paranoia.so.0' 
 instead? 

Yes! The suffix '0' denotes the library's SONAME. As long as it does
not change, different versions of the lib must be binary compatible.
OTOH, if it _does_ change, your program linking against it is likely
to fail.

This allows having several (major) library versions installed in
parallel, but enforces that only one version of a development package
can be installed so that new packages are urged to use the most recent
version.

Conclusion: dlopen ...so.0 and directly depend on the non-dev-package.

 Is there a standard for so-naming (which is respected by all/ most
 Gnu/Linux distributions)?

I don't know exactly, sorry. I guess, yes.

 Where can i learn more about the naming of share object files?

When I built my first library package, I consulted the 'Debian Library
Packaging Guide' [1]. Not complete yet, but already very helpful.

But actually, it isn't that difficult: packages containing shared
libraries provide them with their soname as suffix, -dev packages add
the corresponding symlink without a soname.

BTW: Corrections appreciated, I'm still quite new to Debian.

Have a nice day,

Martin

[1] http://www.netfort.gr.jp/~dancer/column/libpkg-guide/

-- 
Martin Pitt
home:  www.piware.de
eMail: [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: Question about libcdda_paranoia

2003-10-08 Thread Chris Cheney
On Wed, Oct 08, 2003 at 04:58:34PM +0200, Henning Moll wrote:
 On Wednesday 08 October 2003 13:27, Colin Watson wrote:
  No, plain .so links are only needed for build-time linking, and
  therefore live in development packages.
 
 Thank you for that information!
 
 But now i am in a bit of trouble: i packaged a woody backport of k3b. 
 This programm tries to dlopen (=at runtime) 'libcdda_paranoia.so'. But 
 that is only possible if package 'libcdparanoia0-dev' is installed. 

Look at the debian dir of the package you are backporting. ;)

Hint - k3b-0.9/debian/patches/02_k3bcdparanoialib.dpatch

Chris


signature.asc
Description: Digital signature