<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="89692" data-post-id="89692">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wmnnd" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wmnnd/120/4985_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wmnnd
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh! How could I have missed this? It seems to do exactly what my wrapper script does, except for extracting to <code>./tmp</code> instead of tmpfs. Amazing!<br>
It’s also compressed, to it creates a file that is basically the same size as the one I posted.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89692" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-89692" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89692"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="89693" data-post-id="89693">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wmnnd" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wmnnd/120/4985_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wmnnd
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>If you want to try it, I’ve uploaded the Distillery-created “transient” executable of the same application here:<br>
<a href="https://vanbittern.com/files/elixir/clock.run" rel="noopener nofollow ugc">=&gt; clock.run</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89693" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-89693" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89693"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="89721" data-post-id="89721">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wmnnd" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wmnnd/120/4985_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wmnnd
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>After some more experimenting, here is a 64 bit binary that should truly run on any Linux system regardless of its libc version or other system dependencies. I’ve successfully tried it on Alpine and Ubuntu.</p>
<p><strong><a href="https://vanbittern.com/files/elixir/clock.linux_x86_64" rel="noopener nofollow ugc">=&gt; clock.linux_x86_64</a></strong> (18.2 MB)</p>
<p>Right now, this is using the OTP build from <a class="mention" href="/u/bitwalker" rel="nofollow">@bitwalker</a>’s alpine image but maybe it would be possible to do a custom build of OTP for even smaller file sizes.</p>
<p>Let me know if you have had a chance to try it and if it worked!<br>
Do you think this path should be explored further?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89721" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-89721" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89721"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="89778" data-post-id="89778">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="MartinElvar" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/MartinElvar/120/1799_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  MartinElvar
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is definitely a killer feature of go! i would personally love to see more of this, so darn cool. Good job.<br>
Consider the ease of deployment, I know it won’t feature rollbacks etc. but you don’t always need the entire bonus package.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89778" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-89778" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89778"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="89780" data-post-id="89780">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dmarko484" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dmarko484/120/22400_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dmarko484
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Tried on Ubuntu in Windows 10 (there is Linux support in W10).</p>
<p>a) clock.run - works fine, I can even run it with console etc.</p>
<p>b) clock.linux_x86_64 - fails to start<br>
$ ./clock.linux_x86_64<br>
Unpacking application to /home/dmarko/.clock-432-20681.tmp …<br>
Starting application …<br>
/home/dmarko/.clock-432-20681.tmp/clock/erts-10.0.3/bin/erlexec: 1: /home/dmarko/.clock-432-20681.tmp/clock/erts-10.0.3/bin/erlexec: Syntax error: “(” unexpected<br>
Removing unpacked application files …<br>
Application finished with status code 0</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89780" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-89780" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89780"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="89782" data-post-id="89782">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wmnnd" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wmnnd/120/4985_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wmnnd
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dmarko484" data-post="17" data-topic="15335">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dmarko484/48/22400_2.png" class="avatar"> dmarko484:</div>
<blockquote>
<p>Tried on Ubuntu in Windows 10 (there is Linux support in W10).</p>
</blockquote>
</aside>
<p>Thanks for trying this!<br>
Curious that the second app doesn’t seem to work. Could you try downloading <a href="https://vanbittern.com/files/elixir/clock.tar.gz" rel="noopener nofollow ugc">just the contents</a>, then <code>cd</code> to the <code>clock</code> directory and run <code>bin/clock</code>?<br>
If that doesn’t work, try <code>erts-10.0.3/bin/erlexec</code>.<br>
I’d be interested to see what’s going on there …</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89782" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-89782" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89782"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="89783" data-post-id="89783">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dmarko484" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dmarko484/120/22400_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dmarko484
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The same error …</p>
<p>$ ./bin/clock<br>
/home/dmarko/c/clock/erts-10.0.3/bin/erlexec: 1: /home/dmarko/c/clock/erts-10.0.3/bin/erlexec: Syntax error: “(” unexpected</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89783" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-89783" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89783"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="89784" data-post-id="89784">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dmarko484" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dmarko484/120/22400_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dmarko484
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Also tried on latest CentOS 7.5 64bit … both packages worked fine …</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89784" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-89784" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89784"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="89786" data-post-id="89786">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bitwalker" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bitwalker/120/998_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bitwalker
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Leader</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>The primary reason why this is not happening is probably just because nobody did it yet.</p>
</blockquote>
<p>There was at one point a version of the compiler (that Joe A. wrote IIRC), which would compile an Erlang application to a static binary. It was removed from the Erlang compiler quite some time ago (around R10 I think) because it was becoming unmaintainable. I suspect it is a non-trivial effort to reintroduce it (I did some experimenting to try and bring it back, but it was more than I could tackle with the time available to me).</p>
<p>Short of someone whipping up a heavily modified compiler and runtime, and getting official support for it, I don’t think we’re anywhere near golang-like static binaries. As much as I’d love that capability, I’m personally of the feeling that focusing our attention in that direction is attempting to solve the wrong problem. I certainly won’t discourage anyone from giving it a shot, but I think we have lower hanging fruit.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89786" data-batch-url="/posts/batch_likers">
                        6
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-89786" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89786"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
    <div class="postbit" id="89787" data-post-id="89787">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wmnnd" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wmnnd/120/4985_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wmnnd
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think the “package and unpack” approach we both happened to have come up with seems to be a good compromise.<br>
I have patched the binaries in <code>clock.linux_x86_64</code> so they can be run with musl linker, libc and shared libraries that I’ve also included in the package. This process could also be automated and would give us a practical way to use Elixir in places that are currently the domain of Go.<br>
Of course, it would be preferable to get a static build of ERTS but that doesn’t seem to be possible from what I gathered looking at the <code>configure</code> options, right? The bundle would still need to be temporarily unpacked somewhere but at least the linker patching step wouldn’t be necessary.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="89787" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/elixir-static-app-binaries/15335/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-89787" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="89787"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/15335/load_more?page=3">Load more posts (35 remaining)</a>
</div></template></turbo-stream>