pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/52181: x11/qt5-qtbase fails to build in FreeBSD 11.0-RELEASE



>Number:         52181
>Category:       pkg
>Synopsis:       x11/qt5-qtbase fails to build in FreeBSD 11.0-RELEASE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 19 23:10:00 +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@localhost:/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


Home | Main Index | Thread Index | Old Index