PCRE 8.30 will break API

Richard W.M. Jones rjones at redhat.com
Fri Feb 10 11:46:24 UTC 2012


On Fri, Feb 10, 2012 at 01:03:11AM +0100, Kevin Kofler wrote:
> Richard W.M. Jones wrote:
> > It dlopen's the package so there is no automatic dependency.  To make
> > up for this it requires pcre-devel, but in the light of this soname
> > change that might be a bug.
> 
> It is against the guidelines to require a devel package.

Actually ocaml-pcre-devel is the one which requires pcre-devel.  I
don't think this is against any guidelines, or if it is, it shouldn't
be.

> Instead, the software MUST be patched to dlopen the fully versioned
> so from the runtime package instead.

If I understand what you mean, the software does this already.  The
bug is that there's no explicit (or implicit) dependency to tell RPM
that it's doing this.

This doesn't matter much in practice because all our OCaml software is
natively compiled (ie. straight to machine code) and any *natively
compiled* OCaml software using the OCaml Pcre library just links to
libpcre.so.0 in the usual way, like a C program.  For example:

  $ ldd /usr/share/coccinelle/spatch | grep pcre
    libpcre.so.0 => /lib64/libpcre.so.0 (0x0000003e27e00000)

and consequently RPM gets the right dependencies for it:

  $ rpm -qR coccinelle|grep pcre
  libpcre.so.0()(64bit)  

The above discussion about dlopen only applies to bytecode-compiled
libraries (on primary architectures), or bytecode-compiled binaries
(on a small number of obscure secondary architectures).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora


More information about the devel mailing list