From owner-freebsd-ports@freebsd.org Fri Jun 24 08:25:40 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57FDBA77BFE for ; Fri, 24 Jun 2016 08:25:40 +0000 (UTC) (envelope-from elferdo@gmail.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15B611C44 for ; Fri, 24 Jun 2016 08:25:40 +0000 (UTC) (envelope-from elferdo@gmail.com) Received: by mail-io0-x233.google.com with SMTP id g13so86619400ioj.1 for ; Fri, 24 Jun 2016 01:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=SaQ1b1oFx04lwbRNvIITldI+9+ep62ZmzftENvux0h4=; b=O4PZsPYAM5q/34vMlxXh1xqtbLOuSxi3tsDUJzTqC8R0MIIRPMPpyqSbBl4u1MmsNN WQ/X6O3f0ClTXwucMp1qfJlQVUHhS1AB4FTVMH4Yg9mXK1oQP/ZXo7B8HFUGfJcGxfLK 9rc0Lhqwe5q0TTTMguDNJMf/w3LCVoXR8/Fja7/7OWXcQoFXWauPaYUHNU/j8D7R3Bxx 7STzY2WJIGFS5EBrfWUsjQnjzb96Tgs6SRipOrDrMjcIMrUD/LO09lvyCV836EVd1t5o c8mmleUVDMP5wfGGqTG5Y12ifpNmbPnBcxdiCPnzvSdfCQwzXIuGxBiGAhh3lZ271+2Y vHvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=SaQ1b1oFx04lwbRNvIITldI+9+ep62ZmzftENvux0h4=; b=cMZDk8SaGzWInhuY2fSutKk3+IoYWFMpfcVPGbhjXL2Bn4qf8A4QbHnvUv7epsmBBb 8i7ZlNHdti6odWWqTPcQ0z1FXLjoZgplfyDXVc4dtgwgIeda8WdRCcoKBBpJ9PH/+5Ys BjCpTZrpq81tFtED+9GwhvM8P3PDmvUpBxUeilzi5nOKbm+0DaAmAgy40azMSljM3qlR ECnOfHjjd+v+G2WkCEYT+p+fZSs9/UcNuHdrLULL3KxhiFD0VdCA6AQ59nC1K25OhSEx L3KoZizxqAmIkm3FmNssWh34Ta+zJRXqBmC4x3FuJGSVTTlCGhBqOZwHeQTdqsxjVzq4 GgFw== X-Gm-Message-State: ALyK8tK/WXKD+MoQSGDy5IEkD/phTPhgAspEi9F4Kb9Z7rcj7SVSxoK77pQsLT5dr2zbF39rrMMflP/aGYKHGA== MIME-Version: 1.0 X-Received: by 10.107.9.78 with SMTP id j75mr4451631ioi.33.1466756739536; Fri, 24 Jun 2016 01:25:39 -0700 (PDT) Received: by 10.36.95.17 with HTTP; Fri, 24 Jun 2016 01:25:39 -0700 (PDT) Received: by 10.36.95.17 with HTTP; Fri, 24 Jun 2016 01:25:39 -0700 (PDT) In-Reply-To: References: Date: Fri, 24 Jun 2016 10:25:39 +0200 Message-ID: Subject: Re: QA script error (libc++) From: =?UTF-8?Q?Fernando_Herrero_Carr=C3=B3n?= To: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Cc: FreeBSD Mailing List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2016 08:25:40 -0000 El 24 jun. 2016 8:16 a. m., "Fernando Apestegu=C3=ADa" < fernando.apesteguia@gmail.com> escribi=C3=B3: > > One of my ports is written in C++. It links agains libc++ that is in > base (/usr/src/contrib/libc++). The port still builds fine and works > but the QA scripts show an error complaining about the executable > being linked to libc++ without the library being listed as an actual > dependency and it suggests to add the following line to the Makefile: > > LIB_DEPENDS+=3Dlibc++.so:devel/libc++ > > Is this strictly necessary? Would something like this be acceptable?: > > .if !exists(/usr/lib/libc++.so) > ... > LIB_DEPENDS+=3Dlibc++.so:devel/libc++ > ... > .endif > > Note: the port does not compile on FreeBSD < 10.x > > Thanks in advance. Dear Fernando, I would say adding a dependency on libc++ from ports is not necessary. On a standard system you can pass the compiler an option like -stdlib=3Dlibc++ a= nd it works. This library is usually linked against when compiling with c++11 or newer. Maybe adding the appropriate compiler option [1] would be a better choice? Cheers, Fernando [1] https://www.freebsd.org/doc/en/books/porters-handbook/uses-compiler.htm= l