NetBSD Problem Report #52181

From www@NetBSD.org  Wed Apr 19 23:07:35 2017
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EB3957A219
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 19 Apr 2017 23:07:35 +0000 (UTC)
Message-Id: <20170419230734.D4A1E7A2AE@mollari.NetBSD.org>
Date: Wed, 19 Apr 2017 23:07:34 +0000 (UTC)
From: santhosh.raju@gmail.com
Reply-To: santhosh.raju@gmail.com
To: gnats-bugs@NetBSD.org
Subject: x11/qt5-qtbase fails to build in FreeBSD 11.0-RELEASE
X-Send-Pr-Version: www-1.0

>Number:         52181
>Category:       pkg
>Synopsis:       x11/qt5-qtbase fails to build in FreeBSD 11.0-RELEASE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    maya
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 19 23:10:00 +0000 2017
>Closed-Date:    Tue Apr 25 18:34:48 +0000 2017
>Last-Modified:  Tue Apr 25 18:34:48 +0000 2017
>Originator:     Santhosh Raju
>Release:        pkgsrc-CURRENT
>Organization:
Freelance Computer Programmer
>Environment:
FreeBSD fox.trouble.is 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
The package "x11/qt5-qtbase" fails to build in FreeBSD 11.0-RELEASE due to a link time error because of an undefined reference to "kinfo_getproc"

Partial build output:

