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

Bug#871275: libapt-pkg5.0: requires rebuild against GCC 7 and symbols/shlibs bump



Hi Julian,

On 07/08/17 11:33, Julian Andres Klode wrote:
> On Mon, Aug 07, 2017 at 03:47:15PM +0100, jcowgill@debian.org wrote:
>> Package: libapt-pkg5.0
>> Version: 1.5~beta1
>> Severity: serious
>> Tags: sid buster
>> User: debian-gcc@lists.debian.org
>> Usertags: gcc-7-op-mangling
>>
>> Hi,
>>
>> It appears that your package provides an external symbol that is
>> affected by the recent name mangling changes in GCC 7. See:
>> https://gcc.gnu.org/gcc-7/porting_to.html#conversion-op-mangling
>>
>> In GCC 7, the name mangling for C++ conversion operators which return a
>> type using the abi_tag attribute (most commonly std::string) has
>> changed. When your library is compiled with GCC 7, it will now emit two
>> symbols for the conversion operator using the new and old naming.
>> Executables compiled with GCC 7 will always use the new symbol, while
>> old executables compiled using <= GCC 6 will use the old symbol. For new
>> executables to build without undefined references, your library will
>> need rebuilding with GCC 7.
> 
> I'd say that's a bug in GCC, and it should link to the old name until
> GCC 8 is out (and build both) to have a transition period.

I don't think that will help much - it just moves the time when we have
to do the rebuilds by a year. The symbols/shlibs changes would still be
required to fix the dependencies.

>> To ensure that new executables will pull in the newer version of the
>> library built with GCC 7:
>> - Your library package should Build-Depend on g++ (>= 4:7).
> 
> It's complicated. We also want the package to work in Ubuntu, and that
> does not have that yet. For Debian, not doing that works entirely fine,
> for Ubuntu it's getting weird down the line and that needs a rebuild
> then.
> 
> We could just binNMU that, but the next upload is happening any minute
> now anyway.

I think Ubuntu does have GCC 7 as the default in artful-proposed (though
I can't remember what cases that gets pulled in).

I'm not sure when the buildds get uploaded, but yesterday a lot of them
still had GCC 6, so build-depending on GCC 7 is required to ensure it's
used on every architecture.

>> - If your package provides a symbols file, ensure that the new
>>   conversion operator symbols have a version matching the version this
>>   bug is fixed in (including the Debian revision and tilde if
>>   necessary).
>>
>>   Using apt as an example (debian/libapt-pkg5.0.symbols):
>>     (c++)"URI::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >[abi:cxx11]()@APTPKG_5.0" 0.8.0
>>   + (c++)"URI::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >()@APTPKG_5.0" 1.5~beta2~
>>
>>   Where "1.5~beta2" is the version this bug was fixed in.
> 
> Sure, we can do that. The symbol file is not up to date
> anyway, but missing symbols do not really hurt - they
> just mean "latest". Which is better for now.
> 
> The next upload will obviously be built with gcc 7, we
> can do the extra stuff later on (that's wishlist then
> I'd say). So I won't close the bug in the upload and
> keep it open until we have the annotations.

Assuming it is actually built using GCC 7 (which may not be the case),
this is probably OK because as you say dpkg-gensymbols will add the
extra symbol using the latest version from the changelog.

Thanks,
James

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: