NetBSD Problem Report #55343

From www@netbsd.org  Thu Jun  4 12:16:55 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 F2F431A9217
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  4 Jun 2020 12:16:54 +0000 (UTC)
Message-Id: <20200604121654.3B8421A9218@mollari.NetBSD.org>
Date: Thu,  4 Jun 2020 12:16:53 +0000 (UTC)
From: carsten@strotmann.de
Reply-To: carsten@strotmann.de
To: gnats-bugs@NetBSD.org
Subject: oksh fails to link on older Linux with "undefined reference to `clock_gettime'"
X-Send-Pr-Version: www-1.0

>Number:         55343
>Category:       pkg
>Synopsis:       oksh fails to link on older Linux with "undefined reference to `clock_gettime'"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 04 12:20:00 +0000 2020
>Closed-Date:    Thu Jun 25 21:26:26 +0000 2020
>Last-Modified:  Thu Jun 25 21:26:26 +0000 2020
>Originator:     Carsten Strotmann
>Release:        pkgsrc 2020Q1
>Organization:
>Environment:
Linux stella 2.6.35.4-ecafe-v4 #4 PREEMPT Sun Feb 2 15:23:37 UTC 2014 armv7l GNU/Linux
>Description:
package 'oksh' fails to link on an older Linux system (Debian 6).

The link step is missing to link against "librt"

===> Building for oksh-6.5nb1
cc -Wl,-R/usr/pkg/lib -o oksh alloc.o asprintf.o c_ksh.o c_sh.o c_test.o c_ulimit.o edit.o  emacs.o eval.o exec.o expr.o history.o io.o jobs.o lex.o mail.o  main.o misc.o path.o shf.o syn.o table.o trap.o tree.o tty.o var.o  version.o vi.o confstr.o reallocarray.o siglist.o signame.o  strlcat.o strlcpy.o strtonum.o unvis.o vis.o -lcurses
c_sh.o: In function `timex':
c_sh.c:(.text+0x18b8): undefined reference to `clock_gettime'
c_sh.c:(.text+0x1928): undefined reference to `clock_gettime'
c_sh.c:(.text+0x1acc): undefined reference to `clock_gettime'
mail.o: In function `mcheck':
mail.c:(.text+0x27c): undefined reference to `clock_gettime'
var.o: In function `setspec':
var.c:(.text+0x1130): undefined reference to `clock_gettime'
var.o:var.c:(.text+0x156c): more undefined references to `clock_gettime' follow
collect2: ld returned 1 exit status
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/shells/oksh/work/oksh-oksh-6.5
*** Error code 1

Stop.
bmake[1]: stopped in /usr/pkgsrc/shells/oksh
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/shells/oksh





>How-To-Repeat:
Try to install oksh from pkgsrc on an Debian 6 Linux system
>Fix:
This can be fixed by adding "-lrt" to the link step in the Makefile.

===> Building for oksh-6.5nb1
cc -Wl,-R/usr/pkg/lib -o oksh alloc.o asprintf.o c_ksh.o c_sh.o c_test.o c_ulimit.o edit.o  emacs.o eval.o exec.o expr.o history.o io.o jobs.o lex.o mail.o  main.o misc.o path.o shf.o syn.o table.o trap.o tree.o tty.o var.o  version.o vi.o confstr.o reallocarray.o siglist.o signame.o  strlcat.o strlcpy.o strtonum.o unvis.o vis.o -lcurses -lrt
===> Installing for oksh-6.5nb1
=> Generating pre-install file lists
install -d /usr/pkgsrc/shells/oksh/work/.destdir/usr/pkg/bin
install -d /usr/pkgsrc/shells/oksh/work/.destdir/usr/pkg/man/man1
install -c -s -m 755 oksh /usr/pkgsrc/shells/oksh/work/.destdir/usr/pkg/bin
install -c -m 644 oksh.1 /usr/pkgsrc/shells/oksh/work/.destdir/usr/pkg/man/man1/oksh.1
Please add /usr/pkg/bin/oksh to /etc/shells
=> Automatic manual page handling
=> Generating post-install file lists
=> Checking file-check results for oksh-6.5nb1
=> Creating binary package /usr/pkgsrc/shells/oksh/work/.packages/oksh-6.5nb1.tgz
===> Building binary package for oksh-6.5nb1
=> Creating binary package /usr/pkgsrc/packages/All/oksh-6.5nb1.tgz
===> Installing binary package of oksh-6.5nb1
oksh-6.5nb1: adding /usr/pkg/bin/oksh to /etc/shells

This issue has been reported upstream
https://github.com/ibara/oksh/issues/44

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: maya@NetBSD.org
State-Changed-When: Fri, 05 Jun 2020 20:24:44 +0000
State-Changed-Why:
Does the change (to pkgsrc-current) help? if so, I will ask for a pullup.


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55343 CVS commit: pkgsrc/shells/oksh
Date: Fri, 5 Jun 2020 20:23:03 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Fri Jun  5 20:23:03 UTC 2020

 Modified Files:
 	pkgsrc/shells/oksh: Makefile

 Log Message:
 oksh: avoid undefined symbol clock_gettime on Debian 6.

 Will be fixed in new version of oksh.

 PR pkg/55343


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/shells/oksh/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Carsten Strotmann" <carsten@strotmann.de>
To: gnats-bugs@gnats.netbsd.org
Cc: 
Subject: Subject: Re: PR/55343
Date: Wed, 24 Jun 2020 22:10:01 +0200

 > Does the change (to pkgsrc-current) help? if so, I will ask for a 
 > pullup.

 Unfortunately I cannot switch and test on  pkgsrc-current. I only have 
 that one physical machine and no VM to test.

 Greetings

 Carsten

From: Carsten Strotmann <cas@strotmann.de>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
 carsten@strotmann.de
Subject: Re: Subject: Re: PR/55343
Date: Thu, 25 Jun 2020 13:34:46 +0200

 Hi,

 Carsten Strotmann <carsten@strotmann.de> writes:

 > The following reply was made to PR pkg/55343; it has been noted 
 > by GNATS.
 >
 > From: "Carsten Strotmann" <carsten@strotmann.de>
 > To: gnats-bugs@gnats.netbsd.org
 > Cc: 
 > Subject: Subject: Re: PR/55343
 > Date: Wed, 24 Jun 2020 22:10:01 +0200
 >
 >  > Does the change (to pkgsrc-current) help? if so, I will ask 
 >  > for a 
 >  > pullup.
 >  
 >  Unfortunately I cannot switch and test on  pkgsrc-current. I 
 >  only have 
 >  that one physical machine and no VM to test.
 >  
 >  Greetings
 >  
 >  Carsten
 >  

 thanks to instructions given by Sevan Janiyan I was now able to 
 test the
 fix on pkgsrc-current, and the package now compiles and works.

 Issue can be closed.

 Thanks to all involved.

 Have a good weekend

 Carsten

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 25 Jun 2020 21:26:26 +0000
State-Changed-Why:
Reported fixed, thanks for the update!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.