Bug 516341 - Review Request: pcc - The Portable C Compiler
Summary: Review Request: pcc - The Portable C Compiler
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Martin Gieseking
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-08 11:38 UTC by Susi Lehtola
Modified: 2009-09-03 00:35 UTC (History)
3 users (show)

Fixed In Version: 0.9.9-0.4.090816cvs.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-03 00:34:35 UTC
Type: ---
martin.gieseking: fedora-review+
kevin: fedora-cvs+


Attachments (Terms of Use)
Patch to enable build of f77 compiler (949 bytes, patch)
2009-08-11 15:37 UTC, Martin Gieseking
no flags Details | Diff

Description Susi Lehtola 2009-08-08 11:38:04 UTC
Spec URL:
http://theory.physics.helsinki.fi/~jzlehtol/rpms/pcc.spec

SRPM URL:
http://theory.physics.helsinki.fi/~jzlehtol/rpms/pcc-0.9.9-0.1.090808cvs.fc11.src.rpm

Upstream URL:
http://pcc.ludd.ltu.se/

Description:
The compiler is based on the original Portable C Compiler by Stephen C.
Johnson, written in the late 70's. Even though much of the compiler has been
rewritten, some of the basics still remain.
PCC debuted in Unix Version 7 and replaced the DMR compiler (Dennis Ritchie's
original C compiler) in both System V and the BSD 4.x releases. Some history
about pcc is in the A History of UNIX before Berkeley: UNIX Evolution:
1975-1984 and in the Evolution of C.

About 50% of the frontend code and 80% of the backend code has been rewritten.
Most stuff is written by Anders Magnusson, with the exception of the data-flow
analysis part and the SSA conversion code which is written by Peter A Jonsson,
and the Mips port that were written as part of a project by undergraduate
students at Luleå University of Technology (LTU).


rpmlint output:
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/lib/libpcc.a
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/libpcc_stddef.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/lib/libpccsoftfloat.a
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/libpcc_float.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/stddef.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/stdarg.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/float.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/libpcc_stdarg.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/stdbool.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/libpcc_stdbool.h
3 packages and 0 specfiles checked; 0 errors, 10 warnings.

These are all OK since this is a compiler package.

Comment 2 Martin Gieseking 2009-08-11 12:23:50 UTC
Hi Jussi,

I just had a quick look into pcc and it works quite well. The Fortran frontend seems to be disabled in the current cvs version, so that it's not built (manual build fails with "undefined reference to `strlcat'" at the moment). 

The first sed call (sed -i 's|-Werror||g' configure) is currently redundant because configure doesn't contain the gcc option -Werror.

Another thing I recognized is, the pcc include directory (%{_includedir}/pcc) doesn't contain any files. Thus, it's probably not necessary to add it. But maybe this may also change in future upstream releases.

Comment 3 Susi Lehtola 2009-08-11 12:48:50 UTC
(In reply to comment #2)
> Hi Jussi,
> 
> I just had a quick look into pcc and it works quite well. The Fortran frontend
> seems to be disabled in the current cvs version, so that it's not built (manual
> build fails with "undefined reference to `strlcat'" at the moment). 

Yup, I tried to compile the frontend but had the same kind of problems. The Fortran77 runtime library seems to be missing from the distribution.
 
> The first sed call (sed -i 's|-Werror||g' configure) is currently redundant
> because configure doesn't contain the gcc option -Werror.

That may be since it was removed on Aug 8.

> Another thing I recognized is, the pcc include directory (%{_includedir}/pcc)
> doesn't contain any files. Thus, it's probably not necessary to add it. But
> maybe this may also change in future upstream releases.  

It's in the pcc flags, so it's best to own it anyway. Some package might use it in the future.

Comment 5 Martin Gieseking 2009-08-11 13:55:54 UTC
> Yup, I tried to compile the frontend but had the same kind of problems. The
> Fortran77 runtime library seems to be missing from the distribution.

With some tweaks I was able to build the Fortran compiler and libF77. However, I can't say anything about its reliability. Maybe it's better not to include it with the package at the current state, as it's obviously deliberately disabled upstream.

> It's in the pcc flags, so it's best to own it anyway. Some package might use it
> in the future.  

Yes, you're right. It's better to leave it as it is now.

If you don't mind, I could do the review a bit later today or maybe tomorrow.

