From owner-freebsd-current@freebsd.org Sun Jan 22 20:29:05 2017 Return-Path: Delivered-To: freebsd-current@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 D4396CBD14E for ; Sun, 22 Jan 2017 20:29:05 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-yw0-x233.google.com (mail-yw0-x233.google.com [IPv6:2607:f8b0:4002:c05::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 9547E5ED for ; Sun, 22 Jan 2017 20:29:05 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-yw0-x233.google.com with SMTP id l19so124644358ywc.2 for ; Sun, 22 Jan 2017 12:29:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=FD01cY9slwXFSps3QFntw/t8V89YtW6CxgtyUCfo7as=; b=baqOPZ4lqj2hDsRF7GeUInZ9wuZElu15q8c/YyHoBhNI0hArnTZDT1tqRt2RaKz7LF iZigrC63ZTAIT89cxOl+GJsB41xMwV/NX60qkZZfAUZ/BLrm8EsObfgVKwkut232VYF8 vW426WMwi5MNh5verYe1SUtleCga5ZVwpocmgThMkfek+HyIP+7JITeunfXBw75o5s/a zNckyr4wbQ74XHTKwL5Gnabyk9LRp0QTgx9m7LR+23/+8E+fPQYwlKN/gQXg8V2X6ue4 D+CFceiXlx/WL31XwAd7FXGuuh5MgyH1oxE6EfS5pY7vM6H/bd7SxHmTvUNSSk8+YxKV UOWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=FD01cY9slwXFSps3QFntw/t8V89YtW6CxgtyUCfo7as=; b=ErZxJaA/81HJO21eZ2+gI0FIYYH66mjPRCD6EHbgceQnoFyoR8UEk/Ix+ptGoP80PM 5aKp3BdAYxInxjmXkP45jtW+sGJ607QXz/jkOxLG+NlcStzA1gdWyJhocodp6o15Fl05 RLY/CCiHyPDbDSZuRBs9lE2wtvnqnbuDAl4XUhDI2l8jsQ6CQbEz26mj0k9zKUFi4aE7 PLdwktn5R9TETES64qJk5O8IHvy19uh9f8LHUZ5PNWaudSRUTTGNYrojj0m9YBmyrVgF GcCYatakoYrnHg/4+oYQVM1pJjvdqEXkDxZjWGpO8oRfUvMOd75sXksYGzlr/I9cuU7N 8WKQ== X-Gm-Message-State: AIkVDXLvZn8Tnk9Y+xQFaOiW9s72MJpjcq+UJ85pUChthw9U//8BJ3ISzLajV08AqrqtTqVI0wO5gArRWAJXzQ== X-Received: by 10.129.120.85 with SMTP id t82mr22112229ywc.97.1485116944683; Sun, 22 Jan 2017 12:29:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.168.9 with HTTP; Sun, 22 Jan 2017 12:29:04 -0800 (PST) From: Johannes Lundberg Date: Sun, 22 Jan 2017 12:29:04 -0800 Message-ID: Subject: Linker problems with clang /usr/local/lib To: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 22 Jan 2017 20:29:05 -0000 Hi How can I make 'cc' (/usr/bin/ld) look for libraries in /usr/local/lib without having to specify environment or command line variables? I got "/usr/local/lib" in /etc/ld.so.conf and /var/run/ld-elf.so.hints. /sbin/ldconfig -l xxx can find library xxx in /usr/local/lib /usr/bin/ld can not. This is a problem when building Rust crates with Cargo which does not care about env variables like LDFLAGS. I can however override the linker and use 'gcc' which solves the problem but I assume it should be possible to get clang (cc) to look in /usr/local/lib as well. Anyone got any ideas?