<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 8: Compiling with "-static" fails trying to link RPC functions</title><link href="https://sourceforge.net/p/lmbench/bugs/8/" rel="alternate"/><link href="https://sourceforge.net/p/lmbench/bugs/8/feed.atom" rel="self"/><id>https://sourceforge.net/p/lmbench/bugs/8/</id><updated>2013-05-07T16:23:49.068000Z</updated><subtitle>Recent changes to 8: Compiling with "-static" fails trying to link RPC functions</subtitle><entry><title>#8 Compiling with "-static" fails trying to link RPC functions</title><link href="https://sourceforge.net/p/lmbench/bugs/8/?limit=25#9d85" rel="alternate"/><published>2013-05-07T16:23:49.068000Z</published><updated>2013-05-07T16:23:49.068000Z</updated><author><name>Zibri</name><uri>https://sourceforge.net/u/zibri2/</uri></author><id>https://sourceforge.netb0592297ad8bf903fcc4f5f95d97538e276d31ad</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I solved with: LDFLAGS=-ltirpc&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Compiling with "-static" fails trying to link RPC functions</title><link href="https://sourceforge.net/p/lmbench/bugs/8/" rel="alternate"/><published>2013-02-05T21:56:01Z</published><updated>2013-02-05T21:56:01Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net1c30e8b8ba7d6cc699a6952697eff0c87d848b65</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;On some current Linux (Ubuntu and Gentoo) based systems I've tried making the binaries with LDFLAGS=-static and I get errors about missing pmap_* functions (set, unset, etc).  So far the only solution I've had is to remove those from the Makefile as I don't really care about RPC related test results.  Initially I thought adding "-lrpc" might fix it, but apparently that isn't valid or required.  I do see two identical sections in bench.h that are both including rpc/pmap_clnt.h for some reason.  Below is the command and error I see.  Doesn't matter if 32 bit (i686), 64 bit (x64), or arm (armv7l) based system.  Using gcc 4.5.x and 4.7.x on different systems.&lt;/p&gt;
&lt;p&gt;gcc -O -DRUSAGE -DHAVE_uint=1 -DHAVE_int64_t=1 -DHAVE_pmap_clnt_h -DHAVE_socklen_t -DHAVE_DRAND48 -DHAVE_SCHED_SETAFFINITY=1  -static -o ../bin/i686-pc-linux-gnu/lat_select lat_select.c ../bin/i686-pc-linux-gnu/lmbench.a -lm&lt;br /&gt;
lat_select.c: In function ‘server’:&lt;br /&gt;
lat_select.c:134:8: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]&lt;br /&gt;
../bin/i686-pc-linux-gnu/lmbench.a(lib_tcp.o): In function `tcp_connect':&lt;br /&gt;
lib_tcp.c:(.text+0x21b): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking&lt;br /&gt;
../bin/i686-pc-linux-gnu/lmbench.a(lib_tcp.o): In function `tcp_done':&lt;br /&gt;
lib_tcp.c:(.text+0x17): undefined reference to `pmap_unset'&lt;br /&gt;
../bin/i686-pc-linux-gnu/lmbench.a(lib_tcp.o): In function `tcp_connect':&lt;br /&gt;
lib_tcp.c:(.text+0x2b1): undefined reference to `pmap_getport'&lt;br /&gt;
../bin/i686-pc-linux-gnu/lmbench.a(lib_tcp.o): In function `tcp_server':&lt;br /&gt;
lib_tcp.c:(.text+0x5b9): undefined reference to `pmap_unset'&lt;br /&gt;
lib_tcp.c:(.text+0x5e2): undefined reference to `pmap_set'&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>