Comment 6 Susi Lehtola 2009-08-11 14:01:32 UTC
(In reply to comment #5)
> > Yup, I tried to compile the frontend but had the same kind of problems. The
> > Fortran77 runtime library seems to be missing from the distribution.
> 
> With some tweaks I was able to build the Fortran compiler and libF77. However,
> I can't say anything about its reliability. Maybe it's better not to include it
> with the package at the current state, as it's obviously deliberately disabled
> upstream.

The C compiler is, too, still in development. Could you send me the patches necessary to build the F77 compiler?

> > It's in the pcc flags, so it's best to own it anyway. Some package might use it
> > in the future.  
> 
> Yes, you're right. It's better to leave it as it is now.
> 
> If you don't mind, I could do the review a bit later today or maybe tomorrow.  

Sure, that'd be nice.

Comment 7 Martin Gieseking 2009-08-11 15:37:03 UTC
Created attachment 357038 [details]
Patch to enable build of f77 compiler

Comment 8 Martin Gieseking 2009-08-11 15:40:08 UTC
> The C compiler is, too, still in development. Could you send me the patches
> necessary to build the F77 compiler?
Yes, sure. I've attached the patch to this ticket. It just enables building of the f77 compiler. The makefile of libf77 has yet to be modified to make sure it's also built.

Comment 9 Susi Lehtola 2009-08-11 16:53:55 UTC
I've compiled the F77 frontend and library, but I can't get the frontend to work. When trying to compile a simple Hello World program

       program hello_world
       implicit none
c
       character*32 text
c
       text = 'Hello World'
       write (*,*) text
c
       end


I get

$ pcc-f77 helloworld.f 
helloworld.f:
   MAIN hello:
Error on line 1 of helloworld.f: syntax error
Error on line 2 of helloworld.f: syntax error
Error.  No assembly.

so I don't think there's any idea in shipping the F77 stuff. (Now I think I read somewhere some time ago that it doesn't work.)

Comment 10 Martin Gieseking 2009-08-12 14:53:42 UTC
Hi Jussi,

here is my review. I couldn't find any mistakes. Everything looks fine. If you're going to exclude the Fortran compiler you can remove the byacc build dependency. 


rpmlint output:
pcc.i586: E: devel-dependency glibc-devel
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/lib/libpcc.a
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/libpcc_stddef.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/lib/libpccsoftfloat.a
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/libpcc_float.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/stddef.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/stdarg.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/float.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/libpcc_stdarg.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/stdbool.h
pcc.i586: W: devel-file-in-non-devel-package /usr/lib/pcc/i586-redhat-linux-gnu/0.9.9/include/libpcc_stdbool.h
3 packages and 0 specfiles checked; 1 errors, 10 warnings.

These warnings are expected and can be ignored (see below).



---------------------------------
keys used in following checklist:

[+] OK
[#] OK, not applicable
[-] needs work
---------------------------------

[+] MUST: The package must be named according to the Package Naming Guidelines.
[+] MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption.
[+] MUST: The package must meet the Packaging Guidelines.
[+] MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines.
[+] MUST: The License field in the package spec file must match the actual license.
[+] MUST: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package must be included in %doc.
    - no license file included

[+] MUST: The spec file must be written in American English.
[+] MUST: The spec file for the package MUST be legible.
[+] MUST: The sources used to build the package must match the upstream source, as provided in the spec URL.
    md5 hashes:
    pcc-090811.tgz:      f5d7f2e3a305c32033578045c3404d85
    pcc-libs-090811.tgz: 34e79113d554dac97b1c2c2dd8729f4d

[+] MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture.
[+] MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch.
    - compiler is currently restricted to ix86

[+] MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense.
[#] MUST: The spec file MUST handle locales properly.
    - no locales

[#] MUST: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun.
    - no shared libraries included

[#] MUST: If the package is designed to be relocatable, ...
    - package is not relocatable

[+] MUST: A package must own all directories that it creates.
[+] MUST: A Fedora package must not list a file more than once in the spec file's %files listings.
[+] MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. Every %files section must include a %defattr(...) line.
[+] MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
[+] MUST: Each package must consistently use macros.
[+] MUST: The package must contain code, or permissable content.
[#] MUST: Large documentation files must go in a -doc subpackage. 
    - no large doc files

[#] MUST: If a package includes something as %doc, it must not affect the runtime of the application.
    - no %doc section

[#] MUST: Header files must be in a -devel package.
[#] MUST: Static libraries must be in a -static package.
    - this is a development package so header and library files should stay in the main package (as this is the case)

[#] MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).
    - no pkgconfig files

[#] MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package.
[#] MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
[+] MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.
[#] MUST: Packages containing GUI applications must include a %{name}.desktop file
    - no GUI
[+] MUST: Packages must not own files or directories already owned by other packages. 
[+] MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
[+] MUST: All filenames in rpm packages must be valid UTF-8.


[+] SHOULD: The reviewer should test that the package builds in mock.
    - builds in mock

[+] SHOULD: The reviewer should test that the package functions as described. 
    - some small test programs compile w/o errors and work as expected  

[#] SHOULD: If scriptlets are used, those scriptlets must be sane.
    - no scriptlets

Comment 11 Susi Lehtola 2009-08-12 15:01:09 UTC
If you didn't find any issues then I'm sure you can approve the package :)

Comment 12 Martin Gieseking 2009-08-12 15:16:43 UTC
I have yet to think about that for a while. :)

No, everything is fine and the package is APPROVED.

Comment 13 Susi Lehtola 2009-08-12 16:31:59 UTC
Thanks for the review!

New Package CVS Request
=======================
Package Name: pcc
Short Description: The Portable C Compiler
Owners: jussilehtola
Branches: EL-5 F-10 F-11
InitialCC:

Comment 14 Kevin Fenzi 2009-08-13 00:07:26 UTC
cvs done.

Comment 15 Susi Lehtola 2009-08-15 08:09:39 UTC
Actually the license tag was incorrect, since there are a few files that are under 4-clause BSD, i.e. BSD with advertising. It is an acceptable license in Fedora and I've added it to the list. It isn't GPL compatible, though.

Comment 16 Fedora Update System 2009-08-16 10:17:42 UTC
pcc-0.9.9-0.4.090816cvs.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/pcc-0.9.9-0.4.090816cvs.fc10

Comment 17 Fedora Update System 2009-08-16 11:03:00 UTC
pcc-0.9.9-0.4.090816cvs.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/pcc-0.9.9-0.4.090816cvs.fc11

Comment 18 Fedora Update System 2009-08-17 21:53:44 UTC
pcc-0.9.9-0.4.090816cvs.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update pcc'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-8661

Comment 19 Fedora Update System 2009-08-17 22:03:50 UTC
pcc-0.9.9-0.4.090816cvs.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update pcc'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8696

Comment 20 Fedora Update System 2009-09-03 00:34:29 UTC
pcc-0.9.9-0.4.090816cvs.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2009-09-03 00:35:10 UTC
pcc-0.9.9-0.4.090816cvs.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


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