Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jan 2017 12:29:04 -0800
From:      Johannes Lundberg <johalun0@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   Linker problems with clang /usr/local/lib
Message-ID:  <CAECmPwvq07zQ2H6wUk85=QhcbVE2Hu-vSQF3anhuStomkx7yGA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAECmPwvq07zQ2H6wUk85=QhcbVE2Hu-vSQF3anhuStomkx7yGA>