Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Apr 2014 08:27:57 -0700 (PDT)
From:      Pedro Giffuni <pfg@freebsd.org>
To:        Baptiste Daroussin <bapt@FreeBSD.org>, David Chisnall <theraven@FreeBSD.org>
Cc:        "mexas@bris.ac.uk" <mexas@bris.ac.uk>, Boris Samorodov <bsam@passap.ru>, "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   Re: cups-client broken on ia64, blocks 70 ports, please help
Message-ID:  <1396625277.28847.YahooMailNeo@web162102.mail.bf1.yahoo.com>

next in thread | raw e-mail | index | archive | help
(I had to do some copy-pasting to get this email out due to some yahoo smtp=
 brokeness, sorry for the mess)=0A=0AOn 04/04/2014 07:56, David Chisnall wr=
ote:=0A> On 4 Apr 2014, at 13:13, Baptiste Daroussin <bapt@FreeBSD.org> wro=
te:=0A>=C2=A0=0A>> On Fri, Apr 04, 2014 at 04:08:13PM +0400, Boris Samorodo=
v wrote:=0A>>> 04.04.2014 15:49, Baptiste Daroussin =D0=BF=D0=B8=D1=88=D0=
=B5=D1=82:=0A>>>> On Fri, Apr 04, 2014 at 02:18:15PM +0400, Boris Samorodov=
 wrote:=0A>>>>> 04.04.2014 12:07, Anton Shterenlikht =D0=BF=D0=B8=D1=88=D0=
=B5=D1=82:=0A>>>>>>=0A>>>>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D1=
88161=0A>>>>>>=0A>>>>>> Compiling adminutil.c...=0A>>>>>> cc =C2=A0-Wall -W=
no-format-y2k -Wunused -fPIC -Os -g -fstack-protector -I.. -D_CUPS_SOURCE -=
I/usr/local/include -O2 -pipe =C2=A0-fno-strict-aliasing -DOPENSSL_DISABLE_=
OLD_DES_SUPPORT -D_LARGEFILE_SOURCE =C2=A0-D_THREAD_SAFE -D_REENTRANT -D_CU=
PS_NO_DEPRECATED=3D1 -D_PPD_DEPRECATED=3D"" -c -o adminutil.o adminutil.c=
=0A>>>>>> adminutil.c:1: warning: -fstack-protector not supported for this =
target=0A>>>>>> In file included from pwg-private.h:25,=0A>>>>>> =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0from cups-private.h:31,=
=0A>>>>>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fro=
m adminutil.c:33:=0A>>>>>> ../cups/cups.h:34:35: error: dispatch/dispatch.h=
: No such file or directory=0A>>>>>=0A>>>>> Hm. cups/cups.h has the followi=
ng code:=0A>>>>> -----=0A>>>>> # =C2=A0ifdef __BLOCKS__=0A>>>>> # =C2=A0 =
=C2=A0include <dispatch/dispatch.h>=0A>>>>> # =C2=A0endif /* __BLOCKS__ */=
=0A>>>>> -----=0A>>>>>=0A>>>>> It seems that the whole dispath is an Apple =
thing. How does it come=0A>>>>> about that it get used by FreeBSD? I think =
this check may be removed.=0A>>>>>=0A>>>>> Anyway please try the following =
patch (place it in to the=0A>>>>> print/cups/file directory -- mind print/c=
ups origin,=0A>>>>> not print/cups-client) and retry:=0A>>>>> ftp://ftp.war=
t.ru/pub/misc/patch-cups-cups.h=0A>>>>>=0A>>>>=0A>>>> That is on recent hea=
d, due to the import of _BLOCKS_ support but we don't have=0A>>>> libdispat=
ch=0A>>>=0A>>> Makes sense, thanks.=0A>>>=0A>>> Wait a little, I don't get =
any defines:=0A>>> -----=0A>>> % uname -a=0A>>> FreeBSD bb052.bsnet 11.0-CU=
RRENT FreeBSD 11.0-CURRENT #77 r264083: Fri=0A>>> Apr =C2=A04 00:30:01 SAMT=
 2014=0A>>> bsam@bb052.bsnet:/usr/obj/usr/src/sys/BB64X =C2=A0amd64=0A>>>=
