Wednesday, 4 March 2015

Re: please fix build failures, including those introduced by GCC 5

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 15-03-04 06:58 PM, Rodney Dawes wrote:
> Does GCC 5 do something to cause dpkg-gensymbols to break? For example, I was checking the list to see if anything
> I deal with directly was broken, and checked a few of the other failures for packages I depend on, to see what to
> expect. In doing so, I ran across the ubuntu-download-manager [1] failure. It seems to actually build just fine,
> but the dpkg-gensymbols check is failing. It seems to no longer export the operator() method on std::function
> definitions. For example:
>
> - (c++)"std::function<void (Ubuntu::DownloadManager::Download*)>::operator()(Ubuntu::DownloadManager::Download*)
> const@Base" 0.4+14.10.20140618 +#MISSING: 0.9+15.04.20141202-0ubuntu1# (c++)"std::function<void
> (Ubuntu::DownloadManager::Download*)>::operator()(Ubuntu::DownloadManager::Download*) const@Base"
> 0.4+14.10.20140618
>
> This is not mentioned in the porting guide that I can see though, and removing these from the .symbols file will
> break building on gcc 4.x. The porting guide only mentions converting std::nullptr_t to bool in C++ issues. What's
> the best way to deal with this if it comes up?

This is an unfortunate artifact of using dh_gensymbols with C++; every point release of GCC produces a different set
of symbols mostly due to differences in inlining and the optimizer. Proper library symbol versioning and use of
- -fvisibility=hidden goes a long way towards minimizing this symbol churn as well as delivering other benefits.

The simplest way to deal with this is to use the "optional" decorator in the symbols file. Change the entry to

(c++|optional=gcc-4.9)"std::function<void
(Ubuntu::DownloadManager::Download*)>::operator()(Ubuntu::DownloadManager::Download*) const@Base" 0.4+14.10.2014061

The part after the "=" is a comment so the next maintainer knows why you marked that symbol(s) as optional. Strongly
recommended but not required.

- --
Stephen M. Webb <stephen.webb@canonical.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJU98qWAAoJEAoP+EW32zQnQV8P/1ZFRu0haD2k3J6+HOe/p+9C
zzJcKREvfSfg9XzrXyCqxxDg1GKOVJnXrAW+/cuthnPzpOAFTtWVZtaDpuTfl9lU
v3lRaiEQ5l18zbnUsuttVg1eXVYnM90jyJn7NNk8AjOElkxFYWO0CEdp4BL+x6Q8
MXSs/Xc/fAmiW30VukkDNDM2Hv3wS8Z2NmVj2jYrPYfvXFV1tObxYSa6Swf/hQeH
oOfNnTdwRgp7fQaXVf35EQM/mFDxEdMDe/ton3uQDeTn2DOqGScOZydnrFGztxb7
T4cexivzGIp7Kaf9tJ+yi23YOvRNyh8wo1CS0V4PtPYXsE5RYrsXrhNZAm6KVUGU
5NVgH0sQuHZ6IiGFzQLWliApc5pEIpY/Ak4LEcdH+XSsb4w5wUV/iALwvBoDiQvS
1CrnNcDxuKiQjS+ZgImLTY13hfgNgurycO/xJM1FRDQi9HrKftBtcpvHuzLlNfnK
HQPMPq3hB35VqKNKLrmY4VgkFbdM+tt2eFyK8I0HiNffaoStvEU3wbPP1ciAMyNt
qleB0HjOfXnVk/izemX0Kq8LIfj+U2OU18nBp6/B0tlwG1En7Ks7K5eMiegmUR58
0vxybtZXZUk3/9Prm8ZQoaIC5fsc9nlyGz2RixXZHqyrVpZWJS+hb9pD3+F2cmYy
/WjHsGv0BvGT69viZ1DV
=L/FY
-----END PGP SIGNATURE-----

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel