NetBSD Problem Report #9628

From micalg=pgp-md5; protocol="application/pgp-signature"
Received: (qmail 28759 invoked from network); 17 Mar 2000 17:11:50 -0000
Message-Id: <200003171711.SAA15108@zippo.unna.ping.de>
Date: Fri, 17 Mar 2000 18:11:44 +0100
From: Jan-Hinrich Fessel <oskar@detemobil.de>
Sender: oskar@unna.ping.de
To: gnats-bugs@gnats.netbsd.org
Subject: gtar 1.12 will not compile with NetBSD-1.2

>Number:         9628
>Category:       pkg
>Synopsis:       Unable to compile package gtar 1.12
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 17 09:12:00 +0000 2000
>Closed-Date:    Fri Oct 20 02:50:05 +0000 2000
>Last-Modified:  Fri Oct 20 02:50:05 +0000 2000
>Originator:     Jan-Hinrich "Oskar" Fessel
>Release:        1.2G
>Organization:
Jan-Hinrich Fessel	fessel@detemobil.de		oskar@unna.ping.de
>Environment:

System: NetBSD zappa.unna.Ping.DE 1.2G NetBSD 1.2G (ZAPPA) #1: Wed Sep 10 22:43:30 CEST 1997 augustss@calvin:/users/NetBSD/src/sys/arch/i386/compile/ZAPPA i386
pkgsrc from March, 10, 2000


>Description:
	cc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -I../lib  -O2 -c update.c
	cc -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o tar  arith.o buffer.o compare.o create.o delete.o  extract.o incremen.o list.o mangle.o misc.o names.o open3.o  rtapelib.o tar.o update.o ../lib/libtar.a ../intl/libintl.a 
	extract.o: Undefined symbol `_lchmod' referenced from text segment
	extract.o: Undefined symbol `_lutimes' referenced from text segment
	*** Error code 1

>How-To-Repeat:
	cd /usr/pkgsrc/devel/gtar-base ; make
>Fix:
	Apply the following patch instead of patch-ab to src/extract.c:
	It would be nicer if we could find out the NetBSD date when
	lchmod and lutimes were first availible.
	since both calls appeared in 1.3, the versoin below should be
	reasonable safe.

--- extract.c.orig	Tue Apr 22 20:05:45 1997
+++ extract.c	Fri Mar 17 14:48:25 2000
@@ -104,5 +104,9 @@
   if (!keep_old_files_option
       || (stat_info->st_mode & (S_ISUID | S_ISGID | S_ISVTX)))
+#if (defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2))
+    if (lchmod (file_name, ~current_umask & (int) stat_info->st_mode) < 0)
+#else
     if (chmod (file_name, ~current_umask & (int) stat_info->st_mode) < 0)
+#endif
       ERROR ((0, errno, _("%s: Cannot change mode to %0.4o"),
 	      file_name, ~current_umask & (int) stat_info->st_mode));
@@ -125,6 +129,8 @@
   struct utimbuf utimbuf;

+#if !(defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2))
   if (!symlink_flag)
     {
+#endif
       /* We do the utime before the chmod because some versions of utime are
 	 broken and trash the modes of the file.  */
@@ -138,4 +144,5 @@
 	  /* FIXME: incremental_option should set ctime too, but how?  */

+#if !(defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2))
 	  if (incremental_option)
 	    utimbuf.actime = stat_info->st_atime;
@@ -146,4 +153,17 @@

 	  if (utime (file_name, &utimbuf) < 0)
+#else
+	  struct timeval tv[2];
+
+	  if (incremental_option)
+	    tv[0].tv_sec = stat_info->st_atime;
+	  else
+	    tv[0].tv_sec = now;
+	  tv[0].tv_usec = 0;
+	  tv[1].tv_sec = stat_info->st_mtime;
+	  tv[1].tv_usec = 0;
+
+	  if (lutimes (file_name, tv) < 0)
+#endif
 	    ERROR ((0, errno,
 		    _("%s: Could not change access and modification times"),
@@ -156,5 +176,7 @@

       set_mode (file_name, stat_info);
+#if !(defined (__NetBSD__) && NetBSD > 199706 && !defined(NetBSD1_2))
     }
+#endif

   /* If we are root, set the owner and group of the extracted file, so we




--==_Exmh_1519908272P
Content-Type: application/pgp-signature

-----BEGIN PGP MESSAGE-----
Version: 2.6.3ia

iQCVAwUBONJnULA63tqjeAhZAQHomwP+N867zz2D3lpVptFm2xuHsjuEHEt3VGgp
zIqLHSjMcrhlw2mB58ylsn1ndUJsOZ8xiFK3a5tc5uFMhyw14Z5ZV2TTMsRwcRjU
e3+DDZ89QFq0YtjA2+qRVNFy0/XmwasoesdRw6D7oRtGzOo6rzQdx96YTug+zqE4
0XlAF5Zv5sE=
=i/lv
-----END PGP MESSAGE-----

--==_Exmh_1519908272P--
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: hubertf 
State-Changed-When: Thu Oct 19 19:47:59 PDT 2000 
State-Changed-Why:  
Patch appliet, thanks! 


- Hubert 
>Unformatted:
 --==_Exmh_1519908272P
 Content-Type: text/plain; charset=us-ascii

NetBSD Home
NetBSD PR Database Search

(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.