<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I think the inclusion of -pie is what was throwing my initial setup
    off.  Another (much older) toolchain I also use, I have to remove
    -pie in order to compile a completely static binary.<br>
    -Lance Fredrickson<br>
    <br>
    <div class="moz-cite-prefix">On 2/11/2014 7:32 AM, Lance Fredrickson
      wrote:<br>
    </div>
    <blockquote cite="mid:52FA3473.4040003@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Thanks for this tips, got it to work.<br>
      -Lance Fredrickson<br>
      <br>
      <div class="moz-cite-prefix">On 2/11/2014 3:25 AM, Guus Sliepen
        wrote:<br>
      </div>
      <blockquote cite="mid:20140211102532.GB24969@sliepen.org"
        type="cite">
        <pre wrap="">On Mon, Feb 10, 2014 at 02:44:57PM -0700, Lance Fredrickson wrote:

</pre>
        <blockquote type="cite">
          <pre wrap="">I'm having trouble compiling this.  I typically create a static
binary for mips devices for use in routers of different firmwares.
Typically I create static libraries on which tinc is dependent  (lzo
zlib openssl ncurses readline) . In this release, tinc doesn't see
the static libraries, just the development .h files when running
./configure.  So I compiled static and shared libraries, so it will
make it through the configure script.  Then when I compile tinc I
run

make LIBS="-static -lcrypto -ldl -llzo2 -lz"
and this typcically will give me static binaries.
</pre>
        </blockquote>
        <pre wrap="">"-static" should be in $LDFLAGS, not in $LIBS. Also, if you manually set $LIBS,
you are overriding the set of libraries that the configure script found. It
could be that that is the problem in your case (linker error messages are not
always very clear as to what the real reason for the errors are). You can replace:

$MAKE LIBS="-static -lcrypto -ldl -llzo2 -lz"
make install DESTDIR=$BASE/tinc

With one line:

$MAKE install LDFLAGS=-static DESTDIR=$BASE/tinc

</pre>
        <blockquote type="cite">
          <pre wrap="">I think maybe it's trying to static link to libc. For some reason
this release is hating anything I try to link statically.
</pre>
        </blockquote>
        <pre wrap="">It could also be that some libraries, that are normally found by the dynamic
linker at runtime, are missing when compiling statically. For example,
libreadline and libncurses normally depend on libtinfo, so when compiling
statically you have to add -ltinfo to $LIBS.

</pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
tinc mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:tinc@tinc-vpn.org">tinc@tinc-vpn.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc">http://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc</a>
</pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>