Summary: | the shells/bash2 port is broken on -CURRENT | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | michiel |
Component: | Individual Port(s) | Assignee: | Sam Lawrance <lawrance> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | ||
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
michiel
2004-12-20 16:20:22 UTC
> http://www.freebsd.org/cgi/query-pr.cgi?pr=75315
Another workaround would be to use the bundled readline, as in
Index: Makefile
===================================================================
RCS file: /usr/ncvs/ports/shells/bash2/Makefile,v
retrieving revision 1.74
diff -u -r1.74 Makefile
--- Makefile 27 Oct 2004 22:13:04 -0000 1.74
+++ Makefile 21 Dec 2004 07:35:59 -0000
@@ -35,7 +35,6 @@
USE_REINPLACE= yes
WRKSRC= ${WRKDIR}/bash-${PORTVERSION:C/\....$//}
GNU_CONFIGURE= Yes
-CONFIGURE_ARGS= --with-installed-readline
.if defined(WANT_STATIC_BASH) || defined(NO_DYNAMICROOT) || (defined(NOSHARED) && ( ${NOSHARED} != "no" && ${NOSHARED} != "NO" ))
CONFIGURE_ARGS+= --enable-static-link
.else
The above patch needs to be modified of course to preserve the working
setup for RELENG_5 etc, but I don't know how to do that.
The bash port is not broken, so another thing would be to
deinstall bash2 and use bash instead. (Why do I always discover things
like this right after I submit a PR.)
Responsible Changed From-To: freebsd-ports-bugs->obrien His port I just thought I would confirm that I run into this problem very frequently, both on 5.x and 6.x systems. Here are two more simple ways to trigger it: Type: echo aaa \ bbb then cursor-up and re-enter that line from history. Type: for fname in * ; do echo $fname done When you enter the 'for', bash will come back with the '>' prompt asking for the rest of your for loop. After you are done entering it, then cursor-up, and re-enter the 'for' loop. bash2 will core-dump. This is the situation that nails me the most, because I always type in a test 'for' loop to make sure the loop will do exactly what I want it to do, and then I re-enter enter the 'for' loop after changing it (usually to delete 'echo' in front of some command-lines). I tried copying /usr/include/readline/history.h into the work directory (after doing 'make patch'), and that did seem to solve the problem. I imagine the real fix will need to be more complicated, to avoid breaking bash2 on 3.x or 4.x systems when fixing it for 5.x and 6.x systems. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA Oops. This is apparently only a problem on 6.x systems. I had tested on my usual 5.x testing-system, but now I notice that that-system is presently booted up in 6.x... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA The problem goes away for me if i recompile and reinstall /usr/src/contrib/libreadline, /usr/src/gnu/lib/libreadline/ with these CFLAGs "-O -pipe -ggdb", followed by a recompile of bash2. The default CFLAGs are "-O2 -fno-strict-aliasing -pipe -march=athlon". Could this be a bug in libreadline/gcc due to over optimization? As noted in my previous entries on this PR, the problem is in the bash2 port. It is not in the gcc compiler. I do find it interesting that the problem apparently will go away if you recompile the system readline library with different CFLAGS, but the bash2 port *does* definitely have a version-skew problem with readline in the 6.x-current base system, and if you fix that problem then you will not need to change anything in the base system. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA Responsible Changed From-To: obrien->lawrance Problem confirmed on 6.x, I'll have a stab at fixing it. I have no problems on todays -CURRENT without any make.conf hints (__MAKE_CONF=/dev/null) I simply compile port. All crash-tests listed above doesn't fails. Should it be closed?! > I simply compile port. All crash-tests listed above doesn't fails.
> Should it be closed?!
echo '
'
<cursor up>
<enter>
still crashes over here (7.0-CURRENT, bash-2.05b.007_4)
bash2 is a bit weird. Even though you get the option of using a preinstalled version of readline, the build stupidly still uses bundled readline files. I'm considering the following changes to the port: 1. When patching, delete the bundled copy of readline in bash-2.05b/lib/readline. Add an empty Makefile.in just to keep configure from breaking. 2. Edit the bash-2.05b/Makefile.in so that RL_LIBSRC and HIST_LIBSRC point to /usr/include/readline. I'm a bit worried about whether this change will cause undesired effects. OTOH, the port is currently building with mismatched headers, so it probably can't get much worse. Noting that a patch is available at http://people.freebsd.org/~lawrance/patch-bash2 so that it doesn't get lost while the ports freeze is on. lawrance 2006-10-20 07:55:54 UTC FreeBSD ports repository Modified files: shells/bash2 Makefile Log: bash2 links against the system readline, so patch it to build with the system readline headers too. This prevents segfaults due to certain key sequences. PR: ports/75315 Submitted by: Michiel Boland Approved by: portmgr (marcus) Approved by: obrien (maintainer, timeout 22 months) Revision Changes Path 1.83 +4 -1 ports/shells/bash2/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" State Changed From-To: open->closed Patch committed to build bash2 with system headers. Thanks all. |