Bug 253588 - Review Request: ocaml-cil - CIL - Infrastructure for C Program Analysis and Transformation
Review Request: ocaml-cil - CIL - Infrastructure for C Program Analysis and T...
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michel Alexandre Salim
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-08-20 14:13 EDT by Richard W.M. Jones
Modified: 2008-03-01 08:28 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-01 08:28:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
michel: fedora‑review+
kevin: fedora‑cvs+

Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2007-08-20 14:13:28 EDT
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 00:01:27 EDT
Will review this
Comment 2 Toshio Kuratomi 2007-09-17 16:33:30 EDT
Testing BZ problem
Comment 3 Michel Alexandre Salim 2007-09-21 18:55:22 EDT
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 19:10:43 EDT
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 10:04:36 EST
Comment 6 Richard W.M. Jones 2007-11-06 07:18:56 EST
Hi yes, still here, and will get around to this RSN!
Comment 7 Richard W.M. Jones 2007-11-07 11:24:24 EST
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@redhat.com> - 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 03:05:40 EST
Didn't notice the update -- sorry. Will get back to it before this weekend.
Comment 9 Michel Alexandre Salim 2007-11-16 12:22:32 EST
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 13:19:33 EST
Richard, any chance you could update the package soon? Thanks.
Comment 11 Richard W.M. Jones 2008-01-15 04:43:46 EST
Probably won't be this week, but it's still on my list ...
Comment 12 Richard W.M. Jones 2008-02-12 07:39:18 EST
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@redhat.com> - 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 16:18:07 EST
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 04:26:41 EST
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 12:04:03 EST
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 07:40:29 EST
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.