From owner-freebsd-arch@freebsd.org Wed Jun 14 14:17:09 2017 Return-Path: Delivered-To: freebsd-arch@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 20B2DD8ECCF for ; Wed, 14 Jun 2017 14:17:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A70DA6509F; Wed, 14 Jun 2017 14:17:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v5EEH3JX073555 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 14 Jun 2017 17:17:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v5EEH3JX073555 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v5EEH3lS073554; Wed, 14 Jun 2017 17:17:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 14 Jun 2017 17:17:03 +0300 From: Konstantin Belousov To: Lewis Donzis Cc: Jilles Tjoelker , Alexander Kabaev , deischen@freebsd.org, freebsd-arch@freebsd.org Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 Message-ID: <20170614141703.GN2088@kib.kiev.ua> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> <20160930184418.1047afc2@kan> <20161001092515.GW38409@kib.kiev.ua> <20161001201655.GA91457@stack.nl> <20161001210722.GC38409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) 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-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 14:17:09 -0000 On Wed, Jun 14, 2017 at 08:38:35AM -0500, Lewis Donzis wrote: > We had a discussion last October about __mq_oshandle() no longer being visible in FreeBSD 11, and I think the result was that it should be put back in the Symbol.map. There was also some discussion about renaming it. > > At the moment (11.0-RELEASE-p10), the function is still missing from librt.so.1, but is present in librt.a. What seems odd is that running ???make??? in /usr/src/lib/librt produces a librt.so.1 that *does* have this function. > > I???m curious as to how it???s possible that librt.a has the function but the released librt.so.1 does not have it, yet rebuilding from source does include the function? The versioning on librt was broken some time ago, but I think it was fixed before 11.0. Anyway, it works for me in HEAD and stable/11. librt.a, as any static library, does not support versioning so any symbol from the library can be accessed by linked code. This is one of the reasons why static linking is discouraged. It was decided that a symbol in the app-useable namespace must be officially exported from librt, and we export mq_getfd_np() for your purposes. Again, I am not sure was it done before 11.0 or after, but the symbol is definitely present in stable/11 and in upcoming 11.1.