<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>166221</bug_id>
          
          <creation_ts>2007-02-10 16:45 0000</creation_ts>
          <short_desc>dev-python/gst-python broken with &quot;-z, now&quot;</short_desc>
          <delta_ts>2007-11-28 16:54:14 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Library</component>
          <version>2006.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://bugzilla.gnome.org/show_bug.cgi?id=473234</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>184572</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>nareshov@gmail.com</reporter>
          <assigned_to>gstreamer@gentoo.org</assigned_to>
          <cc>vapier@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>nareshov@gmail.com</who>
            <bug_when>2007-02-10 16:45:07 0000</bug_when>
            <thetext>LDFLAGS --as-needed one.
The whole system except dev-python/gst-python works :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nareshov@gmail.com</who>
            <bug_when>2007-02-10 16:46:56 0000</bug_when>
            <thetext>CFLAGS=&quot;-march=k8 -O2 -pipe&quot; 
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CXXFLAGS=&quot;${CFLAGS}&quot;
#LDFLAGS=&quot;-Wl, -O1 -Wl, --as-needed -Wl,-z,now&quot;  &lt;-- quodlibet broke here - because of gst-python
LDFLAGS=&quot;-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s -Wl,--as-needed -Wl,-z,now&quot; &lt;-- and broke here too

SYNC=&quot;rsync://navya/gentoo-portage/&quot;
GENTOO_MIRRORS=&quot;ftp://navya/gentoo http://gentoo.osuosl.org&quot;

ACCEPT_KEYWORDS=&quot;~amd64&quot;

USE=&quot;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&quot;
LINGUAS=&quot;en_US ja kn_IN&quot;

VIDEO_CARDS=&quot;fbdev nv nvidia vesa&quot;
ALSA_CARDS=&quot;via82xx&quot;

FEATURES=&quot;sandbox collision-protect distlocks parallel-fetch strict userfetch userpriv usersandbox&quot;

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

Right now that&apos;s what I&apos;m doing.
LDFLAGS=&quot;dancy stuff except &lt;-z, now&gt;&quot; in /etc/portage/env/dev-python/gst-python

Thanks anyway.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-08-25 10:50:08 0000</bug_when>
            <thetext>Created an attachment (id=129136)
gst-dlopen-now.c

this should exhibit the same problem on any system</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-08-25 11:02:27 0000</bug_when>
            <thetext>(From update of attachment 129136)
actually, i lied ... ignore this</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-08-25 12:07:21 0000</bug_when>
            <thetext>ugh, looking through gst&apos;s python code, it looks like the way they&apos;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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-08-26 12:15:06 0000</bug_when>
            <thetext>-z nonow doesnt seem to properly invert -z now ... -z lazy should work fine</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ssuominen@gentoo.org</who>
            <bug_when>2007-09-01 06:30:33 0000</bug_when>
            <thetext>You shouldn&apos;t be using such flags.. seriously. Anyway,

+  01 Sep 2007; Samuli Suominen &lt;drac@gentoo.org&gt; gst-python-0.10.8.ebuild:
+  Filter some ricing LDFLAGS wrt #168326.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-09-01 15:12:07 0000</bug_when>
            <thetext>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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ssuominen@gentoo.org</who>
            <bug_when>2007-09-03 16:42:10 0000</bug_when>
            <thetext>Created an attachment (id=129928)
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? ;)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ssuominen@gentoo.org</who>
            <bug_when>2007-09-03 16:58:33 0000</bug_when>
            <thetext>If someone can be more verbose, for upstream, that&apos;d be nice. URL attached.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ssuominen@gentoo.org</who>
            <bug_when>2007-09-03 17:16:39 0000</bug_when>
            <thetext>For reference, gst-python built with -z,now:

drac@unique ~ $ exaile
Traceback (most recent call last):
  File &quot;exaile.py&quot;, line 69, in &lt;module&gt;
    from xl import *
  File &quot;//usr/share/exaile/xl/tracks.py&quot;, line 18, in &lt;module&gt;
    import common, media, db, config, trackslist
  File &quot;//usr/share/exaile/xl/media/__init__.py&quot;, line 4, in &lt;module&gt;
    import gst
  File &quot;/usr/lib/python2.5/site-packages/gst-0.10/gst/__init__.py&quot;, line 108, in &lt;module&gt;
    from _gst import *
