<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: Re: cpp problem with configure script and RH7.1
From: Ganesh Sittampalam <ganesh,AT,earth,DOT,li>
Date: Wed, 9 May 2001 17:09:30 +0200
In-reply-to: <20010505175742.P19735@4t2.com>

On Sat, 5 May 2001 17:57:42 +0200, l_cipe,AT,abyss,DOT,4t2,DOT,com (Thomas 
Weber) wrote

>Hello,
>
>it seems that the configure script of cipe-1.5.2 (and 1.4.5) is broken with 
>cpp-2.96-81 which comes with RedHat 7.1.
>The problem is somewhere in the AX_MACRO_STR autoconf macro which returns
>an empty string when checking for the kernel version on a RH7.1 based system.
>So KVERS is empty and the configure script will exit with "Unsupported kernel
>version".
>I also tested on a RH 7.0 system (with all the recent updates, cpp-2.96-69) 
>and it works fine. Using the cpp-2.96-81 rpm from RH 7.1 on the 7.0 system 
>breaks the kernel version detection (KVERS empty). 
>So either the macro is somehow broken or RedHat broke the preprocessor. 
>I don't know enough about the autoconf stuff to investigate further so I
>thought I report this here before blaming RedHats cpp.

The following patch fixed this for me. I've already emailed it to Olaf
separately. The reason it happens is that when expanding UTS_VERSION,
cpp/gcc -E appear to be outputting an extra space before the string "2.4.4"
(etc), which causes it not to be picked up by the sed in the configure
script. I'm not at all sure what version of gcc introduced this problem or
whose "fault" it is, but the attached patch should be pretty harmless in
general.

diff -urN cipe-1.5.1/conf/aclocal.m4 cipe-1.5.1-configfix/conf/aclocal.m4
--- cipe-1.5.1/conf/aclocal.m4  Sat Dec 16 17:49:08 2000
+++ cipe-1.5.1-configfix/conf/aclocal.m4        Tue May  1 04:21:51 2001
@@ -29,7 +29,7 @@
 [$1]
 EOF
 (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |\
- sed -n -e 's/^"\(.*\)".*$/\1/p' >conftest
+ sed -n -e 's/^ *"\(.*\)".*$/\1/p' >conftest
 changequote(, )dnl
 set "X" "`cat conftest`"
 changequote([, ])dnl
diff -urN cipe-1.5.1/configure cipe-1.5.1-configfix/configure
--- cipe-1.5.1/configure        Sun Feb 11 21:42:49 2001
+++ cipe-1.5.1-configfix/configure      Tue May  1 04:22:03 2001
@@ -1088,7 +1088,7 @@
 UTS_RELEASE
 EOF
 (eval "$ac_cpp conftest.$ac_ext") 2>&5 |\
- sed -n -e 's/^"\(.*\)".*$/\1/p' >conftest
+ sed -n -e 's/^ *"\(.*\)".*$/\1/p' >conftest
 set "X" "`cat conftest`"
 ax_result=$2
 rm -f conftest*
@@ -1108,7 +1108,7 @@
 LINUX_COMPILER
 EOF
 (eval "$ac_cpp conftest.$ac_ext") 2>&5 |\
- sed -n -e 's/^"\(.*\)".*$/\1/p' >conftest
+ sed -n -e 's/^ *"\(.*\)".*$/\1/p' >conftest
 set "X" "`cat conftest`"
 ax_result=$2
 rm -f conftest*





<< | Thread Index | >> ]    [ << | Date Index | >> ]