[Fedora-packaging] FESCo notes on OCaml guidelines change
Richard W.M. Jones
rjones at redhat.com
Fri Mar 14 09:07:38 UTC 2008
On Thu, Mar 13, 2008 at 07:34:38PM -0500, Jason L Tibbitts III wrote:
> Of course, we should still try to address the issue. Is there
> actually a demonstrable problem here? What can go wrong without some
> arch-specific dependencies on the main ocaml package? Can you have
> just the 32-bit ocaml installed on a 64-bit machine and install a
> 64-bit module without rpm/yum complaining about dependency problems or
> pulling in the 64-bit ocaml package? (No 64-bit machine I can afford
> to screw with at the moment.)
I think I'm starting to understand the problem here. Take as an
example the ocaml-curses library.
The Rawhide repository contains three packages related to this
The ocaml-curses-devel.i386 RPM is completely useless. The base OCaml
compiler would never even get so far as to look in its install
directory /usr/lib, because it is configured to always look in
/usr/lib64. There is no concept of the -m32/-m64 switch as in gcc.
It will always build only a single type of binary.
The way the dependencies are set up, the user could request
ocaml-curses-devel.i386 (they'd have to request it explicitly on
x86-64, presumably implicitly on ppc64??) and yum would install
ocaml-curses-devel.i386, ocaml-curses.x86_64 and ocaml.x86_64 .
This would not give them a working curses development environment.
For that they'd need ocaml-curses-devel.x86_64.
I don't understand how to exclude or remove those i386 packages from
being built and placed in the repository, but if you give me some clue
I can update the guidelines appropriately.
 Tested on a Rawhide machine:
# yum install ocaml-curses-devel.i386
development 100% |=========================| 2.4 kB 00:00
Setting up Install Process
Parsing package install arguments
--> Running transaction check
---> Package ocaml-curses-devel.i386 0:0.1-7.20020319.fc9 set to be updated
--> Processing Dependency: ocaml-curses = 0.1-7.20020319.fc9 for package: ocaml-curses-devel
--> Running transaction check
---> Package ocaml-curses.x86_64 0:0.1-7.20020319.fc9 set to be updated
--> Finished Dependency Resolution
Package Arch Version Repository Size
ocaml-curses-devel i386 0.1-7.20020319.fc9 development 39 k
Installing for dependencies:
ocaml-curses x86_64 0.1-7.20020319.fc9 development 56 k
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 95 k
Is this ok [y/N]: y
(1/2): ocaml-curses-devel 100% |=========================| 39 kB 00:00
(2/2): ocaml-curses-0.1-7 100% |=========================| 56 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Installing: ocaml-curses ######################### [1/2]
error: failed to stat /home/rjones/.gvfs: Permission denied
Installing: ocaml-curses-devel ######################### [2/2]
Installed: ocaml-curses-devel.i386 0:0.1-7.20020319.fc9
Dependency Installed: ocaml-curses.x86_64 0:0.1-7.20020319.fc9
# rpm -qa | grep ocaml-curses
Note that the native code compiler can't find curses:
$ cat test.ml
open Curses ;; initscr ()
$ ocamlc -I +curses mlcurses.cma test.ml -o test
$ ocamlopt -I +curses mlcurses.cmxa test.ml -o test
Cannot find file mlcurses.cmxa <---- broken!
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
More information about the Fedora-packaging