Hide Forgot
Description of problem: See bug 739766 As I understand it, gcc makes no promises about the ABI it exposes to plugins: every plugin needs to be rebuilt every time gcc is rebuilt. Bug 739766 shows a problem where an rpm of gcc-python-plugin was out-of-sync with the gcc rpm, leading to the python plugin failing its version check on startup. There would seem to be two ways of fixing this: (a) embed the plugin sources within the build of "gcc" (b) express the exact version requirements in rpm metadata, so that the plugin rpm has a Requires that is only satisfied by a "Provides" from the exact gcc rpm that it was built against. Problems with approach (a): * plugins are separate projects from gcc, and have their own release cycle: * They may be considerably less mature than gcc, and sugject to change. * The gcc maintainer probably doesn't want to care about the various plugins that exist * As a plugin mainainer, I'm only familiar with a small subset of gcc internals * We don't want a build issue with a plugin to stop gcc from rebuilding I prefer option (b) for gcc-python-plugin. However, (b) is also fiddly. Ideally we would have something like: Requires: gcc%{_isa} = %{gcc_version}-%{gcc_release} within the plugin's metadata. I tried this for gcc-python-plugin.spec with attachment 524073 [details]. Unfortunately, we can't query the rpm database from within a specfile: within a Koji build, there is no guarantee that the rpm database is available, or matches the correct versions within the build root (AIUI, the chroot built by mock doesn't contain it). So instead I used this approach: http://pkgs.fedoraproject.org/gitweb/?p=gcc-python-plugin.git;a=commitdiff;h=4fabc53d12d03cad2f8f5dcc0b0c1c5187e9f7d7 which involves scraping gcc's version-release (without the dist) from: gcc --version However this doesn't work either: gcc-python2-plugin-0.6-3.fc17.i686 requires gcc = 0:4.6.1-9.fc17 but the gcc in rawhide currently has a .fc16 dist tag: 4.6.1-9.fc16 Is it possible to add (c) some kind of command-line option to emit a build version? e.g. something like: $ gcc --plugin-abi-version 4.6.1-9.fc16 where it's defined to emit a string in an unspecified format, and (d) for gcc to have a "Provides" on that? e.g. echo '%{version}-%{release}' > gcc/PLUGIN_ABI_VERSION analogous to the DEV_PHASE code in gcc.spec and something like: Provides: gcc-abi-version%{_isa} = %{version}-%{release} With both (c) and (d) in place, a specfile for a plugin can invoke the new gcc command-line option to get at the correct metadata, and add a Requires on it, and then rpm can ensure that the plugin and gcc versions match. Hope the above makes sense Version-Release number of selected component (if applicable): gcc-4.6.1-9.fc15.x86_64
Should I work on a patch for (b)? Alternatively, would approach (a) be preferable to you?
gcc-4.6.2-1.fc16 has: * Thu Oct 27 2011 Jakub Jelinek <jakub> 4.6.2-1 [...snip...] - add `gcc -print-file-name=rpmver` file with gcc NVRA for plugins (#744922) [...snip...] Thanks; am investigating
$ rpm -q gcc gcc-4.6.2-1.fc16.x86_64 $ gcc -print-file-name=rpmver /usr/lib/gcc/x86_64-redhat-linux/4.6.2/rpmver $ cat $(gcc -print-file-name=rpmver) gcc-4.6.2-1.fc16.%{arch}
gcc-4.6.2-1.fc16,libtool-2.4-7.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/gcc-4.6.2-1.fc16,libtool-2.4-7.fc16
Package gcc-4.6.2-1.fc16, libtool-2.4-7.fc16, gcc-python-plugin-0.6-4.2.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing gcc-4.6.2-1.fc16 libtool-2.4-7.fc16 gcc-python-plugin-0.6-4.2.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-15040 then log in and leave karma (feedback).
gcc-4.6.2-1.fc16, libtool-2.4-7.fc16, gcc-python-plugin-0.6-4.2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.