Bug 253588 - Review Request: ocaml-cil - CIL - Infrastructure for C Program Analysis and Transformation
Summary: Review Request: ocaml-cil - CIL - Infrastructure for C Program Analysis and T...
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Michel Alexandre Salim
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-08-20 18:13 UTC by Richard W.M. Jones
Modified: 2008-03-01 13:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-03-01 13:28:40 UTC
Type: ---
michel: fedora-review+
kevin: fedora-cvs+

Attachments (Terms of Use)

Description Richard W.M. Jones 2007-08-20 18:13:28 UTC
Spec URL: http://annexia.org/tmp/ocaml/ocaml-cil.spec
SRPM URL: http://annexia.org/tmp/ocaml/ocaml-cil-1.3.6-2.fc8.src.rpm
CIL (C Intermediate Language) is a high-level representation along
with a set of tools that permit easy analysis and source-to-source
transformation of C programs.

CIL is both lower-level than abstract-syntax trees, by clarifying
ambiguous constructs and removing redundant ones, and also
higher-level than typical intermediate languages designed for
compilation, by maintaining types and a close relationship with the
source program. The main advantage of CIL is that it compiles all
valid C programs into a few core constructs with a very clean
semantics. Also CIL has a syntax-directed type system that makes it
easy to analyze and manipulate C programs. Furthermore, the CIL
front-end is able to process not only ANSI-C programs but also those
using Microsoft C or GNU C extensions. If you do not use CIL and want
instead to use just a C parser and analyze programs expressed as
abstract-syntax trees then your analysis will have to handle a lot of
ugly corners of the language (let alone the fact that parsing C itself
is not a trivial task).

In essence, CIL is a highly-structured, "clean" subset of C. CIL
features a reduced number of syntactic and conceptual forms. For
example, all looping constructs are reduced to a single form, all
function bodies are given explicit return statements, syntactic sugar
like "->" is eliminated and function arguments with array types become

Comment 1 Michel Alexandre Salim 2007-09-16 04:01:27 UTC
Will review this

Comment 2 Toshio Kuratomi 2007-09-17 20:33:30 UTC
Testing BZ problem

Comment 3 Michel Alexandre Salim 2007-09-21 22:55:22 UTC
Here's the initial review. Most things are fine, with apart from the problems
noted below. I've built it on my Rawhide x86_64 box a few days ago, but
currently it does not build in mock:

- F7 does not have ocaml-findlib{,-devel}:

Building against Rawhide on Koji failed mysteriously, trying against dist-f8
now, but it looked like a build server problem anyway.

Documentation should probably be split into -doc, as it pertains the use of
cilly as well, and introduces the infrastructure in general. Your call.

Oh, and perl(CilConfig) should provide a version number!

• clean buildroot before install: no
• rpmlint
ocaml-cil.src:66: W: unversioned-explicit-provides perl(CilConfig)

• build dependencies complete: : can't build on FC7, no ocaml-findlib*
• -doc: might want to create separate -doc, since it also contains documentation
on cilly 


• package name: hmm. it produces a tool that is useful for programming in C, so
in a way it's an application written in OCaml, but to customize it you need to
write in OCaml, so it's an OCaml lib. probably OK as it is
• spec file name: matches 
• package guideline-compliant: yes
• license complies with guidelines: yes
• license field accurate: yes
• license file not deleted: yes
• spec in US English: yes
• spec legible: yes
• source matches upstream: yes
• builds under >= 1 archs, others excluded
• own all directories: yes
• no dupes in %files: yes
• permission: yes
• %clean must clean RPM_BUILD_ROOT: yes
• macros used consistently: yes
• must contain code: yes
• headers in -devel: yes
• devel must require versioned base package: yes
• filenames UTF-8

• package build in mock on all architectures 

• package functioned as described: yes
• scriplets are sane: yes
• other subpackages should require versioned base: yes
• require package, not files: yes

Comment 4 Michel Alexandre Salim 2007-09-21 23:10:43 UTC
Build on Koji failed for F8 as well. It builds fine for i386, x86_64 has not
finished, but you need to exclude PPC as well:

