linking to linux shared libraries
<p>I am trying to install opendkim on amazon linux ec2 instance. When compiling from source I get:
configure: error: no strlcpy/strlcat found
so I installed libbsd from source. once that is installed I can go to the man page of strlcat and strlcpy but I can't access those functions. I verified that the shared libraries are installed. The output of the libbsd install stated to use one of the 4 options:</p>

<pre><code>If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following:

  - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'
</code></pre>

<p>I ran </p>

<pre><code>export LD_RUN_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/lib/
</code></pre>

<p>Additionally my /etc/ld.so.conf contains</p>

<pre><code> include ld.so.conf.d/*.conf
</code></pre>

<p>and my /etc/ld.so.conf.d/libbsd.conf contains</p>

<pre><code>/usr/local/lib/libbsd
</code></pre>

<p>Lastly checking my libbsd library nm -D /usr/local/lib/libbsd.so contains:</p>

<pre><code>000000000000de30 T strlcat
000000000000ded0 T strlcpy
</code></pre>

<p>So my questions how do I either, expose strlcat and strlcpy to the command line? Or how to I do the "use the `-Wl,-rpath -Wl,LIBDIR' linker flag" option, or in general what am i doing wrong in linking to shared libraries? Any help is appreciated. Thanks!</p>