misc/159046: dtrace library is linked with a wrong flags on -CURRENT

Alex Samorukov samm at os2.kiev.ua
Tue Jul 19 22:00:23 UTC 2011

>Number:         159046
>Category:       misc
>Synopsis:       dtrace library is linked with a wrong flags on -CURRENT
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 19 22:00:20 UTC 2011
>Originator:     Alex Samorukov
>Release:        9.0-CURRENT
FreeBSD test9.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Tue Jul 19 22:51:31 CEST 2011     root at test9.local:/usr/obj/usr/src/sys/DTRACE  amd64

/usr/src/cddl/lib/drti/Makefile contain correct $PICFLAG to link drti.o with -fpic. The problem is that this macros is not defined, because wrong include is used: bsd.prog.mk instead of bsd.lib.mk (where this macros is defined). 

try to build userland dtrace app on 9-CURRENT. It will fail:

usr/bin/ld: php.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

--- Makefile.orig       2011-07-19 23:53:43.000000000 +0200
+++ Makefile    2011-07-19 23:56:32.000000000 +0200
@@ -18,4 +18,4 @@
                -I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
                -DPIC ${PICFLAG}
-.include <bsd.prog.mk>
+.include <bsd.lib.mk>


More information about the freebsd-bugs mailing list