From fjoe@FreeBSD.org  Tue Nov 29 16:46:23 2011
Return-Path: <fjoe@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B58FB1065675
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Nov 2011 16:46:23 +0000 (UTC)
	(envelope-from fjoe@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id A14158FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Nov 2011 16:46:23 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pATGkNQT016246
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Nov 2011 16:46:23 GMT
	(envelope-from fjoe@freefall.freebsd.org)
Received: (from fjoe@localhost)
	by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pATGkNN1016245;
	Tue, 29 Nov 2011 16:46:23 GMT
	(envelope-from fjoe)
Message-Id: <201111291646.pATGkNN1016245@freefall.freebsd.org>
Date: Tue, 29 Nov 2011 16:46:23 GMT
From: Max Khon <fjoe@FreeBSD.org>
Reply-To: Max Khon <fjoe@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: 10.0 exp-run without libreadline in base system 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         162948
>Category:       ports
>Synopsis:       [exp-run] 10.0 exp-run without libreadline in base system
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bapt
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 29 16:50:08 UTC 2011
>Closed-Date:    
>Last-Modified:  Sun Sep 22 14:20:02 UTC 2013
>Originator:     Max Khon
>Release:        FreeBSD 8.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 8.2-STABLE FreeBSD 8.2-STABLE #5 r227907: Wed Nov 23 21:55:50 UTC 2011 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386


>Description:
I would like to request a 10.0 exp-run without installed libreadline.

Patch against head/ is as follows:

Index: gnu/usr.bin/gdb/Makefile.inc
===================================================================
--- gnu/usr.bin/gdb/Makefile.inc	(revision 227900)
+++ gnu/usr.bin/gdb/Makefile.inc	(working copy)
@@ -15,6 +15,7 @@
 OBJ_ROOT= ${.OBJDIR}/../..
 OBJ_BU= ${OBJ_ROOT}/binutils
 OBJ_GDB= ${OBJ_ROOT}/gdb
+OBJ_RL=	${OBJ_ROOT}/../lib/libreadline/readline
 
 # These assignments duplicate much of the functionality of
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
@@ -45,6 +46,7 @@
 CFLAGS+= -I${CNTRB_BU}/include
 CFLAGS+= -I${CNTRB_GDB}/include
 CFLAGS+= -I${CNTRB_BU}/bfd
+CFLAGS+= -I${OBJ_RL}/..
 
 GENSRCS+= nm.h tm.h
 
Index: gnu/usr.bin/gdb/gdb/Makefile
===================================================================
--- gnu/usr.bin/gdb/gdb/Makefile	(revision 227900)
+++ gnu/usr.bin/gdb/gdb/Makefile	(working copy)
@@ -5,13 +5,13 @@
 
 BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \
 	${OBJ_BU}/libiberty/libiberty.a
-GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
+GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a ${OBJ_RL}/libreadline.a
 
 # libthread_db.so calls back into gdb for the proc services.  Make all the
 # global symbols visible.
 LDFLAGS+= -Wl,-E
 
-DPADD=	${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
-LDADD=	${GDBLIBS} ${BULIBS} -lm -lreadline -ltermcap -lgnuregex
+DPADD=	${GDBLIBS} ${BULIBS} ${LIBM} ${LIBTERMCAP} ${LIBGNUREGEX}
+LDADD=	${GDBLIBS} ${BULIBS} -lm -ltermcap -lgnuregex
 
 .include <bsd.prog.mk>
Index: gnu/usr.bin/gdb/kgdb/Makefile
===================================================================
--- gnu/usr.bin/gdb/kgdb/Makefile	(revision 227900)
+++ gnu/usr.bin/gdb/kgdb/Makefile	(working copy)
@@ -6,9 +6,9 @@
 
 BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \
 	${OBJ_BU}/libiberty/libiberty.a
-GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
+GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a ${OBJ_RL}/libreadline.a
 
-DPADD=	${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
-LDADD=	${GDBLIBS} ${BULIBS} -lkvm -lm -lreadline -ltermcap -lgnuregex
+DPADD=	${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBTERMCAP} ${LIBGNUREGEX}
+LDADD=	${GDBLIBS} ${BULIBS} -lkvm -lm -ltermcap -lgnuregex
 
 .include <bsd.prog.mk>
Index: gnu/usr.bin/gdb/gdbtui/Makefile
===================================================================
--- gnu/usr.bin/gdb/gdbtui/Makefile	(revision 227900)
+++ gnu/usr.bin/gdb/gdbtui/Makefile	(working copy)
@@ -6,13 +6,13 @@
 
 BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \
 	${OBJ_BU}/libiberty/libiberty.a
-GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
+GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a ${OBJ_RL}/libreadline.a
 
 # libthread_db.so calls back into gdb for the proc services.  Make all the
 # global symbols visible.
 LDFLAGS+= -Wl,-E
 
-DPADD=	${GDBLIBS} ${BULIBS} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
-LDADD=	${GDBLIBS} ${BULIBS} -lm -lreadline -ltermcap -lgnuregex
+DPADD=	${GDBLIBS} ${BULIBS} ${LIBM} ${LIBTERMCAP} ${LIBGNUREGEX}
+LDADD=	${GDBLIBS} ${BULIBS} -lm -ltermcap -lgnuregex
 
 .include <bsd.prog.mk>
Index: gnu/lib/libreadline/history/doc/Makefile
===================================================================
--- gnu/lib/libreadline/history/doc/Makefile	(revision 227900)
+++ gnu/lib/libreadline/history/doc/Makefile	(working copy)
@@ -1,12 +0,0 @@
-# $FreeBSD$
-
-SRCDIR= ${.CURDIR}/../../../../../contrib/libreadline/doc
-
-INFO = history
-
-INFOSECTION= "Programming & development tools."
-INFOENTRY_history= "* History: (history).		The GNU History library."
-
-history.info: history.texi hstech.texi hsuser.texi version.texi fdl.texi
-
-.include <bsd.info.mk>
Index: gnu/lib/libreadline/history/Makefile
===================================================================
--- gnu/lib/libreadline/history/Makefile	(revision 227900)
+++ gnu/lib/libreadline/history/Makefile	(working copy)
@@ -1,15 +0,0 @@
-# $FreeBSD$
-
-SUBDIR= doc
-
-LIB=    history
-MAN=    rlhistory.3
-
-SRCS= $(HISTSRC) xmalloc.c
-
-rlhistory.3: doc/history.3
-	cp -f ${.ALLSRC} ${.TARGET}
-
-CLEANFILES+= rlhistory.3
-
-.include <bsd.lib.mk>
Index: gnu/lib/libreadline/readline/doc/Makefile
===================================================================
--- gnu/lib/libreadline/readline/doc/Makefile	(revision 227900)
+++ gnu/lib/libreadline/readline/doc/Makefile	(working copy)
@@ -1,20 +0,0 @@
-# $FreeBSD$
-
-SRCDIR= ${.CURDIR}/../../../../../contrib/libreadline/doc
-
-INFO = readline rluserman
-
-INFOSECTION= "Programming & development tools."
-INFOENTRY_readline= "* Readline: (readline).		The GNU Readline library"
-INFOENTRY_rluserman= "* Readline: (readline).       The GNU readline library API"
-
-CLEANFILES += readline.texi
-
-readline.info: rlman.texi rluser.texi rltech.texi version.texi fdl.texi
-
-readline.texi: rlman.texi
-	cp -f ${SRCDIR}/rlman.texi ${.TARGET}
-
-rluserman.info: rluserman.texi version.texi rluser.texi fdl.texi
-
-.include <bsd.info.mk>
Index: gnu/lib/libreadline/readline/Makefile
===================================================================
--- gnu/lib/libreadline/readline/Makefile	(revision 227900)
+++ gnu/lib/libreadline/readline/Makefile	(working copy)
@@ -1,27 +1,22 @@
 # $FreeBSD$
 
-SUBDIR= doc
-
 LIB=    readline
-MAN=    doc/readline.3
-SHLIBDIR?=	/lib
-
+INTERNALLIB=
 TILDESRC= tilde.c
 SRCS=     readline.c vi_mode.c funmap.c keymaps.c parens.c search.c \
 	  rltty.c complete.c bind.c isearch.c display.c signals.c \
 	  util.c kill.c undo.c macro.c input.c callback.c terminal.c \
 	  text.c nls.c misc.c compat.c xmalloc.c $(HISTSRC) $(TILDESRC)
+CFLAGS+= -I${.OBJDIR}/..
 
 INSTALLED_HEADERS= readline.h chardefs.h keymaps.h history.h tilde.h \
 		   rlstdc.h rlconf.h rltypedefs.h
+.for _h in ${INSTALLED_HEADERS}
+CLEANFILES+=	${_h}
+DPSRCS+=	${.OBJDIR}/${_h}
 
-DPADD=	${LIBTERMCAP}
-LDADD=	-ltermcap
-
-INCSDIR=${INCLUDEDIR}/readline
-
-.for hdr in ${INSTALLED_HEADERS}
-INCS+=	${SRCDIR}/${hdr}
+${.OBJDIR}/${_h}:	${_h}
+	${INSTALL} ${.ALLSRC} ${.TARGET}
 .endfor
 
 .include <bsd.lib.mk>
Index: gnu/lib/libreadline/Makefile
===================================================================
--- gnu/lib/libreadline/Makefile	(revision 227900)
+++ gnu/lib/libreadline/Makefile	(working copy)
@@ -1,5 +1,5 @@
 # $FreeBSD$
 
-SUBDIR = history readline
+SUBDIR = readline
 
 .include <bsd.subdir.mk>
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: fjoe 
Responsible-Changed-When: Tue Nov 29 16:51:53 UTC 2011 
Responsible-Changed-Why:  
To portmgr. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162948 
State-Changed-From-To: open->analyzed 
State-Changed-By: linimon 
State-Changed-When: Sat Mar 10 23:44:27 UTC 2012 
State-Changed-Why:  
take 


Responsible-Changed-From-To: portmgr->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Mar 10 23:44:27 UTC 2012 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=162948 
Responsible-Changed-From-To: linimon->fjoe 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Mar 12 02:08:47 UTC 2012 
Responsible-Changed-Why:  
So far the results are not encouraging: 

http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.10-exp.20120310234450.pointyhat-west/ 

The fact that lang/python27 fails takes out 5845 ports. 

Other notable errors are lang/ruby18, audio/jack, databases/mysql55-client, 
lang/lua, databases/postgresql*-client, databases/mysql*-client, and 
the other lang/python* ports, roughly in order of decreasing effect. 

Can you recommend the next step of action, please? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162948 

From: Mark Linimon <linimon@lonesome.com>
To: linimon@FreeBSD.org, fjoe@FreeBSD.org
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/162948: [exp-run] 10.0 exp-run without libreadline in
 base system
Date: Sun, 18 Mar 2012 03:54:26 -0500

 The current run has completed.
 
 Unfortunately removing readline means that over 6,000 ports either fail
 to compile, or are blocked by those ports failing to compile.
 
 The raw data are at:
 
   http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.10-exp.20120310234450.pointyhat-west/index-category.html
 
 However, eliminating ports already known to fail on 10, and then trying
 to eliminate other false, positives, gives:
 
   http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.10-exp.20120310234450.pointyhat-west/index-category-edited.html
 
 (Click twice on 'Aff.' to sort by descending number of ports affected.)
 
 So, my recommendation is *not* to remove readline from the base until
 much more work is done.  I have the feeling that multiple runs will be
 required.
 
 mcl
Responsible-Changed-From-To: fjoe->bapt 
Responsible-Changed-By: bapt 
Responsible-Changed-When: Mon May 6 13:30:38 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162948 
State-Changed-From-To: analyzed->open 
State-Changed-By: bapt 
State-Changed-When: Mon May 6 13:30:43 UTC 2013 
State-Changed-Why:  
Let's try again 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162948 

From: Baptiste Daroussin <baptiste.daroussin@gmail.com>
To: bug-followup@freebsd.org, fjoe@freebsd.org
Cc:  
Subject: Re: ports/162948: [exp-run] 10.0 exp-run without libreadline in base system
Date: Thu, 1 Aug 2013 00:30:27 +0200

 --001a11c1f9eeed87e004e2d64699
 Content-Type: text/plain; charset=ISO-8859-1
 
 The patch apply properly but fail during the make depend phase:
 make: make: don't know how to make readline.h. Stop
 
 Can you provide an updated patch?
 
 --001a11c1f9eeed87e004e2d64699
 Content-Type: text/html; charset=ISO-8859-1
 
 <div dir="ltr">The patch apply properly but fail during the make depend phase:<div><div>make: make: don&#39;t know how to make readline.h. Stop</div></div><div><br></div><div>Can you provide an updated patch?</div></div>
 
 --001a11c1f9eeed87e004e2d64699--

From: Ed Maste <emaste@freebsd.org>
To: bug-followup@FreeBSD.org, fjoe@FreeBSD.org
Cc:  
Subject: Re: ports/162948: [exp-run] 10.0 exp-run without libreadline in base system
Date: Sun, 22 Sep 2013 10:12:53 -0400

 I've posted an updated patch at
 http://people.freebsd.org/~emaste/patches/readline_internallib.diff
>Unformatted:
