From owner-freebsd-current@freebsd.org Sun Nov 29 10:29:09 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D89FA3BEC7 for ; Sun, 29 Nov 2015 10:29:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E38CC18D6 for ; Sun, 29 Nov 2015 10:29:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id E1C7CA3BEC6; Sun, 29 Nov 2015 10:29:08 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C783AA3BEC5 for ; Sun, 29 Nov 2015 10:29:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7307C18D5 for ; Sun, 29 Nov 2015 10:29:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tATAT32r037306 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 29 Nov 2015 12:29:03 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tATAT32r037306 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tATAT3nN037305; Sun, 29 Nov 2015 12:29:03 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 29 Nov 2015 12:29:03 +0200 From: Konstantin Belousov To: Daniel Eischen Cc: current@freebsd.org Subject: Re: librt symbol versioning breakage (was Re: Build failure, undefined reference to __mq_oshandle) Message-ID: <20151129102903.GD3448@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 10:29:09 -0000 On Sun, Nov 29, 2015 at 01:23:04AM -0500, Daniel Eischen wrote: > On Fri, 27 Nov 2015, Daniel Eischen wrote: > > > Damn, please use deischen@freebsd.org for replies. > > > > On Fri, 27 Nov 2015, Daniel Eischen wrote: > > > >> On Fri, 27 Nov 2015, Daniel Eischen wrote: > >> > >>> $ uname -a > >>> FreeBSD vega 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r277320: Mon Jan 19 > >>> 09:02:50 EST 2015 > >>> deischen@vega:/usr/FreeBSD/svn/obj/usr/FreeBSD/svn/src/sys/vega amd64 > >>> > >>> Upgrading to today's current, 'rm -rf /usr/obj/*; make -j8 buildworld' > >>> fails here: > >>> > >>> ===> lib/libc/tests/gen/execve (buildconfig) > >>> --- all_subdir_tests --- > >>> --- all_subdir_mqueue --- > >>> mqtest3.o: In function `main': > >>> /usr/FreeBSD/svn/src/tests/sys/mqueue/mqtest3.c:(.text+0x139): undefined > >>> reference to `__mq_oshandle' > >>> /usr/FreeBSD/svn/src/tests/sys/mqueue/mqtest3.c:(.text+0x14c): undefined > >>> reference to `__mq_oshandle' > >>> /usr/FreeBSD/svn/src/tests/sys/mqueue/mqtest3.c:(.text+0x16c): undefined > >>> reference to `__mq_oshandle' > >>> /usr/FreeBSD/svn/src/tests/sys/mqueue/mqtest3.c:(.text+0x3e6): undefined > >>> reference to `__mq_oshandle' > >>> /usr/FreeBSD/svn/src/tests/sys/mqueue/mqtest3.c:(.text+0x3f9): undefined > >>> reference to `__mq_oshandle' > >>> mqtest3.o:/usr/FreeBSD/svn/src/tests/sys/mqueue/mqtest3.c:(.text+0x40f): > >>> more undefined references to `__mq_oshandle' follow > >>> cc: error: linker command failed with exit code 1 (use -v to see > >>> invocation) > >>> > >>> Going to try make [-j1], next, but anyone come across this? > >> > >> Still fails. > >> > >> Why do the tests in tests/sys/mqueue/ try to use non-public APIs? > > So I found out that sometime in the last year or so, symbol versioning > for librt was broken and leaking symbols that shouldn't have been > leaked. I've just committed a fix for this. > > Do a 'readelf -sw /usr/lib/librt.so.1 | grep GLOBAL | grep -v UND' > and see the non FBSD_foo symbols that shouldn't be there. I did the following on the librt from the HEAD of about month ago: pooma% ls -l netboot/sandy/usr/lib/librt.so.1 -r--r--r-- 1 root wheel 23704 Oct 24 23:35 netboot/sandy/usr/lib/librt.so.1 pooma% readelf -sw netboot/sandy/usr/lib/librt.so.1 | grep GLOBAL | grep -v UND | grep -v FBSDpriv | grep FBSD 97: 0000000000000000 0 OBJECT GLOBAL DEFAULT ABS FBSD_1.0 But I think that your commit is the good change.