Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2011 12:04:01 +0400
From:      Pan Tsu <inyaoo@gmail.com>
To:        Ivan Klymenko <fidaj@ukr.net>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: libdispatch-174 is marked as broken: does not link on 9.X.
Message-ID:  <867h9nf766.fsf@gmail.com>
In-Reply-To: <20110519102602.2929cd77@ukr.net> (Ivan Klymenko's message of "Thu, 19 May 2011 10:26:02 %2B0300")
References:  <20110518222045.76d9719d@ukr.net> <867h9ngo7f.fsf@gmail.com> <20110519102602.2929cd77@ukr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Ivan Klymenko <fidaj@ukr.net> writes:

> =D0=92 Thu, 19 May 2011 11:10:44 +0400
> Pan Tsu <inyaoo@gmail.com> =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
>
>> Ivan Klymenko <fidaj@ukr.net> writes:
>>=20
>> > I have the system FreeBSD 9.0-CURRENT #0 r222032 amd64
>> >
>> > Port devel/libdispatch well constructed and works, why he:
>> > libdispatch-174 is marked as broken: does not link on 9.X. ?
>> >
>> > .if ${OSVERSION} >=3D 900000 && ${ARCH} =3D=3D "amd64"
>> > BROKEN=3D         does not link on 9.X
>> > .endif
>>=20
>> Could it be because 9.x after /head@r218822 contains binutils-2.17
>> while per ports/146558 and ports/155157 only binutils-2.15 doesn't
>> exhibit linking error due to failed PIC check? See my followup in
>> ports/155157 for possible workarounds.
>>
>>   http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9.20110411061=
440/libdispatch-174.log
>
> Oh yeah - I forgot to add that build the port with the option
> WITHOUT_CLANG=3Dyes
> Maybe it makes sense to make the option WITHOUT_CLANG =3D yes by default?

Why if it's easy to fix CLANG option? See below


--=-=-=
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <inyaoo@gmail.com>
Received: from localhost ([188.72.240.143])
	by mx.google.com with ESMTPS id d25sm1384480bkd.5.2011.05.18.22.39.12
	(version=SSLv3 cipher=OTHER); Wed, 18 May 2011 22:39:14 -0700 (PDT)
From: Pan Tsu <inyaoo@gmail.com>
To: Danilo Egea Gondolfo <daniloegea@yahoo.com.br>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/155157: devel/libdispatch don't build with clang on
	8.2-RELEASE amd64
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix)
Date: Thu, 19 May 2011 09:39:10 +0400
Message-ID: <86vcx7i70h.fsf@gmail.com>
Lines: 58
Xref: foo.local mail.pan:3446
MIME-Version: 1.0
Content-Type: text/plain

This is a common linking error due to Clang excessive warnings and
affects many ports. Here is the excerpt

   if (exit $ac_status) && test -s "$ac_outfile"; then
     # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings other than the usual output.
     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
       lt_cv_prog_compiler_pic_works=yes
     fi
   fi

Which can be worked around by either -Qunused-arguments in CFLAGS or
lt_cv_prog_compiler_pic_works=yes in CONFIGURE_ENV or below patch(es)

--- a.diff begins here ---
Index: devel/libdispatch/files/patch-clang
===================================================================
RCS file: devel/libdispatch/files/patch-clang
diff -N devel/libdispatch/files/patch-clang
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ devel/libdispatch/files/patch-clang	19 May 2011 05:23:51 -0000
@@ -0,0 +1,14 @@
+--- configure~
++++ configure
+@@ -9396,9 +9396,10 @@ else
+    echo "$as_me:9396: \$? = $ac_status" >&5
+    if (exit $ac_status) && test -s "$ac_outfile"; then
+      # The compiler can only warn and ignore the option if not recognized
++     # except for clang warnings about unused arguments.
+      # So say no if there are warnings other than the usual output.
+      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
++     $SED '/argument unused/d; /^$/d; /^ *+/d' conftest.err >conftest.er2
+      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+        lt_cv_prog_compiler_pic_works=yes
+      fi
--- a.diff ends here ---

--- b.diff begins here ---
Index: Mk/bsd.port.mk
===================================================================
RCS file: /a/.cvsup/ports/Mk/bsd.port.mk,v
retrieving revision 1.682
diff -u -p -r1.682 bsd.port.mk
--- Mk/bsd.port.mk	6 May 2011 06:20:12 -0000	1.682
+++ Mk/bsd.port.mk	19 May 2011 05:28:07 -0000
@@ -3021,7 +3028,7 @@ CONFIGURE_MAX_CMD_LEN!=	${SYSCTL} -n ker
 .endif
 GNU_CONFIGURE_PREFIX?=	${PREFIX}
 CONFIGURE_ARGS+=	--prefix=${GNU_CONFIGURE_PREFIX} $${_LATE_CONFIGURE_ARGS}
-CONFIGURE_ENV+=		lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN}
+CONFIGURE_ENV+=		lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} lt_cv_prog_compiler_pic_works=yes
 HAS_CONFIGURE=		yes
 
 SET_LATE_CONFIGURE_ARGS= \
--- b.diff ends here ---

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?867h9nf766.fsf>