=0A>>> % grep __BLOCKS__ -r /usr/include=0A>>> /usr/include/heimbase.h:#ifd=
ef __BLOCKS__=0A>>> /usr/include/heimbase.h:#ifdef __BLOCKS__=0A>>> /usr/in=
clude/heimbase.h:#ifdef __BLOCKS__=0A>>> /usr/include/stdlib.h:#ifdef __BLO=
CKS__=0A>>> /usr/include/stdlib.h:#ifdef __BLOCKS__=0A>>> /usr/include/stdl=
ib.h:#ifdef __BLOCKS__=0A>>> /usr/include/stdlib.h:#ifdef __BLOCKS__=0A>>> =
/usr/include/hx509-protos.h:#ifdef __BLOCKS__=0A>>> /usr/include/hx509-prot=
os.h:#endif /* __BLOCKS__ */=0A>>> /usr/include/dirent.h:#ifdef __BLOCKS__=
=0A>>> -----=0A>>>=0A>>=0A>> The compilers defines it, this is probably due=
 to using gcc on ia64,=0A>> I'm CCing Pedro and David on this as the are th=
e guilty one about __BLOCKS__=0A>> support :) and may know better=0A>=C2=A0=
=0A> $ echo | clang -dM -x c - -E | grep BLOCK=0A> $ echo | clang -fblocks =
-dM -x c - -E | grep BLOCK=0A> #define __BLOCKS__ 1=0A> $ echo | gcc =C2=A0=
-dM -x c - -E | grep BLOCK=0A> #define __BLOCKS__ 1=0A> $ echo | gcc -fno-b=
locks -dM -x c - -E | grep BLOCK=0A>=C2=A0=0A> It's an inconsistency betwee=
n base gcc and base clang: one defaults to supporting blocks, the other def=
aults to not supporting them. =C2=A0I'd like to blame Pedro, but actually I=
 think the base-system bug is that is that clang doesn't default to -fblock=
s behaviour.=0A>=C2=A0=0A=0A=0AThe policy in Apple's GCC and in FreeBSD sin=
ce r260311 is to enable blocks support by default unless std=3DC99 is set.=
=0A=0A> So, the simplest fix is simply to add -fno-blocks to the CFLAGS for=
 this port. =C2=A0Given that it has libdispatch support, however, it would =
be nice if we could have an option for using libdispatch that would (as wel=
l as passing the correct configure options and so on) add -fblocks to CFLAG=
S if building with libdispatch and -fn-blocks otherwise.=0A>=C2=A0=0A> It w=
ould also be nice to tell the cups developers that it's not particularly cl=
ever to use the existence of a compiler feature to test for the presence of=
 a library. =C2=A0They seem to have come up with an interesting spelling of=
 #ifdef __APPLE__, rather than adding a proper configure check.=0A>=0A=0A=
=0AI agree that the main issue here is that the cups developers shouldn't b=
e using language features to determine if the platform has libdispatch. Thi=
s is, however, an exciting opportunity to use libdispatch more extensively.=
=0A=0AI will be committing a small patch to make it easier to build libdisp=
atch with GCC on 11.x and 10.x.=0A=0ARegards,=0A=0APedro.
From owner-freebsd-ports@FreeBSD.ORG  Fri Apr  4 16:14:55 2014
Return-Path: <owner-freebsd-ports@FreeBSD.ORG>
Delivered-To: freebsd-ports@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id F04B8AB7
 for <freebsd-ports@FreeBSD.org>; Fri,  4 Apr 2014 16:14:54 +0000 (UTC)
Received: from forward6l.mail.yandex.net (forward6l.mail.yandex.net
 [IPv6:2a02:6b8:0:1819::6])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "forwards.mail.yandex.net",
 Issuer "Certum Level IV CA" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 81B7E198
 for <freebsd-ports@FreeBSD.org>; Fri,  4 Apr 2014 16:14:54 +0000 (UTC)
Received: from smtp12.mail.yandex.net (smtp12.mail.yandex.net [95.108.131.191])
 by forward6l.mail.yandex.net (Yandex) with ESMTP id D510214E073E;
 Fri,  4 Apr 2014 20:14:50 +0400 (MSK)
Received: from smtp12.mail.yandex.net (localhost [127.0.0.1])
 by smtp12.mail.yandex.net (Yandex) with ESMTP id 7D4C716A001D;
 Fri,  4 Apr 2014 20:14:50 +0400 (MSK)
Received: from 46.38.38.120.tel.ru (46.38.38.120.tel.ru [46.38.38.120])
 by smtp12.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id B1eQ9M5OvH-EebWADPn; 
 Fri,  4 Apr 2014 20:14:44 +0400
 (using TLSv1 with cipher AES128-SHA (128/128 bits))
 (Client certificate not present)