ImportError: /usr/lib/python2.5/site-packages/gst-0.10/gst/_gst.so: undefined symbol: libxml_xmlDocPtrWrap
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ssuominen@gentoo.org</who>
            <bug_when>2007-09-03 17:42:17 0000</bug_when>
            <thetext>Upstream is now well aware of the problem and has test it himself.

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

20:30 &lt; bilboed&gt; drac, modify the LDFLAGS in the ebuild

+  03 Sep 2007; Samuli Suominen &lt;drac@gentoo.org&gt; gst-python-0.10.8.ebuild:
+  Instead of filtering -z,now, append -z,lazy wrt #166221.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-09-03 21:39:13 0000</bug_when>
            <thetext>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&apos;d roll with it</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ssuominen@gentoo.org</who>
            <bug_when>2007-11-28 16:54:14 0000</bug_when>
            <thetext>(In reply to comment #17)
&gt; weird, i only got about half the comments posted here via e-mail ...
&gt; 
&gt; the configure patch posted is fugly (but pretty much every ld check ive seen in
&gt; a configure script was fugly :D), so if it works i&apos;d roll with it
&gt; 

While version bumping, I&apos;ve applied it in 0.10.9 as upstream is not very responsive wrt this issue. WFM.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>129136</attachid>
            <date>2007-08-25 10:50 0000</date>
            <desc>gst-dlopen-now.c</desc>
            <filename>gst-dlopen-now.c</filename>
            <type>text/plain</type>
            <data encoding="base64">I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxkbGZjbi5oPgppbnQgbWFpbihpbnQgYXJnYywg
Y2hhciAqYXJndltdKQp7CgljaGFyICpmaWxlID0gKGFyZ2MgPiAyID8gYXJndlsyXSA6ICIvdXNy
L2xpYi9weXRob24yLjQvc2l0ZS1wYWNrYWdlcy9nc3QtMC4xMC9nc3QvX2dzdC5zbyIpOwoJdm9p
ZCAqbGliID0gZGxvcGVuKGZpbGUsIFJUTERfTk9XKTsKCWlmICghbGliKQoJCXByaW50ZigiZmFp
bGVkIHRvIGRsb3Blbiglcyk6ICVzXG4iLCBmaWxlLCBkbGVycm9yKCkpOwoJZWxzZSB7CgkJcHJp
bnRmKCJkbG9wZW4oJXMpIHdvcmtlZFxuIiwgZmlsZSk7CgkJZGxjbG9zZShsaWIpOwoJfQoJcmV0
dXJuIChsaWIgIT0gTlVMTCk7Cn0K
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>129928</attachid>
            <date>2007-09-03 16:42 0000</date>
            <desc>gst-python-0.10.8-lazy.patch</desc>
            <filename>gst-python-0.10.8-lazy.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">ZGlmZiAtdXIgZ3N0LXB5dGhvbi0wLjEwLjgub3JpZy9jb25maWd1cmUuYWMgZ3N0LXB5dGhvbi0w
LjEwLjgvY29uZmlndXJlLmFjCi0tLSBnc3QtcHl0aG9uLTAuMTAuOC5vcmlnL2NvbmZpZ3VyZS5h
YwkyMDA3LTA4LTAxIDE5OjUxOjIzLjAwMDAwMDAwMCArMDMwMAorKysgZ3N0LXB5dGhvbi0wLjEw
LjgvY29uZmlndXJlLmFjCTIwMDctMDktMDMgMTk6MzI6MjEuMDAwMDAwMDAwICswMzAwCkBAIC0z
MzQsNiArMzM0LDE3IEBACiAKIEFHX0dTVF9WQUxHUklORF9DSEVDSwogCitBQ19NU0dfQ0hFQ0tJ
TkcoW3doZXRoZXIgJExEIGFjY2VwdHMgLXosbGF6eV0pCitjYXNlIGAkTEQgLXosbGF6eSAtdiAy
PiYxIDwvZGV2L251bGxgIGluCisqR05VKiB8ICond2l0aCBCRkQnKikKKyAgTERGTEFHUz0iJExE
RkxBR1MgLVdsLC16LGxhenkiCisgIEFDX01TR19SRVNVTFQoW3llc10pCisgIDs7CisqKQorICBB
Q19NU0dfUkVTVUxUKFtub10pCisgIDs7Citlc2FjCisKIEFDX09VVFBVVChbCiAgIE1ha2VmaWxl
CiAgIGNvZGVnZW4vTWFrZWZpbGUK
</data>        

          </attachment>
    </bug>

</bugzilla>