pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/53686: shells/pdksh building fails due to wrong preprocessor checking
>Number: 53686
>Category: pkg
>Synopsis: shells/pdksh building fails due to wrong preprocessor checking
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Oct 27 05:25:00 +0000 2018
>Originator: Frédéric Fauberteau
>Release: pkgsrc-current
>Organization:
>Environment:
Linux guardian 4.18.16-arch1-1-ARCH #1 SMP PREEMPT Sat Oct 20 22:06:45 UTC 2018 x86_64 GNU/Linux
>Description:
The preprocessor checking fails with the following errors from config.log:
==========
configure:867: checking how to run the C preprocessor
configure:888: echo cc -E 1>&5; cc -E conftest.c >/dev/null 2>conftest.out
cc -E
In file included from /usr/include/assert.h:35,
from configure:883:
/usr/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^~~~~~~
configure: failed program was:
#line 882 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
configure:905: echo cc -E -traditional-cpp 1>&5; cc -E -traditional-cpp conftest.c >/dev/null 2>conftest.out
cc -E -traditional-cpp
In file included from /usr/include/assert.h:36,
from configure:901:
/usr/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^~~~~~~
In file included from /usr/include/features.h:429,
from /usr/include/assert.h:36,
from configure:901:
/usr/include/sys/cdefs.h:30:3: error: #error "You need a ISO C conforming compiler to use the glibc headers"
# error "You need a ISO C conforming compiler to use the glibc headers"
^~~~~
configure: failed program was:
#line 899 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
configure:929: checking whether cc needs -traditional
/lib/cpp
./configure: line 940: /lib/cpp: No such file or directory
==========
Then, a lot of type checking fails that implies compilation errors
>How-To-Repeat:
On my Linux box:
bmake build
>Fix:
I don't really understand why #warning _FORTIFY_SOURCE
The following fix works for me, but it seems not portable and not really elegant:
==========
$NetBSD$
--- configure.orig 2018-10-27 05:08:25.609807539 +0000
+++ configure
@@ -570,7 +570,7 @@ fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='echo $CPP $CPPFLAGS 1>&5;
-$CPP $CPPFLAGS'
+$CPP $CPPFLAGS $CFLAGS'
ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
ac_link='echo ${CC-cc} -o conftest$ac_exe_suffix $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
==========
Home |
Main Index |
Thread Index |
Old Index