<?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>226931</bug_id>
          
          <creation_ts>2008-06-14 18:26 0000</creation_ts>
          <short_desc>x11-wm/windowmaker: append-ldflags is used to pass libraries</short_desc>
          <delta_ts>2008-06-18 18:12:52 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>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>226863</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>flameeyes@gentoo.org</reporter>
          <assigned_to>gnustep@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>flameeyes@gentoo.org</who>
            <bug_when>2008-06-14 18:26:49 0000</bug_when>
            <thetext>I&apos;ve made append-ldflags throw a warning when libraries are passed through it
to link them in.

The reason is that LDFLAGS should _not_ be used for libraries, as it has to be
positioned before the list of objects to link together, while libraries should
go after.

This mistake in commandline is what causes as-needed to either fail or not
apply at all (if LDFLAGS are put at the end).

Please fix your package not to pass libraries through LDFLAGS.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2008-06-14 21:17:50 0000</bug_when>
            <thetext>since there are a whole lot more packages that do this, can you please explain how one is supposed to fix this?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2008-06-18 15:58:59 0000</bug_when>
            <thetext>if you don&apos;t care to explain your problem, then I take it as an unsolvable problem.  sorry.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>flameeyes@gentoo.org</who>
            <bug_when>2008-06-18 16:13:38 0000</bug_when>
            <thetext>I have over 400 bugs open at the same bloody time, I&apos;m doing my bloody job and you can WAIT A BLOODY WEEK AT LEAST!
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2008-06-18 16:24:38 0000</bug_when>
            <thetext>If the tone of the bug was less commanding and less vague, I probably could have waited a month without a problem.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2008-06-18 16:44:01 0000</bug_when>
            <thetext>Created an attachment (id=157463)
windowmaker-ldflags-libs.patch

Calm down, please, both of you. grobian, the problem is that `gcc -Wl,--as-needed -lresolv *.o` won&apos;t link with -lresolv. It needs to be at the end of the command line, after the .o files, so that ld can tell whether it&apos;s actually used. This is what LIBS is for as opposed to LDFLAGS, and windowmaker appears to have no problems with LIBS, meaning it could be fixed as simple as this (though it&apos;d be nice if flag-o-matic had an append-libs). Since I don&apos;t have access to a Solaris box, could you please test to make sure that there is no change in configure test results, and either commit this yourself or let me know afterwards?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2008-06-18 16:48:38 0000</bug_when>
            <thetext>Aha.  Thanks for the explanation.  Looking at the thing itself, I guess I could also just patch configure to add the right macro to figure out if resolv() can be used without libs, or -lresolv as suggestion on Solaris.  There is such macro, but I forget which one each time.  Wouldn&apos;t that just solve the issue in the most elegant way?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2008-06-18 16:59:04 0000</bug_when>
            <thetext>Yes, that would be even better. It looks like windowmaker already tries to look in libresolv:

AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON, 1, [define if you have then inet_aton function (set by configure)]),
     for lib in resolv socket inet bsd; do
        AC_CHECK_LIB($lib, inet_aton, [AC_DEFINE(HAVE_INET_ATON)
                     NETLIBS=&quot;$NETLIBS -l$lib&quot;; break],, $NETLIBS)
     done)

so then the question is not what the right macro is -- AC_CHECK_LIB is the right one -- but why it didn&apos;t work.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2008-06-18 17:29:07 0000</bug_when>
            <thetext>checking for inet_aton in -lresolv... yes

so the whole -lresolv thing is obsolete (in -r7 at least)

the -lintl is left but nastier IMO.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2008-06-18 18:07:42 0000</bug_when>
            <thetext>&gt; checking for inet_aton in -lresolv... yes
&gt; 
&gt; so the whole -lresolv thing is obsolete (in -r7 at least)

Good to know. I&apos;ve removed it.

&gt; the -lintl is left but nastier IMO.

There&apos;s no -lintl in the ebuilds in gentoo-x86, so I&apos;m assuming you&apos;re checking an overlay? Let me know and I&apos;ll take a look, in the weekend at the latest, if you want. I&apos;ll go ahead and close this bug since it&apos;s fixed in the main tree.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2008-06-18 18:12:52 0000</bug_when>
            <thetext>&gt; &gt; the -lintl is left but nastier IMO.
&gt; 
&gt; There&apos;s no -lintl in the ebuilds in gentoo-x86, so I&apos;m assuming you&apos;re checking
&gt; an overlay? Let me know and I&apos;ll take a look, in the weekend at the latest, if
&gt; you want. I&apos;ll go ahead and close this bug since it&apos;s fixed in the main tree.

Thanks, but I already found where the problem must be.  The configure script does not properly check if it needs libintl (only if gettext function is not found).

Anyway, it seems indeed I only fixed this for Solaris in the prefix tree, not in gentoo-x86.
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>157463</attachid>
            <date>2008-06-18 16:44 0000</date>
            <desc>windowmaker-ldflags-libs.patch</desc>
            <filename>windowmaker-ldflags-libs.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHdpbmRvd21ha2VyLTAuOTIuMC1yNy5lYnVpbGQKKysrIHdpbmRvd21ha2VyLTAuOTIuMC1y
Ny5lYnVpbGQKQEAgLTEzMCw3ICsxMzAsNyBAQAogCWFwcGVuZC1mbGFncyAtREJPVU5DRV9BUFAg
LURORVdBUFBJQ09OIC1EVklSVFVBTF9ERVNLVE9QCiAKIAkjIFNvbGFyaXMgaGFzIGluZXRfYXRv
biwgYnV0IGl0J3MgaGlkZGVuIGluIC1scmVzb2x2Ci0JW1sgJHtDSE9TVH0gPT0gKi1zb2xhcmlz
KiBdXSAmJiBhcHBlbmQtbGRmbGFncyAtbHJlc29sdgorCVtbICR7Q0hPU1R9ID09ICotc29sYXJp
cyogXV0gJiYgTElCUz0iJHtMSUJTfSAtbHJlc29sdiIKIAogCSMgZGVmYXVsdCBzZXR0aW5ncyB3
aXRoICRteWNvbmYgYXBwZW5kZWQKIAllY29uZiBcCg==
</data>        

          </attachment>
    </bug>

</bugzilla>