OCaml and static linking (was old thread: Re: [Fedora-packaging] Issues with Ocaml and Static Linking)

Richard W.M. Jones rjones at redhat.com
Mon May 28 11:27:57 UTC 2007


Toshio Kuratomi wrote:
> On Sat, 2007-05-26 at 15:16 +0100, Richard W.M. Jones wrote:
>> Toshio Kuratomi wrote:
>>> Could you add something to
>>> http://fedoraproject.org/wiki/PackagingDrafts/OCaml
>>> about this?
>> I've updated that page, and built 8 libraries in that style.
>>
> 
> Thanks!  To my un-OCaml eyes, that looks pretty good.  I have one
> question:
> '''
> There are two scripts in the base ocaml package which automatically
> calculate the right Requires and Provides for a library. To use them,
> just add the following to the spec file: 
> 
> %define _use_internal_dependency_generator 0
> %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
> %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
> '''
> 
> The version of ocaml-find-* scripts that were posted to the list only
> appeared to find ocaml requires and provides.  But OCaml can link to C
> code as well.  Do we want to turn off the internal_dependency_generator
> or do we want to supplement it?

I've attached the latest versions to this bug:

   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239004

These versions call the ordinary find-requires and find-provides first, 
before going on to look at OCaml-specific files.  And they appear to 
find C dependencies (.so files and the like).  For example, here is my 
ocaml-pcre package[1], which is a library which links to the C PCRE lib:

$ rpm -q --requires ocaml-pcre
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libpcre.so.0()(64bit)
ocaml-Array-a904b798dd9665c2d3635636d293403c
ocaml-Callback-0ee2712bb82e3d81660a3132766fcb9b
ocaml-Char-0d0f20d5854680b694159a2fb0ca4e61
ocaml-List-5a0e3217fc356bd18f60bff31861dfd3
ocaml-Pervasives-71f888453b0f26895819460a72f07493
ocaml-String-fec8292bb1a02d2c7b8b4ba7b83a7d8b
ocaml-Sys-8cce770a42b7d0e4d85569c15d7841d6
ocaml = 3.09.3-2.fc6

$ rpm -q --provides ocaml-pcre
dllpcre_stubs.so()(64bit)
ocaml-Pcre-0ad0922a407866904c71fd615f05b414
ocaml-pcre = 5.11.4-3

So that's correct, I think?

Rich.

[1] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240652

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20070528/972a3b74/attachment.bin>


More information about the Fedora-packaging mailing list