Skip to contentSkip to conversation

2.5.60 defconfig+CONFIG_MODVERSIONS=y -> syntax error

DISCUSSION Kay Sievers 3 participants 6 messages Feb 10, 2003 – Feb 12, 2003 Kbuild

lore
Share & tools
lore
#0 lore raw

the compilation of a fresh 2.5.60-kernel failed with:

gcc -Wp,-MD,arch/i386/kernel/.time.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=pentium4 -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include -DKBUILD_BASENAME=time -DKBUILD_MODNAME=time -c -o arch/i386/kernel/.tmp_time.o arch/i386/kernel/time.c ld:arch/i386/kernel/.tmp_time.ver:1: syntax error make[1]: *** [arch/i386/kernel/time.o] Error 1
make: *** [arch/i386/kernel] Error 2

It's the "make defconfig .config" with CONFIG_MODVERSIONS switched on.

Kay

#1 lore raw
Quoted 12 lines · Kay Sievers

the compilation of a fresh 2.5.60-kernel failed with:

gcc -Wp,-MD,arch/i386/kernel/.time.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=pentium4 -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include -DKBUILD_BASENAME=time -DKBUILD_MODNAME=time -c -o arch/i386/kernel/.tmp_time.o arch/i386/kernel/time.c ld:arch/i386/kernel/.tmp_time.ver:1: syntax error make[1]: *** [arch/i386/kernel/time.o] Error 1
make: *** [arch/i386/kernel] Error 2

Quoted 1 line

It's the "make defconfig .config" with CONFIG_MODVERSIONS switched on.

Interesting. Thanks for testing CONFIG_MODVERSIONS. I cannot reproduce it here, unfortunately (not even with the same .config). What does arch/i386/kernel/.tmp_time.ver look like?

--Kai

#2 lore raw
Quoted 6 lines · Kai Germaschewski
Quoted 1 line · Kay Sievers

ld:arch/i386/kernel/.tmp_time.ver:1: syntax error

Interesting. Thanks for testing CONFIG_MODVERSIONS. I cannot reproduce it here, unfortunately (not even with the same .config). What does arch/i386/kernel/.tmp_time.ver look like?

pim:/usr/src/linux-2.5.60# cat arch/i386/kernel/.tmp_time.ver
__crc_i = 0x_lock ;     ac2d2492
pim:/usr/src/linux-2.5.60# 
pim:/usr/src/linux-2.5.60# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared
--with-system-zlib --enable-nls --without-included-gettext
--disable-__cxa_atexit --enable-java-gc=boehm --enable-objc-gc
i386-linux
Thread model: posix
gcc version 3.2.2
pim:/usr/src/linux-2.5.60# ld -v
GNU ld version 2.13.90.0.18 20030121 Debian GNU/Linux

Kay

#3 lore raw
Quoted 10 lines · Kay Sievers
Quoted 6 lines · Kai Germaschewski
Quoted 1 line · Kay Sievers

ld:arch/i386/kernel/.tmp_time.ver:1: syntax error

Interesting. Thanks for testing CONFIG_MODVERSIONS. I cannot reproduce it here, unfortunately (not even with the same .config). What does arch/i386/kernel/.tmp_time.ver look like?

pim:/usr/src/linux-2.5.60# cat arch/i386/kernel/.tmp_time.ver
__crc_i = 0x_lock ;     ac2d2492

Okay, that's not a problem with ld, but (most likely) sed.

I hope the appended patch fixes it. For the record, what version of sed do you have? (sed -V)

--Kai

===== scripts/Makefile.build 1.27 vs edited =====

scripts/Makefile.build +1 -1
@@ -94,7 +94,7 @@
 	else								      \
 		$(CPP) -D__GENKSYMS__ $(c_flags) $<			      \
 		| $(GENKSYMS) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)	      \
-		| sed -n 's/\#define __ver_\(\w*\)\W*\(\w*\)/__crc_\1 = 0x\2 ;/gp' \
+		| sed -n 's/\#define __ver_\([^ 	]*\)[ 	]*\([^ 	]*\)/__crc_\1 = 0x\2 ;/gp' \
 		> $(@D)/.tmp_$(@F:.o=.ver);				      \
 									      \
 		$(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) 		      \
#4 lore raw
Quoted 10 lines · Kai Germaschewski
Quoted 8 lines · Kay Sievers
Quoted 6 lines · Kai Germaschewski
Quoted 1 line · Kay Sievers

ld:arch/i386/kernel/.tmp_time.ver:1: syntax error

Interesting. Thanks for testing CONFIG_MODVERSIONS. I cannot reproduce it here, unfortunately (not even with the same .config). What does arch/i386/kernel/.tmp_time.ver look like?

Quoted 6 lines
Quoted 2 lines
pim:/usr/src/linux-2.5.60# cat arch/i386/kernel/.tmp_time.ver
__crc_i = 0x_lock ;     ac2d2492

Okay, that's not a problem with ld, but (most likely) sed.

I hope the appended patch fixes it.

Yes, now it compiles.

Quoted 1 line

For the record, what version of sed do you have? (sed -V)¶

kay@pim:~$ sed -V¶
GNU sed version 3.02¶
¶
¶
Kay¶
#5 lore raw
In reply to Kai Germaschewski
$ sed --version
GNU sed version 4.0.5

(patch works for me too)

-d

Quoted 50 lines · Kai Germaschewski
Quoted 9 lines · Kay Sievers
Quoted 6 lines · Kai Germaschewski
Quoted 3 lines · Kay Sievers

ld:arch/i386/kernel/.tmp_time.ver:1: syntax error

Quoted 9 lines
Quoted 5 lines

Interesting. Thanks for testing CONFIG_MODVERSIONS. I cannot reproduce it here, unfortunately (not even with the same .config). What does arch/i386/kernel/.tmp_time.ver look like?

pim:/usr/src/linux-2.5.60# cat arch/i386/kernel/.tmp_time.ver
__crc_i = 0x_lock ;     ac2d2492

Okay, that's not a problem with ld, but (most likely) sed.

I hope the appended patch fixes it. For the record, what version of sed do you have? (sed -V)

--Kai

===== scripts/Makefile.build 1.27 vs edited =====

scripts/Makefile.build +1 -2
@@ -94,7 +94,7 @@
 	else								      \
 		$(CPP) -D__GENKSYMS__ $(c_flags) $<			      \
 		| $(GENKSYMS) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)	      \
-		| sed -n 's/\#define __ver_\(\w*\)\W*\(\w*\)/__crc_\1 = 0x\2 ;/gp' \
+		| sed -n 's/\#define __ver_\([^ 	]*\)[ 	]*\([^ 	]*\)/__crc_\1 = 0x\2 ;/gp' \
 		> $(@D)/.tmp_$(@F:.o=.ver);				      \
 									      \
 		$(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) 		      \
 
-

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 4 lines
I may have the information you need and I may choose only HTML.  It's up to you. Disclaimer: I am not responsible for any email that you send me nor am I bound to any obligation to deal with any received email in any given fashion.  If you send me spam or a virus, I may in whole or part send you 50,000 return copies of it. I may also publically announce any and all emails and post them to message boards, news sites, and even parody sites.  I may also mark them up, cut and paste, print, and staple them to telephone poles for the enjoyment of people without internet access.  This is not a confidential medium and your assumption that your email can or will be handled confidentially is akin to baring your backside, burying your head in the ground, and thinking nobody can see you butt nekkid and in plain view for miles away.  Don't be a cluebert, buy one from K-mart today.

When it absolutely, positively, has to be destroyed overnight.
                          AIR FORCE