Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 326225 - dev-games/openscenegraph-2.8.3 upgrade requires manual dev-games/simgear rebuild to make simulation/flightgear work
Summary: dev-games/openscenegraph-2.8.3 upgrade requires manual dev-games/simgear rebu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Maciej Mrozowski
URL:
Whiteboard:
Keywords:
: 335408 339762 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-29 21:35 UTC by Martin von Gagern
Modified: 2011-10-15 20:06 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2010-06-29 21:35:41 UTC
Upgrading dev-games/openscenegraph from 2.8.2 to 2.8.3 caused games-simulation/flightgear 2.0.0 to be in my @preserved-rebuild set. The dependency was via a static library from dev-games/simgear-2.0.0, though, so the build failed due to a linker error.

/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../lib64/libsgmodel.a(animation.o): In function `SGTexTransformAnimation::createAnimationGroup(osg::Group&)':
(.text+0x59a1): undefined reference to `osg::StateAttribute::setUpdateCallback(osg::StateAttribute::Callback*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../lib64/libsgmodel.a(shadanim.o): In function `SGShaderAnimation::createAnimationGroup(osg::Group&)':
(.text+0xb92): undefined reference to `osg::StateAttribute::setUpdateCallback(osg::StateAttribute::Callback*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../lib64/libsgmodel.a(SGMaterialAnimation.o): In function `SGMaterialAnimation::createAnimationGroup(osg::Group&)':
(.text+0x36d2): undefined reference to `osg::StateAttribute::setUpdateCallback(osg::StateAttribute::Callback*)'
collect2: ld returned 1 exit status
make[2]: *** [fgfs] Error 1
make[2]: Leaving directory `/var/tmp/portage/games-simulation/flightgear-2.0.0/work/FlightGear-2.0.0/src/Main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/games-simulation/flightgear-2.0.0/work/FlightGear-2.0.0/src'
make: *** [all-recursive] Error 1
 * ERROR: games-simulation/flightgear-2.0.0 failed:
 *   died running emake, base_src_make
 * 
 * Call stack:
 *     ebuild.sh, line   48:  Called src_compile
 *   environment, line 3241:  Called games_src_compile
 *   environment, line 2076:  Called base_src_make
 *   environment, line  500:  Called die
 * The specific snippet of code:
 *           emake "$@" || die "died running emake, $FUNCNAME";
 * 
 * If you need support, post the output of 'emerge --info =games-simulation/flightgear-2.0.0',
 * the complete build log and the output of 'emerge -pqv =games-simulation/flightgear-2.0.0'.
 * The complete build log is located at '/var/log/portage/games-simulation:flightgear-2.0.0:20100629-212942.log'.
 * The ebuild environment file is located at '/var/tmp/portage/games-simulation/flightgear-2.0.0/temp/environment'.
 * S: '/var/tmp/portage/games-simulation/flightgear-2.0.0/work/FlightGear-2.0.0'

To fix it, all I had to do was remerge simgear manually via
# emerge -1 simgear
Then the flightgear remerge worked as expected.

The issue was also mentioned in bug #316919 comment #6. A solution suggested there is bumping the simgear revision just to make sure it gets upgraded after the openscenegraph update. You probably would have a bumped flightgear depending on a bumped simgear depending on >=openscenegraph-2.8.3.
Comment 1 Maciej Mrozowski gentoo-dev 2010-06-30 00:24:37 UTC
Yes, unfortunately I'm afraid nothing cannot be really done with this since simgear provides only static libs so there's no way to track at symbol level whether simgear actually needs rebuilding.

Possible workaround:
- add info pkg_postinst of openscenegraph that simgear needs to be rebuilt, optionally add the same info to boost, plib, openal and freealut.
- force simgear to build shared libs (needs some patching) and artificially bump SOVERSION with every release.
Comment 2 Martin von Gagern 2010-06-30 07:16:10 UTC
(In reply to comment #1)
> Possible workaround:
> - add info pkg_postinst of openscenegraph that simgear needs to be rebuilt,
> optionally add the same info to boost, plib, openal and freealut.

Might at least help. You could condition it on simgear actually being installed, using has_version.

> - force simgear to build shared libs (needs some patching) and artificially
> bump SOVERSION with every release.

I've got two more to offer:

- Tackle things at the ebuild DEPEND level, as outlined above. Yes, this would mean a revbump of simgear and all packages depending on it whenever one of its depedencies changes soname, but it would still be doable I guess, perhaps even automatically using some script run at regular intervals by a maintainer. And as the rebuilds are actually required, these revbumps won't cause unnecessary rebuilds, so I believe they are acceptable.

- Write a VERY small piece of code that references one symbol from each of the simgear dependencies. Compile that to a shared library, just for the sake of soname tracking. Then portage 2.2 resp. revdep_rebuild could catch the dependency of simgear on those other libs, and the core build process of simgear and flightgear would still be unpatched and therefore closer to upstream. Don't know if transitive deps would be required as well.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2010-08-16 20:13:45 UTC
Maciej  - since you bumped openscenegraph it's on you to resolve this bug.  Please add some info to the pkg_postinst to take care of this.
Comment 4 Maciej Mrozowski gentoo-dev 2010-08-17 03:58:11 UTC
That should do the trick.

--- openscenegraph-2.8.3.ebuild 13 Aug 2010 04:00:49 -0000      1.4
+++ openscenegraph-2.8.3.ebuild 17 Aug 2010 02:51:52 -0000
@@ -133,3 +133,11 @@
        cmake-utils_src_compile
        use doc && cmake-utils_src_compile doc_openscenegraph doc_openthreads
 }
+
+pkg_postinst() {
+       if has_version 'dev-games/simgear'; then
+               ewarn "dev-games/simgear has been detected and maye need to be rebuilt now."
+               ewarn "Please run the following:"
+               ewarn "  # emerge -1 dev-games/simgear"
+       fi
+}
Comment 5 Pacho Ramos gentoo-dev 2010-08-31 19:41:04 UTC
*** Bug 335408 has been marked as a duplicate of this bug. ***
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2011-10-15 20:06:00 UTC
*** Bug 339762 has been marked as a duplicate of this bug. ***