From owner-freebsd-ports-bugs@FreeBSD.ORG Mon May 12 13:50:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1762B4E for ; Mon, 12 May 2014 13:50:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6F1527A0 for ; Mon, 12 May 2014 13:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CDo1qq036250 for ; Mon, 12 May 2014 13:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4CDo1xY036249; Mon, 12 May 2014 13:50:01 GMT (envelope-from gnats) Resent-Date: Mon, 12 May 2014 13:50:01 GMT Resent-Message-Id: <201405121350.s4CDo1xY036249@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 183F5B03 for ; Mon, 12 May 2014 13:46:55 +0000 (UTC) Received: from zimbra.skylable.com (zimbra.skylable.com [5.35.252.9]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7E52780 for ; Mon, 12 May 2014 13:46:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.skylable.com (Postfix) with ESMTP id E188BBE87BE for ; Mon, 12 May 2014 15:46:52 +0200 (CEST) Received: from zimbra.skylable.com ([127.0.0.1]) by localhost (zimbra.skylable.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id eSvtlU9ykCNh for ; Mon, 12 May 2014 15:46:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.skylable.com (Postfix) with ESMTP id 5C012BE87BF for ; Mon, 12 May 2014 15:46:52 +0200 (CEST) Received: from zimbra.skylable.com ([127.0.0.1]) by localhost (zimbra.skylable.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PyWr4yjsI13G for ; Mon, 12 May 2014 15:46:52 +0200 (CEST) Received: from [172.30.42.12] (unknown [86.125.253.61]) by zimbra.skylable.com (Postfix) with ESMTPSA id 2F56DBE87BE for ; Mon, 12 May 2014 15:46:52 +0200 (CEST) Message-Id: <5370D0CB.3060704@skylable.com> Date: Mon, 12 May 2014 16:46:51 +0300 From: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= To: FreeBSD-gnats-submit@freebsd.org Subject: ports/189710: ocamlbuild doesn't handle SIGPIPE X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 13:50:02 -0000 >Number: 189710 >Category: ports >Synopsis: ocamlbuild doesn't handle SIGPIPE >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 12 13:50:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: edwin >Release: FreeBSD 10.0-RELEASE amd64 >Organization: >Environment: System: FreeBSD freebsd10.home.lan 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: If ocamlfind prints a warning during build then ocamlbuild fails like this: /usr/local/bin/ocamlfind ocamlc -where > /usr/ports/devel/ocaml-pcre/work/pcre-ocaml-7.0.4/_build/ocamlc.where Command got signal -8. If I run the ocamlfind command manually it works, but it prints a warning too: ocamlfind: [WARNING] Cannot read directory /usr/ports/devel/ocaml-pcre/work/stage/usr/local/lib/ocaml/site-lib/pcre which is mentioned in ld.conf That warnings causes a SIGPIPE in ocamlbuild or somewhere, which causes the signal -8 message to be printed: You can use 'truss -f make' to confirm: 75895: write(2,"ocamlfind: [WARNING] Cannot read"...,146) ERR#32 'Broken pipe' 75895: SIGNAL 13 (SIGPIPE) 75895: process exit, rval = 0 75889: wait4(75895,{ SIGNALED,sig=SIGPIPE },0x0,0x0) = 75895 (0x12877) 75889: write(1,"\r\^[[K",4) = 4 (0x4) + ocamlfind ocamlc -where > /usr/ports/textproc/ocaml-text/work/ocaml-text-0.6/_build/ocamlc.where 75889: write(1,"+ ocamlfind ocamlc -where > /usr"...,103) = 103 (0x67) 75889: close(4) = 0 (0x0) 75889: write(3,"+ ocamlfind ocamlc -where > /usr"...,150) = 150 (0x96) 75889: close(3) = 0 (0x0) 75889: gettimeofday({1399897227.200087 },0x0) = 0 (0x0) Command got signal -8. This is not related to a particular OCaml package, I got this on ocaml-pcre or ocaml-text, but others have encountered this issue elsewhere: https://bugzilla.skylable.com/show_bug.cgi?id=470#c3 https://github.com/the-lambda-church/merlin/issues/193 https://github.com/the-lambda-church/merlin/issues/183 I don't know if this is related to GCC or Clang (my system seems to use Clang), but this appears to be a FreeBSD-specific problem with ocamlbuild (on Linux I've never seen this error). >How-To-Repeat: Install the ocaml compiler (from source, see other PR as binary package seems to be missing): # cd /usr/ports/lang/ocaml # make install # cd /usr/ports/textproc/ocaml-text # make install [...] Oh this wants to build PCRE, but there's a binary package, ... interrupt the build! [..] ^C Install pcre binary package # pkg install pcre OK lets resume # make install [....] + /usr/local/bin/ocamlfind ocamlc -where > /usr/ports/devel/ocaml-pcre/work/pcre-ocaml-7.0.4/_build/ocamlc.where Command got signal -8. Expected behaviour: ocamlbuild should print the error message from ocamlfind's stderr, instead of dieing on SIGPIPE! >Fix: Run 'ocamlfind ocamlc -where' manually Edit /usr/local/lib/ocaml/ld.conf and remove the lines it complained about >Release-Note: >Audit-Trail: >Unformatted: