<?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>178999</bug_id>
          
          <creation_ts>2007-05-18 12:58 0000</creation_ts>
          <short_desc>dev-util/cmake has an internal copy of zlib</short_desc>
          <delta_ts>2008-02-13 17:25:41 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>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>flameeyes@gentoo.org</reporter>
          <assigned_to>kde@gentoo.org</assigned_to>
          <cc>endgame.dos@gmail.com</cc>
    
    <cc>ingmar@gentoo.org</cc>
    
    <cc>pilla@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>flameeyes@gentoo.org</who>
            <bug_when>2007-05-18 12:58:04 0000</bug_when>
            <thetext>Not a good idea, in general it would be nicer to use the shared copy of zlib
already present in the system, to avoid having to load more data (zlib is
almost always already present in memory) and to allow fixes in zlib to be
shared by its users too.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>carlo@gentoo.org</who>
            <bug_when>2007-05-20 22:46:05 0000</bug_when>
            <thetext>Why do you single out zlib? The other included stuff isn&apos;t less annoying, imho.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>flameeyes@gentoo.org</who>
            <bug_when>2007-05-20 22:53:27 0000</bug_when>
            <thetext>Because I found zlib during my survey of exported symbols :)
adler32 symbols is quite specific to zlib, so it&apos;s the easiest to spot ;)

But yes, everything they bundle in is annoying (and their failure at using a shared library and/or hiding the symbols they don&apos;t need to export makes it a big workload for ld.so).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>endgame.dos@gmail.com</who>
            <bug_when>2007-09-01 20:01:12 0000</bug_when>
            <thetext>The CMake bootstrap command has the option &quot;--system-libs&quot; to use system-installed 3rd party libraries. Perhaps that can be of some use?

DEPEND will need to include net-misc/curl, dev-libs/expat, sys-libs/zlib (though that&apos;s in system, isn&apos;t it?) and dev-libs/xmlrpc-c with USE=curl (build fails without)

When I configure cmake with configure --system-libs and those libraries, it will build and then running ldd on cmake looks like this:

$ ldd bin/cmake 
        linux-gate.so.1 =&gt;  (0xffffe000)
        libdl.so.2 =&gt; /lib/libdl.so.2 (0xb7f4c000)
        libexpat.so.1 =&gt; /usr/lib/libexpat.so.1 (0xb7f2c000)
        libz.so.1 =&gt; /lib/libz.so.1 (0xb7f1a000)
        libstdc++.so.6 =&gt; /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/libstdc++.so.6 (0xb7e3a000)
        libm.so.6 =&gt; /lib/libm.so.6 (0xb7e17000)
        libgcc_s.so.1 =&gt; /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/libgcc_s.so.1 (0xb7e0c000)
        libc.so.6 =&gt; /lib/libc.so.6 (0xb7ce4000)
        /lib/ld-linux.so.2 (0xb7f61000)

Is this a good thing? I think so, but I&apos;m not 100% on this stuff.

Let me know if there&apos;s anything else I can do to help.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>philantrop@gentoo.org</who>
            <bug_when>2007-09-07 20:51:08 0000</bug_when>
            <thetext> (In reply to comment #3)
&gt; The CMake bootstrap command has the option &quot;--system-libs&quot; to use
&gt; system-installed 3rd party libraries. Perhaps that can be of some use?

Thanks, at least I wasn&apos;t aware of that. :) And, yes, it helps a lot but...

I&apos;ve been trying to use it and patched my way through some problems but with --as-needed in my LDFLAGS cmake fails to build. Even without it, things eventually always end up like this at one point or another (I&apos;ve patched that one away by explicitly linking in libxml2 but ctest still fails then):

[ 97%] Built target cpack
[ 98%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesWidget.o
[ 98%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/ccmake.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/../../../../lib64/libxmlrpc.so: undefined reference to `xmlFreeParserCtxt&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/../../../../lib64/libxmlrpc.so: undefined reference to `xmlCreatePushParserCtxt&apos;
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/../../../../lib64/libxmlrpc.so: undefined reference to `xmlParseChunk&apos;
collect2: ld returned 1 exit status

All three come from libxml2 and should be usable for xmlrpc but obviously something is still wrong with it even if neither of those are linked with --as-needed. If anyone has an idea, suggestions or even a solution, I&apos;d be glad because I&apos;ve wasted two days on this already. :-)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>endgame.dos@gmail.com</who>
            <bug_when>2007-09-10 18:56:10 0000</bug_when>
            <thetext>@Wulf: What happens if you add $(xml2-config --libs) to your LDFLAGS before trying the bootstrap?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>philantrop@gentoo.org</who>
            <bug_when>2007-09-23 21:41:30 0000</bug_when>
            <thetext> (In reply to comment #5)
&gt; @Wulf: What happens if you add $(xml2-config --libs) to your LDFLAGS before
&gt; trying the bootstrap?

Unfortunately, exactly the same as in comment #4.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>endgame.dos@gmail.com</who>
            <bug_when>2007-09-23 22:08:14 0000</bug_when>
            <thetext>Should this block bug 129413 (the --as-needed tracking bug)?

Now that I&apos;ve got a system with LDFLAGS=&quot;-Wl,--as-needed&quot;, I&apos;ve had a bit of a play around and found that it builds if you don&apos;t have &quot;-Wl,--as-needed&quot; when linking ctest.

According to http://www.gentoo.org/proj/en/qa/asneeded.xml, libxmlrpc_client.so (from dev-libs/xmlrpc-c) will need to link to libxml2 correctly for this to work.

I don&apos;t have time to probe this more deeply right now, unfortunately.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>philantrop@gentoo.org</who>
            <bug_when>2007-09-27 18:51:18 0000</bug_when>
            <thetext>This is fixed in cmake-2.4.7-r2 which is currently p.masked until a dependency has been properly keyworded. For now, --no-as-needed will be appended.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>philantrop@gentoo.org</who>
            <bug_when>2008-01-13 15:32:00 0000</bug_when>
            <thetext>I&apos;ve just unmasked cmake-2.4.7-r2 which fixes this issue.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pilla@gentoo.org</who>
            <bug_when>2008-02-13 17:22:07 0000</bug_when>
            <thetext>Sorry to bother you guys, but I just wanted to report that dev-util/cmake-2.4.7-r2 still fails for me if you have LDFLAGS=&quot;-Wl,--as-needed&quot;.

[ 98%] Building CXX object Source/CMakeFiles/ctest.dir/ctest.o
Linking CXX executable ../bin/ctest
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libxmlrpc.so: undefined reference to `xmlFreeParserCtxt&apos;
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libxmlrpc.so: undefined reference to `xmlCreatePushParserCtxt&apos;
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libxmlrpc.so: undefined reference to `xmlParseChunk&apos;
collect2: ld returned 1 exit status
make[2]: *** [bin/ctest] Error 1
make[1]: *** [Source/CMakeFiles/ctest.dir/all] Error 2
make: *** [all] Error 2
 *
 * ERROR: dev-util/cmake-2.4.7-r2 failed.

It compiles without --as-needed</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>flameeyes@gentoo.org</who>
            <bug_when>2008-02-13 17:25:41 0000</bug_when>
            <thetext>Re-emerge xmlrpc-c as the ChangeLog already says.
</thetext>
          </long_desc>
      
    </bug>

</bugzilla>