Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86847 - rxvt-unicode aborts with "can't initialize pseudo-tty" on FreeBSD (patch included)
Summary: rxvt-unicode aborts with "can't initialize pseudo-tty" on FreeBSD (patch incl...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-27 03:28 UTC by Harald van Dijk (RETIRED)
Modified: 2006-04-12 10:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald van Dijk (RETIRED) gentoo-dev 2005-03-27 03:28:46 UTC
rxvt-unicode compiles, but when I try to run it it immediately aborts.

Reproducible: Always
Steps to Reproduce:
1. emerge rxvt-unicode
2. urxvt
Actual Results:  
urxvt: can't initialize pseudo-tty, aborting.

Expected Results:  
Open a terminal :)

The fix (from ports):

===
--- /usr/portage/x11-terms/rxvt-unicode/rxvt-unicode-5.3.ebuild
+++ /etc/portage/overlay/x11-terms/rxvt-unicode/rxvt-unicode-5.3.ebuild
@@ -21,9 +21,12 @@
 	dev-lang/perl
 	tabs? ( dev-perl/gtk2-perl )"
 
-pkg_preinst() {
+pkg_setup() {
 	filter-flags -mno-accumulate-outgoing-args
 	replace-flags -Os -O2
+	if use x86-fbsd; then
+		append-ldflags -lutil
+	fi
 }
 
 src_unpack() {
===

Adding -lutil makes the configure script pick up on openpty, and use that.

(Using pkg_preinst instead of pkg_setup is really another bug, though, I guess.)

emerge info:

Portage 2.0.51.19 (!/portage/overlay/angusyoung/profiles/default-bsd/fbsd/5.3,
gcc-20050110, freebsd-lib-5.3-r0, 5.3-RELEASE i386)
=================================================================
System uname: 5.3-RELEASE i386 i386
Gentoo/FreeBSD: FreeBSD version 5.3-RELEASE; Gentoo base version 0.7
Python:              dev-lang/python-2.4-r3 [2.4 (#1, Mar 26 2005, 03:35:34)]
dev-lang/python:     2.4-r3
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.5, 1.4_p6, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  5.3
ACCEPT_KEYWORDS="x86 x86-fbsd ~x86 ~x86-fbsd"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4m -O2 -pipe -fomit-frame-pointer"
CHOST="i686-unknown-freebsd5.3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4m -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs candy collision-protect distlocks noauto notitles userpriv"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/etc/portage/overlay /etc/portage/overlay/angusyoung"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86-fbsd X avi bitmap-fonts cjk crypt dlloader gif gtk gtk2 jpeg mmx mmxext
mpeg ncurses nls oss pam pcre png sse ssl tiff truetype truetype-fonts
type1-fonts unicode vim-pager zlib linguas_en linguas_en_GB linguas_ja linguas_nl"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Peter Johanson (RETIRED) gentoo-dev 2005-03-28 12:56:38 UTC
Assigning to the BSD folks, as I've got no *BSD on which to test, and i know jack all about our BSD stuff.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-14 18:45:01 UTC
The fix isn't good enough, adding a link via append-ldflags is bad. Also testing for x86-fbsd is not the right way (it should check for ELIBC == "FreeBSD").

Can you provide something better (configure/Makefile patch) or should I take a look to that in the next days?
Comment 3 Harald van Dijk (RETIRED) gentoo-dev 2005-05-15 00:58:06 UTC
I reported this before the ELIBC stuff came around, and the fix is fbsd's, so don't think of me too harshly for that :)

And sorry, but fbsd has forced me back to Linux until one of their bugs is fixed, so I can't test anything anymore... I can tell you what I remember though:

From configure.in:

1137  else if test -c /dev/ptmx -a -c /dev/pts/0; then
1138     rxvt_cv_ptys=STREAMS
1139  else if test x$ac_cv_func_grantpt = xyes && test x$ac_cv_func_unlockpt = xyes; then
1140 dnl# catch CYGWIN
1141     rxvt_cv_ptys=STREAMS

This should be fixed, but I'm not sure how. IIRC, this is what's causing the problem: the configure script finds this on fbsd, but it doesn't actually work. If it didn't find this, it would set rxvt_cv_ptys to BSD, which does work. fbsd's workaround allows rxvt_cv_ptys to be set to OPENPTY so that the check for STREAMS is never executed.

If you want the configure script fixed, it might as well be fixed right instead of just working around the problem. So if you could take a look at this, that'd be great.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-10-05 15:18:03 UTC
This has to be re-checked on an updated system. 
 
Comment 5 Harald van Dijk (RETIRED) gentoo-dev 2005-10-05 23:47:05 UTC
I'd love to test this again, but as I said in my previous comment, I can't use
FBSD anymore. You offered to take a look "in the next days"; was there nothing
worth noting?
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-10-06 01:44:06 UTC
I don't have xorg on this machine, I'll make sure to take a look into that 
when I have one with xorg at hand.