Bug 76381

Summary: FreeBSD 4.11-RC3 GCC preprocessor failure
Product: Base System Reporter: Matthias Andree <matthias.andree>
Component: gnuAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: re
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Matthias Andree 2005-01-17 23:00:43 UTC
GCC 2.95.4 cannot compile e2fsprogs development version while GCC 3.3 is fine.

The preprocessor fails to expand a macro with a longish name, error message:

making all in lib/e2p
gmake[2]: Entering directory `/tmp/e2fsprogs/build/lib/e2p'
        CC ../../../lib/e2p/feature.c
../../../lib/e2p/feature.c:50: `EXT3_FEATURE_INCOMPAT_EXTENTS' undeclared here (not in a function)
../../../lib/e2p/feature.c:50: initializer element is not constant
../../../lib/e2p/feature.c:50: (near initialization for `feature_list[12].mask')
gmake[2]: *** [feature.o] Error 1

type: less lib/e2p/feature.i    and type /EXT3 and press the enter key
to see the problem area:

        {       1 , 0x0008 ,
                        "journal_dev" },
        {       1 , EXT3_FEATURE_INCOMPAT_EXTENTS,
                        "extents" },
        {       1 , 0x0010 ,
                        "meta_bg" },

GCC 3.3 will properly replace EXT3_FEATURE_INCOMPAT_EXTENTS with 0x0040
(install lang/gcc33, then gmake CC=gcc33)

How-To-Repeat: - install devel/gmake port
- install devel/bibktkeeper port (see PR #76208 if it's uncommitted)
- cd to a writable directory with some 30 MB room
- type these commands to check out, configure and build the code:
  #
  # the next three commands will clone the repository and check it out
  #
  bk clone -qr'tytso@think.thunk.org|ChangeSet|20050117193220|14963' \
    bk://thunk.org:5000/ e2fsprogs/
  cd e2fsprogs
  bk -Ur get -Sq
  #
  # now do the build
  #
  mkdir build
  cd build
  ../configure -C CFLAGS="-O -save-temps"
  gmake
Comment 1 Matthias Andree 2005-01-17 23:07:41 UTC
Oops. The port is devel/bitkeeper. As this requires registration, I made
a tarball, which will not lie around forever though.

http://home.pages.de/~mandree/tmp/e2fsprogs-1.36rc2.tar.gz (3.3 MB)
MD5 (e2fsprogs-1.36rc2.tar.gz) = 441c54b116d3426f7c16eb3bb3657648

After downloading, unpack the tarball, cd e2fsprogs-1.36rc2, then
proceed with mkdir build ; cd build ... as shown above.

-- 
Matthias Andree
Comment 2 Matthias Andree 2005-01-20 03:02:33 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(puts on brown paperbag to not be recognized)

Please close this problem report, the problem is non-existent.

Turns out that GCC is fine, e2fsprogs was grabbing an obsolete header
file from below /usr/local, and gcc34 actually wasn't working when
compiling e2fsprogs on FreeBSD 5... how embarrassing. (This is a
long-standing bug.) Shuffling around the -I CPPFLAGS fixes the problem.

PR against ports/sysutils/e2fsprogs (updating it to 1.35_4) to fix the
bug in the right place has been filed as ports/76488.

My fault. Please accept my apologies for this false alarm.

- --
Matthias Andree
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBQe8fSSdEoB0mv1ypAQIOJwQAjWN1OpS+NPHBylk8fRVV4TOhHyj3BpxK
q5+QJmJOMNsGL73brkamILJ95g8ApPD4+K/XmXx1OhgYYHU34GXKqkErKXt/OtOs
3sEdX4yLC7klut7kOAPvQnrJKGu0Ki5QjhS1P0oPoB04enH1UR07xsg2b3nrN5+m
KhhG4VGnwG4=
=zl8r
-----END PGP SIGNATURE-----
Comment 3 Maxim Konovalov freebsd_committer freebsd_triage 2005-01-20 05:16:43 UTC
State Changed
From-To: open->closed

Closed at the submitter's request.