ports/163561: x11/rxvt-unicode: fix build on 9.x

Guido Falsi mad at madpilot.net
Fri Dec 23 11:20:07 UTC 2011

>Number:         163561
>Category:       ports
>Synopsis:       x11/rxvt-unicode: fix build on 9.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 23 11:20:06 UTC 2011
>Originator:     Guido Falsi
>Release:        FreeBSD 9.0-RC1 amd64
System: FreeBSD megatron.madpilot.net 9.0-RC1 FreeBSD 9.0-RC1 #1: Mon Oct 31 13:48:49 CET 2011 root at megatron.madpilot.net:/usr/obj/usr/src/sys/MEGATRON amd64


After the update to rxvt-unicode to version 9.14 the port fails to compile on 9.x.

the following error is produced:

c++ -I.. -I. -I. -I./../libev -I./../libptytty/src -I./../libecb -DHAVE_CONFIG_H -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include   -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include/freetype2   -I/usr/local/include -O2 -pipe -march=nocona -fno-strict-aliasing -w -I/usr/local/include  -D_REENTRANT -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include -I/usr/local/include/glib-2.0   -I/usr/local/include/startup-notification-1.0 -c ptytty_wrapper.C
In file included from ptytty_wrapper.C:11:
./../libptytty/src/logging.C: In function 'void fill_utmpx(utmpx*, bool, int, const char*, const char*, const char*)':
./../libptytty/src/logging.C:267: error: 'id' was not declared in this scope
*** Error code 1

Stop in /usr/ports/x11/rxvt-unicode/work/rxvt-unicode-9.14/src.
*** Error code 1

That part of code is protected by #ifdef HAVE_STRUCT_UTMPX, so the problem shows up only on 9.x and upper.


on a 9.x machine(with UTMPX):

# cd /usr/ports/x11/rxvt-unicode && make


The patch files/patch-libptytty-src-logging.C contained a fix needed
with the previous version of the software. It is not needed anymore.
In fact that patch adds a line referring to a variable which is not
present in the code anymore.

Removing files/patch-libptytty-src-logging.C compeltely now fixes
the problem. The code of the software has been changed and does not
need patching anymore.

patch, just in case:

diff -ruN rxvt-unicode.old/files/patch-libptytty-src-logging.C rxvt-unicode/files/patch-libptytty-src-logging.C
--- rxvt-unicode.old/files/patch-libptytty-src-logging.C	2011-12-23 12:00:34.246074687 +0100
+++ rxvt-unicode/files/patch-libptytty-src-logging.C	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
---- libptytty/src/logging.C.orig	2011-12-03 09:58:20.000000000 +0100
-+++ libptytty/src/logging.C	2011-12-22 21:20:55.000000000 +0100
-@@ -264,7 +264,8 @@
-   // posix says that ut_line is not meaningful for DEAD_PROCESS
-   // records, but most implementations of last use ut_line to
-   // associate records in wtmp file
--  strncpy (utx->ut_line, line, sizeof (utx->ut_line));
-+  if(id)
-+  	strncpy (utx->ut_line, line, sizeof (utx->ut_line));
-   fill_id (utx->ut_id, line, sizeof (utx->ut_id));
-   utx->ut_pid = pid;
-   utx->ut_type = login ? USER_PROCESS : DEAD_PROCESS;

More information about the freebsd-ports-bugs mailing list