NetBSD Problem Report #55065
From www@netbsd.org Thu Mar 12 08:06:21 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 5481C1A924B
for <gnats-bugs@gnats.NetBSD.org>; Thu, 12 Mar 2020 08:06:21 +0000 (UTC)
Message-Id: <20200312080620.2AA3A1A924C@mollari.NetBSD.org>
Date: Thu, 12 Mar 2020 08:06:20 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: misc/tmux fails to compile on Solaris
X-Send-Pr-Version: www-1.0
>Number: 55065
>Category: pkg
>Synopsis: misc/tmux fails to compile on Solaris
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: leot
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 12 08:10:01 +0000 2020
>Closed-Date: Thu Mar 12 16:42:46 +0000 2020
>Last-Modified: Thu Mar 12 16:42:46 +0000 2020
>Originator: Joern Clausen
>Release:
>Organization:
Bielefeld University
>Environment:
>Description:
misc/tmux fails to compile on Solaris. tmux/compat.h assumes that paths.h always defines _PATH_DEFPATH, which is not the case on Solaris.
This has been fixed on Github, but so far only a release candidate of tmux is available. The attached replacement for patches/patch-compat.h (based on the code on Github) fixes the build, until tmux-3.1 is released.
>How-To-Repeat:
>Fix:
--- compat.h.orig 2019-06-26 11:26:30.000000000 +0000
+++ compat.h
@@ -61,13 +61,32 @@ void warn(const char *, ...);
void warnx(const char *, ...);
#endif
-#ifndef HAVE_PATHS_H
-#define _PATH_BSHELL "/bin/sh"
-#define _PATH_TMP "/tmp/"
-#define _PATH_DEVNULL "/dev/null"
-#define _PATH_TTY "/dev/tty"
-#define _PATH_DEV "/dev/"
-#define _PATH_DEFPATH "/usr/bin:/bin"
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+
+#ifndef _PATH_BSHELL
+#define _PATH_BSHELL "/bin/sh"
+#endif
+
+#ifndef _PATH_TMP
+#define _PATH_TMP "/tmp/"
+#endif
+
+#ifndef _PATH_DEVNULL
+#define _PATH_DEVNULL "/dev/null"
+#endif
+
+#ifndef _PATH_TTY
+#define _PATH_TTY "/dev/tty"
+#endif
+
+#ifndef _PATH_DEV
+#define _PATH_DEV "/dev/"
+#endif
+
+#ifndef _PATH_DEFPATH
+#define _PATH_DEFPATH "/usr/bin:/bin"
#endif
#ifndef __OpenBSD__
@@ -98,10 +117,6 @@ void warnx(const char *, ...);
#include "compat/bitstring.h"
#endif
-#ifdef HAVE_PATHS_H
-#include <paths.h>
-#endif
-
#ifdef HAVE_LIBUTIL_H
#include <libutil.h>
#endif
@@ -154,6 +169,14 @@ void warnx(const char *, ...);
#define O_DIRECTORY 0
#endif
+#ifndef FNM_CASEFOLD
+#ifdef FNM_IGNORECASE
+#define FNM_CASEFOLD FNM_IGNORECASE
+#else
+#define FNM_CASEFOLD 0
+#endif
+#endif
+
#ifndef INFTIM
#define INFTIM -1
#endif
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->leot
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Thu, 12 Mar 2020 08:14:33 +0000
Responsible-Changed-Why:
Over to maintainer.
(I would assign to solaris-pkg-people, but perhaps you can just
apply the patch, Leo)
State-Changed-From-To: open->feedback
State-Changed-By: leot@NetBSD.org
State-Changed-When: Thu, 12 Mar 2020 11:41:03 +0000
State-Changed-Why:
Thank you very much Joern for the patch and PR!
I have just applied it but I don't have any Solaris system
to double-check that I have not missed something.
Can you please update to tmux-3.0anb2 and let me know if
it works?
Apart that, do you think we should request a pullup request
to 2019Q4 or is it okay to possibly wait a couple of weeks?
(probably 2020Q1 is pretty near :))
Thanks again!
From: "Leonardo Taccari" <leot@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55065 CVS commit: pkgsrc/misc/tmux
Date: Thu, 12 Mar 2020 11:35:33 +0000
Module Name: pkgsrc
Committed By: leot
Date: Thu Mar 12 11:35:33 UTC 2020
Modified Files:
pkgsrc/misc/tmux: Makefile distinfo
pkgsrc/misc/tmux/patches: patch-compat.h
Log Message:
tmux: Fix build on Solaris due missing paths.h defines
Solaris has paths.h but does not define all _PATH_DEFPATH.
Backport upsrteam commit
<https://github.com/tmux/tmux/commit/92ecd611f68663dfceb2494e637b3ebe51d3fd86>
to address that.
Fixes PR pkg/55065.
Thanks to Joern Clausen for the patch and PR!
To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 pkgsrc/misc/tmux/Makefile
cvs rdiff -u -r1.44 -r1.45 pkgsrc/misc/tmux/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/misc/tmux/patches/patch-compat.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: =?UTF-8?Q?Clausen=2c_J=c3=b6rn?= <joern.clausen@uni-bielefeld.de>
To: <gnats-bugs@netbsd.org>, <leot@netbsd.org>, <pkgsrc-bugs@netbsd.org>,
<gnats-admin@netbsd.org>
Cc:
Subject: Re: pkg/55065 (misc/tmux fails to compile on Solaris)
Date: Thu, 12 Mar 2020 13:20:39 +0100
> Apart that, do you think we should request a pullup request
> to 2019Q4 or is it okay to possibly wait a couple of weeks?
> (probably 2020Q1 is pretty near :))
Too late :) It seems that 3.1 was released yesterday, after I had been
to the repository earlier that day. I didn't check again this morning
before opening the PR, sorry.
So I suggest you scrap my patch and go to 3.1 straight away. I'll test
it on Solaris immediately.
Joern
--
Jörn Clausen
Plattformen & Serverdienste
BITS - Bielefelder IT-Servicezentrum
https://www.uni-bielefeld.de/bits
From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55065 (misc/tmux fails to compile on Solaris)
Date: Thu, 12 Mar 2020 14:48:13 +0100
Clausen, Jörn writes:
> [...]
> Too late :) It seems that 3.1 was released yesterday, after I had been
> to the repository earlier that day. I didn't check again this morning
> before opening the PR, sorry.
>
> So I suggest you scrap my patch and go to 3.1 straight away. I'll test
> it on Solaris immediately.
> [...]
Don't worry! :)
I have rechecked releases and tags respectively at:
https://github.com/tmux/tmux/releases
https://github.com/tmux/tmux/tags
...and - if I am not missing something - only the 3.1 tag was created
but the latest release is still tmux-3.1-rc2.
At least if there aren't any possible further and important fixes I
would prefer to keep misc/tmux to 3.0a until (non-release candidate)
3.1 is out.
From: =?UTF-8?Q?Clausen=2c_J=c3=b6rn?= <joern.clausen@uni-bielefeld.de>
To: <gnats-bugs@netbsd.org>, <leot@netbsd.org>, <gnats-admin@netbsd.org>,
<pkgsrc-bugs@netbsd.org>
Cc:
Subject: Re: pkg/55065 (misc/tmux fails to compile on Solaris)
Date: Thu, 12 Mar 2020 16:25:12 +0100
> I have rechecked releases and tags respectively at:
>
> https://github.com/tmux/tmux/releases
> https://github.com/tmux/tmux/tags
>
> ...and - if I am not missing something - only the 3.1 tag was created
> but the latest release is still tmux-3.1-rc2.
Ah, okay. I'm not very fluent in Git(hub)...
> At least if there aren't any possible further and important fixes I
> would prefer to keep misc/tmux to 3.0a until (non-release candidate)
> 3.1 is out.
I totally agree.
I just compiled tmux-3.0anb2 without any problems on Solaris. Thanks for
the quick update!
Joern
--
Jörn Clausen
Plattformen & Serverdienste
BITS - Bielefelder IT-Servicezentrum
https://www.uni-bielefeld.de/bits
State-Changed-From-To: feedback->closed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Thu, 12 Mar 2020 16:42:46 +0000
State-Changed-Why:
Confirmed fixed.
Thanks again Joern for the PR, patch and quick feedback!
pkgsrc-2019Q4 has tmux-2.9a where _PATH_DEFPATH is not
used and hence should not be affected by that problem
(no pullup should be needed).
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.