Bug 143509 - can't build rpm using rpmbuild -bb --target i386
can't build rpm using rpmbuild -bb --target i386
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc3 (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-21 14:37 EST by Alexander Suvorov
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Alexander Suvorov 2004-12-21 14:37:43 EST
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):
kernel-2.4.21-27.EL

How reproducible:
Always

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

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
support.\n"
+"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 14:44:11 EST
Oh, sorry, I forgot to show my versions of gcc and rpm:
gcc-3.3.2-1
rpm-4.2.1-0.30
Comment 2 Ernie Petrides 2004-12-21 17:40:46 EST
The correct target to use is i686, as follows:

  rpmbuild -bp --target i686 kernel-2.4.spec
Comment 3 Alexander Suvorov 2004-12-22 05:27:21 EST
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-22 20:14:10 EST
Reopening and reassigning to "gcc3" component.
Comment 5 Jakub Jelinek 2004-12-23 03:33:15 EST
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 14:20:56 EST
Try to compile some test i.e.

a.c
---
printf("test
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 14:37:36 EST
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.