Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166221 - dev-python/gst-python broken with "-z, now"
Summary: dev-python/gst-python broken with "-z, now"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: GStreamer package maintainers
URL: http://bugzilla.gnome.org/show_bug.cg...
Whiteboard:
Keywords:
Depends on:
Blocks: 184572
  Show dependency tree
 
Reported: 2007-02-10 16:45 UTC by Naresh V
Modified: 2007-11-28 16:54 UTC (History)
1 user (show)

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


Attachments
gst-dlopen-now.c (gst-dlopen-now.c,363 bytes, text/plain)
2007-08-25 10:50 UTC, SpanKY
Details
gst-python-0.10.8-lazy.patch (gst-python-0.10.8-lazy.patch,534 bytes, patch)
2007-09-03 16:42 UTC, Samuli Suominen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Naresh V 2007-02-10 16:45:07 UTC
LDFLAGS --as-needed one.
The whole system except dev-python/gst-python works :)
Comment 1 Naresh V 2007-02-10 16:46:56 UTC
CFLAGS="-march=k8 -O2 -pipe" 
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
#LDFLAGS="-Wl, -O1 -Wl, --as-needed -Wl,-z,now"  <-- quodlibet broke here - because of gst-python
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s -Wl,--as-needed -Wl,-z,now" <-- and broke here too

SYNC="rsync://navya/gentoo-portage/"
GENTOO_MIRRORS="ftp://navya/gentoo http://gentoo.osuosl.org"

ACCEPT_KEYWORDS="~amd64"

USE="3dnow 3dnowext aac aalib acl acpi -arts avahi bash-completion beagle bzip2 cjk cscope directfb -eds -evo examples ffmpeg flac imagemagick jpeg2k -kde libnotify mmxext offensive ogg openal openexr pdf -pppd -qt -qt3 -qt4 ruby samba scope svg svga theora threads vim-syntax x264 xvid"
LINGUAS="en_US ja kn_IN"

VIDEO_CARDS="fbdev nv nvidia vesa"
ALSA_CARDS="via82xx"

FEATURES="sandbox collision-protect distlocks parallel-fetch strict userfetch userpriv usersandbox"

PORTAGE_ELOG_CLASSES="info warn error log"
PORTAGE_ELOG_SYSTEM="save"
#
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-02-10 17:05:18 UTC
No pastebins, please. Post/attach all relevant info, reopen then.
Comment 3 Naresh V 2007-02-10 17:18:24 UTC
after chatting with aballier on #gentoo-amd64 we pin-point at "-z, now"
it wasn't "--as-needed"
Comment 4 Naresh V 2007-02-10 17:19:13 UTC
nareshov@clueless /mnt/sda7/Music_G/H.I.M $ quodlibet 
Traceback (most recent call last):
  File "/usr/share/quodlibet/formats/__init__.py", line 22, in ?
    try: format = __import__(name, {}, {}, self)
  File "/usr/share/quodlibet/formats/xiph.py", line 9, in ?
    import gst
  File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ?
    from _gst import *
ImportError: /usr/lib64/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Traceback (most recent call last):
  File "/usr/share/quodlibet/formats/__init__.py", line 22, in ?
    try: format = __import__(name, {}, {}, self)
  File "/usr/share/quodlibet/formats/trueaudio.py", line 9, in ?
    import gst
  File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ?
    from _gst import *
ImportError: /usr/lib64/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Traceback (most recent call last):
  File "/usr/share/quodlibet/formats/__init__.py", line 22, in ?
    try: format = __import__(name, {}, {}, self)
  File "/usr/share/quodlibet/formats/mp3.py", line 9, in ?
    import gst
  File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ?
    from _gst import *
ImportError: /usr/lib64/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Traceback (most recent call last):
  File "/usr/share/quodlibet/formats/__init__.py", line 22, in ?
    try: format = __import__(name, {}, {}, self)
  File "/usr/share/quodlibet/formats/mp4.py", line 13, in ?
    import gst
  File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ?
    from _gst import *
ImportError: /usr/lib64/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Traceback (most recent call last):
  File "/usr/share/quodlibet/formats/__init__.py", line 22, in ?
    try: format = __import__(name, {}, {}, self)
  File "/usr/share/quodlibet/formats/mod.py", line 11, in ?
    import gst
  File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ?
    from _gst import *
ImportError: /usr/lib64/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Traceback (most recent call last):
  File "/usr/share/quodlibet/formats/__init__.py", line 22, in ?
    try: format = __import__(name, {}, {}, self)
  File "/usr/share/quodlibet/formats/mpc.py", line 11, in ?
    import gst
  File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ?
    from _gst import *
ImportError: /usr/lib64/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Traceback (most recent call last):
  File "/usr/share/quodlibet/formats/__init__.py", line 22, in ?
    try: format = __import__(name, {}, {}, self)
  File "/usr/share/quodlibet/formats/wav.py", line 12, in ?
    import gst
  File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ?
    from _gst import *
ImportError: /usr/lib64/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Traceback (most recent call last):
  File "/usr/share/quodlibet/formats/__init__.py", line 22, in ?
    try: format = __import__(name, {}, {}, self)
  File "/usr/share/quodlibet/formats/wavpack.py", line 9, in ?
    import gst
  File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ?
    from _gst import *
