Subject: RE: bug#507: compilation problem under Solaris

From: "Langella Raphael" <[email-masked]>
Date: Tue, 1 Jul 2008 14:33:27 +0200

It didn't work. I launched configure with this command :

LDFLAGS="-L/Produits/publics/sparc.SunOS.5.8/tiff/3.8.2/lib -L/Produits/publics/sparc.SunOS.5.7/jpeg/6b/lib -L/Produits/publics/sparc.SunOS.5.8/zlib/1.2.3/lib -L/Produits/publics/sparc.SunOS.5.8/libpng/1.2.24/lib" CPPFLAGS="-I/Produits/publics/sparc.SunOS.5.8/tiff/3.8.2/include -I/Produits/publics/sparc.SunOS.5.7/jpeg/6b/include -I/Produits/publics/sparc.SunOS.5.8/zlib/1.2.3/include -I/Produits/publics/sparc.SunOS.5.8/libpng/1.2.24/include" ./configure --with-gtk --prefix=/Produits/publics/sparc.SunOS.5.9/emacs/22.2

I've attached the config.log and the src/Makefile

> -----Message d'origine-----
> De : Glenn Morris [mailto:[email-masked]] 
> Envoyé : lundi 30 juin 2008 22:30
> À : Langella Raphael
> Cc : [email-masked]
> Objet : Re: bug#507: compilation problem under Solaris
> 
> "Langella Raphael" wrote:
> 
> > I'm compiling Emacs 22.2 under Sparc/Solaris 9. I've got librairies 
> > under non-standard directories, so I've set LDFLAGS and 
> CPPFLAGS with 
> > -I and -L options to include these directories. The path to those 
> > directories has the string "sparc" within. In src/Makefile, "sparc" 
> > has been replaced by "1 " on the lines defining ALL_CFLAGS 
> and LIBW. 
> > I've corrected it manually and it compiles fine.
> 
> Please try this patch to Emacs 22's configure, followed by 
> re-configuring.
> 
> *** configure.ORIG	2008-06-30 13:26:14.000000000 -0700
> --- configure	2008-06-30 13:27:33.000000000 -0700
> ***************
> *** 23173,23178 ****
> --- 23173,23188 ----
>   test "${exec_prefix}" != NONE &&
>     exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
>   
> + # Now get this: Some word that is part of the ${srcdir} 
> directory name 
> + # or the ${configuration} value might, just might, happen 
> to be an # 
> + identifier like `sun4' or `i386' or something, and be 
> predefined by # 
> + the C preprocessor to some helpful value like 1, or maybe 
> the empty # 
> + string.  Needless to say consequent macro substitutions are less # 
> + than conducive to the makefile finding the correct directory.
> + cpp_undefs="`echo $srcdir $configuration $canonical |
> +   sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
> +   -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
> + 
>   ## Check if the C preprocessor will convert `..' to `. .'.  
> If so, set
>   ## CPP_NEED_TRADITIONAL to `yes' so that the code to 
> generate Makefile
>   ## from Makefile.c can correctly provide the arg 
> `-traditional' to the
> ***************
> *** 23751,23757 ****
>   #
>   # INIT-COMMANDS
>   #
> ! GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" 
> CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
>   
>   _ACEOF
>   
> --- 23761,23767 ----
>   #
>   # INIT-COMMANDS
>   #
> ! GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" 
> CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" 
> CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
>   
>   _ACEOF
>   
> ***************
> *** 24397,24412 ****
>   # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
>   # This must be done after src/config.h is built, since we 
> rely on that file.
>   
> - # Now get this: Some word that is part of the ${srcdir} 
> directory name
> - # or the ${configuration} value might, just might, happen to be an
> - # identifier like `sun4' or `i386' or something, and be 
> predefined by
> - # the C preprocessor to some helpful value like 1, or maybe 
> the empty
> - # string.  Needless to say consequent macro substitutions are less
> - # than conducive to the makefile finding the correct directory.
> - undefs="`echo $top_srcdir $configuration $canonical |
> - sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
> -     -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g' \
> - `"
>   
>   echo creating src/epaths.h
>   ${MAKE-make} epaths-force
> --- 24407,24412 ----
> ***************
> *** 24426,24432 ****
>     sed -e '1,/start of cpp stuff/d'\
>         -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
>         < Makefile.c > junk.c
> !   $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
>         sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	> ]*$/d' > junk2.c
>     cat junk1.c junk2.c > Makefile.new
>     rm -f junk.c junk1.c junk2.c
> --- 24426,24432 ----
>     sed -e '1,/start of cpp stuff/d'\
>         -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
>         < Makefile.c > junk.c
> !   $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
>         sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	> ]*$/d' > junk2.c
>     cat junk1.c junk2.c > Makefile.new
>     rm -f junk.c junk1.c junk2.c
> ***************
> *** 24442,24448 ****
>     sed -e '1,/start of cpp stuff/d'\
>         -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
>         < Makefile.c > junk.c
> !   $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
>         sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	> ]*$/d' > junk2.c
>     cat junk1.c junk2.c > Makefile.new
>     rm -f junk.c junk1.c junk2.c
> --- 24442,24448 ----
>     sed -e '1,/start of cpp stuff/d'\
>         -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
>         < Makefile.c > junk.c
> !   $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
>         sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	> ]*$/d' > junk2.c
>     cat junk1.c junk2.c > Makefile.new
>     rm -f junk.c junk1.c junk2.c
>