libtool --silent --mode=link clang++ -lexecinfo -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -Wl,-rpath,/usr/pkg/qt5/lib -o ../../../bin/qlalr .obj/compress.lo .obj/cppgenerator.lo .obj/dotgraph.lo .obj/lalr.lo .obj/main.lo .obj/parsetable.lo .obj/recognizer.lo .obj/grammar.lo   -L/usr/pkg/lib -L/usr/lib -L/usr/pkgsrc/x11/qt5-qtbase/work/qtbase-opensource-src-5.5.1/lib /usr/pkgsrc/x11/qt5-qtbase/work/qtbase-opensource-src-5.5.1/lib/libQt5Core.la -lexecinfo -lpthread -lrt
/usr/pkgsrc/x11/qt5-qtbase/work/qtbase-opensource-src-5.5.1/lib/.libs/libQt5Core.so: undefined reference to `kinfo_getproc'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:156: recipe for target '../../../bin/qlalr' failed
gmake[2]: *** [../../../bin/qlalr] Error 1
gmake[2]: Leaving directory '/usr/pkgsrc/x11/qt5-qtbase/work/qtbase-opensource-src-5.5.1/src/tools/qlalr'
Makefile:165: recipe for target 'sub-qlalr-make_first' failed
gmake[1]: *** [sub-qlalr-make_first] Error 2
gmake[1]: Leaving directory '/usr/pkgsrc/x11/qt5-qtbase/work/qtbase-opensource-src-5.5.1/src'
Makefile:42: recipe for target 'sub-src' failed
gmake: *** [sub-src] Error 2
*** Error code 2

Stop.
bmake[1]: stopped in /usr/pkgsrc/x11/qt5-qtbase
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/x11/qt5-qtbase

>How-To-Repeat:
1. Get current pkgsrc via CVS 
2. Prepare and bootstrap pkgsrc in FreeBSD 11.0-RELEASE
3. cd x11/qt5-qtbase && bmake
4. After sometime the build fails with the link time error mentioned in the "Full description".
>Fix:
The undefined reference to "kinfo_getproc" can be solved by giving the linker -lutil flag. This can be done by modifying the existing Makefile.

Steps to fix

1. Apply the following patch in x11/qt5-qtbase 

Index: Makefile
diff -r -N -u Makefile Makefile.fixed 
--- Makefile    2017-04-19 22:40:02.481473000 +0000
+++ Makefile.fixed      2017-04-19 22:39:23.894110000 +0000
@@ -93,7 +93,12 @@
 .  endif
 .elif ${OPSYS} == "Linux"
 LDFLAGS+=              -ldl
-.elif ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD"
+.elif ${OPSYS} == "FreeBSD"
+LDFLAGS+=              -lutil
+.  if exists(/usr/lib/libexecinfo.so)
+LDFLAGS+=              -lexecinfo
+.  endif
+.elif ${OPSYS} == "NetBSD"
 .  if exists(/usr/lib/libexecinfo.so)
 LDFLAGS+=              -lexecinfo
 .  endif

2. bmake clean && bmake

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Thu, 20 Apr 2017 07:03:39 +0000
Responsible-Changed-Why:
Over to maintainer.


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52181 CVS commit: pkgsrc/x11/qt5-qtbase
Date: Thu, 20 Apr 2017 18:38:09 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Thu Apr 20 18:38:09 UTC 2017

 Modified Files:
 	pkgsrc/x11/qt5-qtbase: Makefile

 Log Message:
 qt5-qtbase: FreeBSD needs -lutil

 PR pkg/52181 from Santhosh Raju


 To generate a diff of this commit:
 cvs rdiff -u -r1.41 -r1.42 pkgsrc/x11/qt5-qtbase/Makefile

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

Responsible-Changed-From-To: ryoon->maya
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Thu, 20 Apr 2017 18:48:42 +0000
Responsible-Changed-Why:
Take


State-Changed-From-To: open->needs-pullups
State-Changed-By: maya@NetBSD.org
State-Changed-When: Thu, 20 Apr 2017 18:48:42 +0000
State-Changed-Why:


From: "Benny Siegert" <bsiegert@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52181 CVS commit: [pkgsrc-2017Q1] pkgsrc/x11/qt5-qtbase
Date: Tue, 25 Apr 2017 18:29:41 +0000

 Module Name:	pkgsrc
 Committed By:	bsiegert
 Date:		Tue Apr 25 18:29:40 UTC 2017

 Modified Files:
 	pkgsrc/x11/qt5-qtbase [pkgsrc-2017Q1]: Makefile distinfo
 Added Files:
 	pkgsrc/x11/qt5-qtbase/patches [pkgsrc-2017Q1]:
 	    patch-src_corelib_thread_qwaitcondition__unix.cpp

 Log Message:
 Pullup ticket #5335 - requested by maya
 x11/qt5-qtbase: build fix

 Revisions pulled up:
 - x11/qt5-qtbase/Makefile                                       1.42
 - x11/qt5-qtbase/distinfo                                       1.32
 - x11/qt5-qtbase/patches/patch-src_corelib_thread_qwaitcondition__unix.cpp 1.1

 ---
    Module Name:    pkgsrc
    Committed By:   maya
    Date:           Thu Apr 20 18:38:09 UTC 2017

    Modified Files:
            pkgsrc/x11/qt5-qtbase: Makefile

    Log Message:
    qt5-qtbase: FreeBSD needs -lutil

    PR pkg/52181 from Santhosh Raju

 ---
    Module Name:    pkgsrc
    Committed By:   maya
    Date:           Mon Apr 24 12:27:59 UTC 2017

    Modified Files:
            pkgsrc/x11/qt5-qtbase: distinfo
    Added Files:
            pkgsrc/x11/qt5-qtbase/patches:
                patch-src_corelib_thread_qwaitcondition__unix.cpp

    Log Message:
    qt5-qtbase: fix build on NetBSD < 6.1 (no pthread_condattr_setclock)
    Invert logic from !defined && to defined || for simplicity and use
    a netbsd version check.


 To generate a diff of this commit:
 cvs rdiff -u -r1.41 -r1.41.2.1 pkgsrc/x11/qt5-qtbase/Makefile
 cvs rdiff -u -r1.31 -r1.31.4.1 pkgsrc/x11/qt5-qtbase/distinfo
 cvs rdiff -u -r0 -r1.1.2.2 \
     pkgsrc/x11/qt5-qtbase/patches/patch-src_corelib_thread_qwaitcondition__unix.cpp

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

State-Changed-From-To: needs-pullups->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 25 Apr 2017 18:34:48 +0000
State-Changed-Why:
applied & pulled up, thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.