From nobody Fri Mar 03 15:20:46 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PSs9w066vz3w1vm for ; Fri, 3 Mar 2023 15:20:52 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PSs9v6bZNz3JQl; Fri, 3 Mar 2023 15:20:51 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677856851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bxjlTIuDennP5SXvonRGOmYNMdRkx2UcOJ3ap682NmU=; b=J/h7TzKLXVhrk78QNdRNFZmhKeAxqW/fCpXoATzKFUkOOEhI26AGzdYC0sJmAELdOKah3d CWkkWhWxFVdN1piGIaAJ7yBUBhX3dCfnqv7eIv37X+H5g2Pv5QTXGwztRpGtgGWwElbwas w++r7AzdLKVpn2u0LiMhlwJOOXHiXMCsqqO2YnXopUk9eiHQE3UI504pljW9ErXB2cJYAc XDUi29FVjH56kEvLDxFwCfjhp1xj68qjQkdWLRmYCFbYX4hVe4rQRcjlCBKA/h+HCCurlX l1pY32B9/0hmxe91V8jJXo/OXwt04vZNLREzU5xmMxeRDMUNkTDSgXm5p0L/Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677856851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bxjlTIuDennP5SXvonRGOmYNMdRkx2UcOJ3ap682NmU=; b=lEUPzUNUxbJy3XHOyYZe2Q3Zbj2Bksxfi4uneAX0RuKghpdeN/lQ4jYeJZ8aibXJjFqPQi B8RMLtHQ9x2ND1JQgQUCuPuNP9CDCmuD2WNdFsJXSTGFwKmOcGU9Cs2hAzNXdIWE5IlpXh SUOC5Z5UkOVPaGs1afJ9USsmx3hFVHf2Cpjv0JvSUDlPY4AZQySKRPoHzhfpGlo5RqeEiq QyTu+ot860i1DIA2WBdBwiBTQJ/z8JyPc7MBLTxvqoM9fex6/Nc/GLH9XA9oVeGwzYQ0M3 bR4WSwq34RK3lLKJ59TUCDrcbIrK+ShtVXhZZjFz4yX/Nw317pi3pYrfN0EACw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677856851; a=rsa-sha256; cv=none; b=Ax/zMP+XqsJhj0F+/3yWJ3rcLuDFGiNh+4TKYnLolADD2nVevrbuPRyPkFd2JC2ajdAuLx jmPg3BwOxwzj1U5M9HaiT03TQZ0/G2tnI6elcgyoBN9WjaPjxeGaY/4KXzsuk90sGuSx8B Mu9yRrP3C1mt5PrIdsaQfDWwMoGCTSEYJn2fuqoxmJAwKl5QaE8lFB32g4oEIgeCKrlAMc fO9iuhspm/7MPP3MhV0rr+vjLQPHLtgD/m0CJUpUuQfKj8bWiuJy1sc6u4EMv9uLg/JTxK lAznupVK9F88FXylT8FnUBoO76/KPZ1SqLqEm9FuH3ugvPPI3pmtg+cBEw/g1g== Received: by freefall.freebsd.org (Postfix, from userid 1354) id B95D310AFF; Fri, 3 Mar 2023 15:20:51 +0000 (UTC) From: Jan Beich To: Odhiambo Washington Cc: questions Subject: Re: ld: error: unable to find library -lstdc++ In-Reply-To: (Odhiambo Washington's message of "Fri, 3 Mar 2023 12:55:43 +0300") References: Date: Fri, 03 Mar 2023 16:20:46 +0100 Message-ID: <8rgd-dfox-wny@FreeBSD.org> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain X-ThisMailContainsUnwantedMimeParts: N Odhiambo Washington writes: > Hi, > FreeBSD-13.1-RELEASE here. > > I am installing Xapian within a virtual environment and I am getting stuck > > It might help to mention that I am using the script at: > https://github.com/notanumber/xapian-haystack/blob/master/install_xapian.sh -lstdc++ is part of lang/gcc* but FreeBSD >= 10 ships Clang with -lc++ instead. C++ compiler automatically adds -lstdc++ or -lc++ unless -nostdlib or -nostdlib++. Modern Clang converts -lstdc++ into -lc++ unless -nostdlib or -nostdlib++. xapian-bindings uses libtool which adds -nostdlib and uses autoconf to detect GCC which includes Clang due to __GNUC__ defined for compatibility. Why not use ports/packages where this is already solved? From databases/py-xapian/Makefile post-patch: @${REINPLACE_CMD} -e 's|-lstdc++||g' ${WRKSRC}/configure Alternatively, replace -lstdc++ with -lc++ in Clang via environ(7) $ export CCC_OVERRIDE_OPTIONS='# s/stdc\+\+/c++/' # sh(1) style $ setenv CCC_OVERRIDE_OPTIONS '# s/stdc\+\+/c++/' # csh(1) style