NetBSD-Bugs archive

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

toolchain/53545: Bullding lib/libedit fails on a Solaris 11 host system



>Number:         53545
>Category:       toolchain
>Synopsis:       Bullding lib/libedit fails on a Solaris 11 host system
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 23 20:00:00 +0000 2018
>Originator:     Palle Lyckegaard
>Release:        current as of 2018-08-23
>Organization:
NetBSD
>Environment:
SunOS solaris 5.11 11.3 i86pc i386 i86pc

>Description:
A basic Solaris 11 host system has an awk implementation that is not compatible with the usage in the lib/libedit/makelist shell-script.
The script refers to the host version of awk instead of using the version of awk provided by the NetBSD toolchain.

>How-To-Repeat:
With a basic $PATH set up as /usr/bin:/usr/sbin do a standard NetBSD build.sh build and the depend-all target will fail in the lib/libedit directory.
>Fix:
Change the usage of AWK in lib/libedit/Makefile and lib/libedit/makelist so the toolchain version is used insted of the host version.


Patch provided below (tested on a NetBSD 8 host system and a Solaris 11.3 system):


Index: lib/libedit/Makefile
===================================================================
RCS file: /cvsroot/src/lib/libedit/Makefile,v
retrieving revision 1.65
diff -u -r1.65 Makefile
--- lib/libedit/Makefile	30 Jun 2017 20:26:52 -0000	1.65
+++ lib/libedit/Makefile	23 Aug 2018 19:46:21 -0000
@@ -90,35 +90,35 @@
 
 vi.h: vi.c makelist Makefile
 	${_MKTARGET_CREATE}
-	${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
+	AWK=${TOOL_AWK} ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
 	    > ${.TARGET}.tmp && \
 	    mv ${.TARGET}.tmp ${.TARGET}
 
 emacs.h: emacs.c makelist Makefile
 	${_MKTARGET_CREATE}
-	${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \
+	AWK=${TOOL_AWK} ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \
 	    > ${.TARGET}.tmp && \
 	    mv ${.TARGET}.tmp ${.TARGET}
 
 common.h: common.c makelist Makefile
 	${_MKTARGET_CREATE}
-	${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \
+	AWK=${TOOL_AWK} ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \
 	    > ${.TARGET}.tmp && \
 	    mv ${.TARGET}.tmp ${.TARGET}
 
 fcns.h: ${AHDR} makelist Makefile
 	${_MKTARGET_CREATE}
-	${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
+	AWK=${TOOL_AWK} ${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
 	    mv ${.TARGET}.tmp ${.TARGET}
 
 func.h: ${AHDR} makelist Makefile
 	${_MKTARGET_CREATE}
-	${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
+	AWK=${TOOL_AWK} ${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
 	    mv ${.TARGET}.tmp ${.TARGET}
 
 help.h: ${ASRC} makelist Makefile
 	${_MKTARGET_CREATE}
-	${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
+	AWK=${TOOL_AWK} ${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
 	    mv ${.TARGET}.tmp ${.TARGET}
 
 tc1.o:	${LIBEDITDIR}/TEST/tc1.c
Index: lib/libedit/makelist
===================================================================
RCS file: /cvsroot/src/lib/libedit/makelist,v
retrieving revision 1.29
diff -u -r1.29 makelist
--- lib/libedit/makelist	9 May 2016 21:46:56 -0000	1.29
+++ lib/libedit/makelist	23 Aug 2018 19:46:21 -0000
@@ -35,7 +35,6 @@
 
 # makelist.sh: Automatically generate header files...
 
-AWK=awk
 USAGE="Usage: $0 -h|-fc|-fh|-bh <filenames>"
 
 if [ "x$1" = "x" ]



Home | Main Index | Thread Index | Old Index