Bug 143509 - can't build rpm using rpmbuild -bb --target i386
Summary: can't build rpm using rpmbuild -bb --target i386
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc3 (Show other bugs)
(Show other bugs)
Version: 3.0
Hardware: All Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-21 19:37 UTC by Alexander Suvorov
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-23 08:33:15 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Alexander Suvorov 2004-12-21 19:37:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
The kernel rpm couldn't build properly by rpmbuild

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Run rpmbuild -bb --target i386 kernel-2.4.spec

Actual Results:  wvlan_cs.c:1087:44: missing terminating " character
wvlan_cs.c: In function `wvlan_hw_config':
wvlan_cs.c:1088: error: syntax error before "You"
wvlan_cs.c:1088:39: invalid suffix "x" on integer constant
wvlan_cs.c:1089: error: stray '\' in program
wvlan_cs.c:1089:71: missing terminating " character

Expected Results:  Kernel RPM that was builded properly.

Additional info:

I have tested this only with --target=i386, but I think this bug is
platform-indepedent and target-independent.

The patch for file /drivers/net/pcmcia/wvlan_cs.c is:

--- wvlan_cs.c.orig     2004-12-21 20:55:37.000000000 +0200
+++ wvlan_cs.c  2004-12-21 20:00:20.000000000 +0200
@@ -1084,9 +1084,9 @@
                        /* This is a PrismII card. It is is *very* similar
                         * to the Lucent, and the driver work 95%,
                         * therefore, we attempt to support it... */
-                       printk(KERN_NOTICE "%s: This is a PrismII
card, not a Wavelan IEEE card :-(
-You may want report firmare revision (0x%X) and what the card support.
-I will try to make it work, but you should look for a better
driver.\n", dev_info, firmware);
+                       printk(KERN_NOTICE "%s: This is a PrismII
card, not a Wavelan IEEE card :-(\n"
+"You may want report firmare revision (0x%X) and what the card
+"I will try to make it work, but you should look for a better
driver.\n", dev_info, firmware);
                        local->has_port3  = 1;
                        local->has_ibssid = 0;
                        local->has_mwo    = 0;

Comment 1 Alexander Suvorov 2004-12-21 19:44:11 UTC
Oh, sorry, I forgot to show my versions of gcc and rpm:

Comment 2 Ernie Petrides 2004-12-21 22:40:46 UTC
The correct target to use is i686, as follows:

  rpmbuild -bp --target i686 kernel-2.4.spec

Comment 3 Alexander Suvorov 2004-12-22 10:27:21 UTC
Ok, I tried to build kernel with target i686:

rpmbuild -bb --target i686 kernel-2.4.spec

And I'v got:

i2c-algo-bit.c: In function `sclhi':
i2c-algo-bit.c:120: warning: comparison of distinct pointer types lacks a cast
i2c-ali1535.c:675:6: missing terminating " character
i2c-ali1535.c:676:89: missing terminating " character
i2c-ali1535.c:691:1: unterminated argument list invoking macro "MODULE_AUTHOR"
i2c-ali1535.c:674: error: syntax error at end of input
make[2]: *** [i2c-ali1535.o] Error 1
make[1]: *** [_modsubdir_i2c] Error 2
make: *** [_mod_drivers] Error 2

The problem must be in different version of gcc, but AFAIR multi-line strings
without terminating each line by \" is not a standard definition for C.
As you see, the mistake in i2c-ali1535.c is the same as in wvlan_cs.c.

Comment 4 Ernie Petrides 2004-12-23 01:14:10 UTC
Reopening and reassigning to "gcc3" component.

Comment 5 Jakub Jelinek 2004-12-23 08:33:15 UTC
Multi-line string literals, which have been a GNU extension, were deprecated
in GCC 3.0, 3.1 and 3.2 and finally the support for them was removed in GCC 3.3,
see http://gcc.gnu.org/gcc-3.3/changes.html
Red Hat kernel-2.4.x packages don't have the needed changes to stop using
multi-line string literals, only kernel-2.6.xx packages do.
So, either use gcc-3.2.3-RH to build kernel-2.4.xx, or build 2.6 kernel, or
patch kernel yourself.

Comment 6 Alexander Suvorov 2004-12-23 19:20:56 UTC
Try to compile some test i.e.

another line");

with given parameters: -Wall -W -ansi -pedantic

GCC tells
a.c:1: warning: ANSI C forbids newline in string constant

What do you think about writing simple script that could fix such kind of errors
of syntax in the whole kernel sources?

Comment 7 Rik van Riel 2004-12-23 19:37:36 UTC
I suspect all these errors have been fixed already in the 2.6 kernel.

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