From owner-freebsd-current@FreeBSD.ORG Tue Sep 10 20:48:27 2013 Return-Path: Delivered-To: freebsd-current@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 ESMTP id A4EAF6D; Tue, 10 Sep 2013 20:48:27 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CCC8E2A96; Tue, 10 Sep 2013 20:48:26 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id eh20so6660245lab.18 for ; Tue, 10 Sep 2013 13:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=9SV1tKcnjNhQswR0q1iLJlkEt4IkhNsWedtFnnJHb5I=; b=WpKEd2UleDlbQ6TAFgiWBm4VSAmfWGU9PVFBjekILcmzVrJxYlmE5BRzDBMRSQlePa HTs7BTnvMqRiZvT0OBjU27Lvi5IUfU2xWCF/57HXkfncbV5VtARb3UPDWH9aJVFrJGHk n4+ypvydt2HR/af58sOgB42XVP5Kmd4QqcQ09a8u4I9TYMLIdQs5eL81oStzui/rX4gP 4KLMtFV+MUUsVq1IBk7CWCNUFc7wNkyfWx48aPrkEgEXgIbsP9BFTHKWY4BZUNz0CeVm PRwvnGNghhwZjd5RJZ71SeEqURLqSByX0hxoxO3Z6q2zjP1LjyQtbH45uxUi0b9fKlPT EsEQ== MIME-Version: 1.0 X-Received: by 10.152.228.130 with SMTP id si2mr3231710lac.32.1378846104715; Tue, 10 Sep 2013 13:48:24 -0700 (PDT) Sender: uspoerlein@gmail.com Received: by 10.112.100.231 with HTTP; Tue, 10 Sep 2013 13:48:24 -0700 (PDT) In-Reply-To: References: <23F19F73-738E-4490-BAE3-590C32FC141C@FreeBSD.org> <20130909132758.GK9030@acme.spoerlein.net> Date: Tue, 10 Sep 2013 22:48:24 +0200 X-Google-Sender-Auth: X3CzajrqyyCWacPgzNiH1OBu0WU Message-ID: Subject: Re: HEADS UP: No gcc by default in -HEAD on platforms where clang is cc From: =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= To: David Chisnall , gabor@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2013 20:48:27 -0000 2013/9/9 David Chisnall : > On 9 Sep 2013, at 14:27, Ulrich Sp=C3=B6rlein wrote: > >> Case in point, I only recently switched to clang in base and now the >> newsbeuter port crashes during startup (yeah, it builds fine). So all >> I'm asking for now is: how can I override a random port to be built with >> gcc (either from base or ports, I don't care). And what special >> considerations need to be done when the port uses C++. > > Setting USE_GCC=3Dany to build with any gcc, or USE_GCC=3Dyes to build wi= th a gcc from ports (they should do the same thing on a no-gcc-in-base syst= em) > > For C++ ports, can you check whether the error is from libc++ or clang, b= y first building libstdc++ from base and then setting CXXFLAGS=3D-stdlib=3D= libstdc++ and LDFLAGS=3D-stdlib=3Dlibstdc++? This will build it with libst= dc++ and if that works then it narrows the issue down. > > Also, don't forget to report bugs to the port maintainer... root@coyote:/usr/ports/www/newsbeuter# ldd `which newsbeuter` /usr/local/bin/newsbeuter: libthr.so.3 =3D> /lib/libthr.so.3 (0x80093f000) libiconv.so.3 =3D> /usr/lib/libiconv.so.3 (0x800b64000) libintl.so.9 =3D> /usr/local/lib/libintl.so.9 (0x800d65000) libsqlite3.so.8 =3D> /usr/local/lib/libsqlite3.so.8 (0x800f6f000) libcurl.so.7 =3D> /usr/local/lib/libcurl.so.7 (0x801250000) libxml2.so.5 =3D> /usr/local/lib/libxml2.so.5 (0x8014ab000) libstfl.so =3D> /usr/local/lib/libstfl.so (0x801825000) libjson.so.0 =3D> /usr/local/lib/libjson.so.0 (0x801a34000) libstdc++.so.6 =3D> /usr/lib/libstdc++.so.6 (0x801c3b000) libm.so.5 =3D> /lib/libm.so.5 (0x801f3b000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x802160000) libc.so.7 =3D> /lib/libc.so.7 (0x80236d000) libcrypto.so.7 =3D> /lib/libcrypto.so.7 (0x802705000) libncursesw.so.8 =3D> /lib/libncursesw.so.8 (0x802af0000) libssl.so.7 =3D> /usr/lib/libssl.so.7 (0x802d45000) libgssapi.so.10 =3D> /usr/lib/libgssapi.so.10 (0x802fae000) libz.so.6 =3D> /lib/libz.so.6 (0x8031b7000) liblzma.so.5 =3D> /usr/lib/liblzma.so.5 (0x8033cc000) So this is already linking to libstdc++ instead of libc++ (has libc++ been made the default on -CURRENT yet?) Anyway, the problem is our libiconv (of course!), as the following works: env LD_LIBRARY_PATH=3D/usr/local/lib:/usr/lib newsbeuter It'll load the ports version of libiconv first, so the problem is with libiconv in base :( Sorry for barking up the wrong tree, correlation does not imply causation, eh?) Cheers, Uli