X-Yandex-Uniq: 9f4da188-f582-4fb1-b78e-d004a99ce48f
Message-ID: <533EDA6D.8010102@passap.ru>
Date: Fri, 04 Apr 2014 20:14:37 +0400
From: Boris Samorodov <bsam@passap.ru>
Organization: =?UTF-8?B?0JfQkNCeICLQktCQ0KDQoiI=?=
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
 rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: mexas@bris.ac.uk, FreeBSD ports list <freebsd-ports@FreeBSD.org>
Subject: Re: cups-client broken on ia64, blocks 70 ports, please help
References: <201404041242.s34CgwXu095898@mech-cluster241.men.bris.ac.uk>
In-Reply-To: <201404041242.s34CgwXu095898@mech-cluster241.men.bris.ac.uk>
X-Enigmail-Version: 1.6
Content-Type: multipart/mixed; boundary="------------010207080501030208050106"
X-BeenThere: freebsd-ports@freebsd.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Porting software to FreeBSD <freebsd-ports.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-ports>,
 <mailto:freebsd-ports-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ports/>;
List-Post: <mailto:freebsd-ports@freebsd.org>
List-Help: <mailto:freebsd-ports-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports>,
 <mailto:freebsd-ports-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 04 Apr 2014 16:14:55 -0000

This is a multi-part message in MIME format.
--------------010207080501030208050106
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

04.04.2014 16:42, Anton Shterenlikht пишет:
>>From bsam@passap.ru Fri Apr  4 11:55:13 2014
>> 04.04.2014 12:07, Anton Shterenlikht аПаИбˆаЕб‚:
>>>
>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=188161
>>>
>>> Compiling adminutil.c...
>>> cc  -Wall -Wno-format-y2k -Wunused -fPIC -Os -g -fstack-protector -I.. -D_CUPS_SOURCE -I/usr/local/include -O2 -pipe  -fno-strict-aliasing -DOPENSSL_DISABLE_OLD_DES_SUPPORT -D_LARGEFILE_SOURCE  -D_THREAD_SAFE -D_REENTRANT -D_CUPS_NO_DEPRECATED=1 -D_PPD_DEPRECATED="" -c -o adminutil.o adminutil.c
>>> adminutil.c:1: warning: -fstack-protector not supported for this target
>>> In file included from pwg-private.h:25,
>>>                  from cups-private.h:31,
>>>                  from adminutil.c:33:
>>> ../cups/cups.h:34:35: error: dispatch/dispatch.h: No such file or directory
>>
>> Hm. cups/cups.h has the following code:
>> -----
>> #  ifdef __BLOCKS__
>> #    include <dispatch/dispatch.h>
>> #  endif /* __BLOCKS__ */
>> -----
>>
>> It seems that the whole dispath is an Apple thing. How does it come
>> about that it get used by FreeBSD? I think this check may be removed.
>>
>> Anyway please try the following patch (place it in to the
>> print/cups/file directory -- mind print/cups origin,
>> not print/cups-client) and retry:
>> ftp://ftp.wart.ru/pub/misc/patch-cups-cups.h
> 
> did you mean print/cups-base/files?
> 
> If I put it under print/cups/files it makes
> no difference, but if I put the patch under
> print/cups-base/files, then cups-client and
> cups-image do build and install.
> 
> Will you commit the patch?

OK, I've got a patch that may be committed. It's just a band-aid
for now, until a better patch using clang and gcc, blocks and
libdispatch with different FreeBSD versions is created.

Anton, can you test the patch (remove the previous one from
cups-base/files)? Thank you.

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve

--------------010207080501030208050106
Content-Type: text/plain; charset=UTF-8;
 name="cups-base_add_-fno-blocks.diff.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="cups-base_add_-fno-blocks.diff.txt"

SW5kZXg6IGN1cHMtYmFzZS9NYWtlZmlsZQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBjdXBzLWJhc2Uv
TWFrZWZpbGUJKHJldmlzaW9uIDM1MDEzMykKKysrIGN1cHMtYmFzZS9NYWtlZmlsZQkod29y
a2luZyBjb3B5KQpAQCAtODIsNiArODIsNyBAQAogSU5TVEFMTF9XUktTUkM9CSR7V1JLU1JD
fS9jdXBzCiBQTElTVD0JCSR7TUFTVEVSRElSfS9wa2ctcGxpc3QuY2xpZW50CiBVU0VTKz0J
CWljb252CitDRkxBR1MrPQktZm5vLWJsb2NrcwogTERGTEFHUys9CSR7SUNPTlZfTElCfQog
VVNFX0xEQ09ORklHPQl5ZXMKIFBLR01FU1NBR0U9CSR7Tk9ORVhJU1RFTlR9Cg==
--------------010207080501030208050106--



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