pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/53686: shells/pdksh building fails due to wrong preprocessor checking



The following reply was made to PR pkg/53686; it has been noted by GNATS.

From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx%NetBSD.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: pkg-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, pkgsrc-bugs%netbsd.org@localhost
Subject: Re: pkg/53686: shells/pdksh building fails due to wrong preprocessor  checking
Date: Tue, 30 Oct 2018 05:50:49 +0100

 Le 2018-10-27 22:40, David H. Gutteridge a écrit :
 >  Are you building this as a result of bootstrapping pkgsrc (i.e.,
 >  using a "full" bootstrap, since the default bootstrap for Linux
 >  doesn't pull in pdksh, from what I can see)? Or are you building this
 >  for your own use? If the latter, have you considered mksh instead? I
 >  would strongly recommend using it over pdksh, if you simply want a ksh
 >  implementation. mksh is more actively maintained, and is my go-to on
 >  Linux.
 
 It is a dependency for libuuid
 
 >  My understanding is that Arch Linux defines _FORTIFY_SOURCE in
 >  makepkg.conf[1]. Is this file being pulled in somehow (i.e., you're
 >  doing a "full" bootstrap, and so compiling using the native Arch
 >  environment)?
 
 The error occurs in both context: full and not full bootstrap
 
 >  As a local workaround, you could also append your own redefinition of
 >  _FORTIFY_SOURCE to CPPFLAGS, either with -U or with -D setting the
 >  value to zero.
 
 Could we imagine a supplementary test to use cc -E with -Wno-cpp? FMHO, 
 it does
 not break anything. The following patch works but if somebody does not 
 agree, I
 just modify my /etc/makepkg.conf (even if I prefer when it works 
 out-of-the-box).
 
 ----------8<--------------------------------------------------------------------
 $NetBSD$
 
 * On Arch Linux, cc-wrapper is built such as _FORTIFY_SOURCE is defined. 
 This
    fix avoids #warning to make the preprocessor checking failed.
 
 --- configure.orig	2018-10-30 04:18:53.913128552 +0000
 +++ configure
 @@ -910,12 +910,34 @@ else
     echo "configure: failed program was:" >&5
     cat conftest.$ac_ext >&5
     rm -rf conftest*
 +  # Arch Linux defines _FORTIFY_SOURCE in CPPFLAGS but the warnings 
 should not
 +  # failed the checking process
 +  CPP="${CC-cc} -E -Wno-cpp"
 +  cat > conftest.$ac_ext <<EOF
 +#line 899 "configure"
 +#include "confdefs.h"
 +#include <assert.h>
 +Syntax Error
 +EOF
 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 +{ (eval echo configure:905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 +ac_err=`grep -v '^ *+' conftest.out`
 +if test -z "$ac_err"; then
 +  :
 +else
 +  echo "$ac_err" >&5
 +  echo "configure: failed program was:" >&5
 +  cat conftest.$ac_ext >&5
 +  rm -rf conftest*
     CPP=/lib/cpp
   fi
   rm -f conftest*
   fi
   rm -f conftest*
     ac_cv_prog_CPP="$CPP"
 +fi
 +rm -f conftest*
 +  ac_cv_prog_CPP="$CPP"
   fi
     CPP="$ac_cv_prog_CPP"
   else
 


Home | Main Index | Thread Index | Old Index