<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 8: Compiling with "-static" fails trying to link RPC functions</title><link>https://sourceforge.net/p/lmbench/bugs/8/</link><description>Recent changes to 8: Compiling with "-static" fails trying to link RPC functions</description><atom:link href="https://sourceforge.net/p/lmbench/bugs/8/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 07 May 2013 16:23:49 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/lmbench/bugs/8/feed.rss" rel="self" type="application/rss+xml"/><item><title>#8 Compiling with "-static" fails trying to link RPC functions</title><link>https://sourceforge.net/p/lmbench/bugs/8/?limit=25#9d85</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I solved with: LDFLAGS=-ltirpc&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zibri</dc:creator><pubDate>Tue, 07 May 2013 16:23:49 -0000</pubDate><guid>https://sourceforge.netb0592297ad8bf903fcc4f5f95d97538e276d31ad</guid></item><item><title>Compiling with "-static" fails trying to link RPC functions</title><link>https://sourceforge.net/p/lmbench/bugs/8/</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 05 Feb 2013 21:56:01 -0000</pubDate><guid>https://sourceforge.net1c30e8b8ba7d6cc699a6952697eff0c87d848b65</guid></item></channel></rss>