Also note that URL has changed to http://cil.sourceforge.net/

Comment 5 Michel Alexandre Salim 2007-11-05 15:04:36 UTC

Comment 6 Richard W.M. Jones 2007-11-06 12:18:56 UTC
Hi yes, still here, and will get around to this RSN!

Comment 7 Richard W.M. Jones 2007-11-07 16:24:24 UTC
I'm unclear from Koji what the actual error was on PPC.  (Unfortunately
I don't have access to an actual PPC to test).

You said 'clean buildroot before install', but I think I'm doing that.
However I moved the commands around to make that clear.

Spec: http://www.annexia.org/tmp/ocaml/ocaml-cil.spec
SRPM: http://www.annexia.org/tmp/ocaml/ocaml-cil-1.3.6-3.fc8.src.rpm

+* Wed Nov  7 2007 Richard W.M. Jones <rjones> - 1.3.6-3
+- Change upstream URL.
+- perl(CilConfig) set to package version
+- Split out documentation into a separate -doc package.

Comment 8 Michel Alexandre Salim 2007-11-13 08:05:40 UTC
Didn't notice the update -- sorry. Will get back to it before this weekend.

Comment 9 Michel Alexandre Salim 2007-11-16 17:22:32 UTC
You need to excludeArch ppc as well:

(might want to bug the upstream developers about Linux/ppc support, since the
ppc target is supported for OS X)

Completed build: http://koji.fedoraproject.org/koji/taskinfo?taskID=244948

Question: does ocaml-cil work without the .ml and .o files? From the packaging
guidelines (http://fedoraproject.org/wiki/Packaging/OCaml):

*.o files are not normally included. There is however one exception -- if file
is needed for link (like gtkInit.cmx and gtkInit.o in lablgtk or std_exit.cmx
and std_exit.o in OCaml itself), then it should be included.

*.ml files are not normally included. The exception is if the file describes a
module signature and there is no corresponding .mli file, then the .ml file
should be included. (Note that Debian is more permissive and they often
distribute *.ml files, allowing the programmer to peek at the implementation of
a module).

Comment 10 Michel Alexandre Salim 2008-01-13 18:19:33 UTC
Richard, any chance you could update the package soon? Thanks.

Comment 11 Richard W.M. Jones 2008-01-15 09:43:46 UTC
Probably won't be this week, but it's still on my list ...

Comment 12 Richard W.M. Jones 2008-02-12 12:39:18 UTC
This is the updated package:

Spec URL: http://www.annexia.org/tmp/ocaml/ocaml-cil.spec
SRPM URL: http://www.annexia.org/tmp/ocaml/ocaml-cil-1.3.6-4.fc8.src.rpm

* Wed Nov  7 2007 Richard W.M. Jones <rjones> - 1.3.6-4
- ExcludeArch ppc - CIL doesn't build on PPC as it turns out.

The *.ml files are required.  We can't strip cilly.byte.exe because
strip will remove the bytecode from the file.

Comment 13 Michel Alexandre Salim 2008-02-28 21:18:07 UTC
Builds on i386 and x86_64; rpmlint output is clean, apart from the *.ml and
cilly.byte.exe file that's been discussed.

Looks good -- APPROVED.

Comment 14 Richard W.M. Jones 2008-02-29 09:26:41 UTC
New Package CVS Request
Package Name: ocaml-cil
Short Description: CIL - Infrastructure for C Program Analysis and Transformation
Owners: rjones
Branches: F-8
InitialCC: rjones
Cvsextras Commits: yes

Comment 15 Kevin Fenzi 2008-02-29 17:04:03 UTC
cvs done. 

Please make sure to file a bug and block bug 239077 for the ppc build issues. 

Comment 16 Richard W.M. Jones 2008-03-01 12:40:29 UTC
I added two new bugs in fact, because bug 239077 was unrelated to the
reason for the ExcludeArch.

  ppc:   bug 435546
  ppc64: bug 435545

Note You need to log in before you can comment on or make changes to this bug.