ImportError: /usr/lib64/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Supported formats: formats.mod, formats.mp3, formats.mp4, formats.mpc, formats.trueaudio, formats.wav, formats.wavpack, formats.xiph
Traceback (most recent call last):
  File "/usr/bin/quodlibet", line 301, in ?
    main()
  File "/usr/bin/quodlibet", line 33, in main
    library = load_library()
  File "/usr/bin/quodlibet", line 255, in load_library
    lib = library.init(const.LIBRARY)
  File "/usr/share/quodlibet/library/__init__.py", line 38, in init
    library.load(cache_fn, skip=True)
  File "/usr/share/quodlibet/library/_library.py", line 124, in load
    try: items = pickle.load(fileobj)
  File "/usr/share/quodlibet/formats/mp3.py", line 9, in ?
    import gst
  File "/usr/lib/python2.4/site-packages/gst-0.10/gst/__init__.py", line 108, in ?
    from _gst import *
ImportError: /usr/lib64/python2.4/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-02-10 17:30:00 UTC
So don't use such flags.
Comment 6 Naresh V 2007-02-10 17:35:08 UTC
(In reply to comment #5)
> So don't use such flags.
> 

Right now that's what I'm doing.
LDFLAGS="dancy stuff except <-z, now>" in /etc/portage/env/dev-python/gst-python

Thanks anyway.
Comment 7 SpanKY gentoo-dev 2007-08-25 10:50:08 UTC
Created attachment 129136 [details]
gst-dlopen-now.c

this should exhibit the same problem on any system
Comment 8 SpanKY gentoo-dev 2007-08-25 11:02:27 UTC
Comment on attachment 129136 [details]
gst-dlopen-now.c

actually, i lied ... ignore this
Comment 9 SpanKY gentoo-dev 2007-08-25 12:07:21 UTC
ugh, looking through gst's python code, it looks like the way they've written their module loading code requires everything be delayed

you should get upstream to have configure test and append -Wl,-z,nonow to LDFLAGS when possible
Comment 10 SpanKY gentoo-dev 2007-08-26 12:15:06 UTC
-z nonow doesnt seem to properly invert -z now ... -z lazy should work fine
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2007-09-01 06:30:33 UTC
You shouldn't be using such flags.. seriously. Anyway,

+  01 Sep 2007; Samuli Suominen <drac@gentoo.org> gst-python-0.10.8.ebuild:
+  Filter some ricing LDFLAGS wrt #168326.
Comment 12 SpanKY gentoo-dev 2007-09-01 15:12:07 UTC
me thinks you dont understand what -z,now actually does ... all hardened systems utilize it ... in fact, anyone who wants to be a ricer wouldnt actually utilize these flags as they cause a startup performance problem as a trade off at runtime

filtering does not actually solve the problem, you still need to do what i suggested: append -Wl,-z,lazy and get upstream to do the same in the configure script so we dont need to workaround with flag appending
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2007-09-03 16:42:10 UTC
Created attachment 129928 [details, diff]
gst-python-0.10.8-lazy.patch

Patch checking if -Wl,-z,lazy is accepted by ld, if yes, then use it.

vapier, looks better? ;)
Comment 14 Samuli Suominen (RETIRED) gentoo-dev 2007-09-03 16:58:33 UTC
If someone can be more verbose, for upstream, that'd be nice. URL attached.
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2007-09-03 17:16:39 UTC
For reference, gst-python built with -z,now:

drac@unique ~ $ exaile
Traceback (most recent call last):
  File "exaile.py", line 69, in <module>
    from xl import *
  File "//usr/share/exaile/xl/tracks.py", line 18, in <module>
    import common, media, db, config, trackslist
  File "//usr/share/exaile/xl/media/__init__.py", line 4, in <module>
    import gst
  File "/usr/lib/python2.5/site-packages/gst-0.10/gst/__init__.py", line 108, in <module>
    from _gst import *
ImportError: /usr/lib/python2.5/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2007-09-03 17:42:17 UTC
Upstream is now well aware of the problem and has test it himself.

For now, he requested me to modify them inside ebuild 'till the bug in URL is solved.

20:30 < bilboed> drac, modify the LDFLAGS in the ebuild

+  03 Sep 2007; Samuli Suominen <drac@gentoo.org> gst-python-0.10.8.ebuild:
+  Instead of filtering -z,now, append -z,lazy wrt #166221.
Comment 17 SpanKY gentoo-dev 2007-09-03 21:39:13 UTC
weird, i only got about half the comments posted here via e-mail ...

the configure patch posted is fugly (but pretty much every ld check ive seen in a configure script was fugly :D), so if it works i'd roll with it
Comment 18 Samuli Suominen (RETIRED) gentoo-dev 2007-11-28 16:54:14 UTC
(In reply to comment #17)
> weird, i only got about half the comments posted here via e-mail ...
> 
> the configure patch posted is fugly (but pretty much every ld check ive seen in
> a configure script was fugly :D), so if it works i'd roll with it
> 

While version bumping, I've applied it in 0.10.9 as upstream is not very responsive wrt this issue. WFM.