<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-size: 14pt; font-family: Verdana,Geneva,sans-serif'>
<p>What ... gcc is at version 8? Where have I been?</p>
<p>Hmm, okay not seeing anything I can fix in the distribution. Seems just some configuration needs to change for building on mac.</p>
<p>On 2018-11-25 11:36, Damian Gryski wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Yes, I had to change the call to libtoolize to glibtoolize so it picked up the version installed by brew and not Apple's version.
<div> </div>
<div>Next, I needed to pass CXX=g++-8 so it used the gcc installed by brew and not Apple's version of llvm.</div>
<div> </div>
<div>Finally, I needed to also build colm from git and not use the latest release tarball 0.13.0.6.</div>
<div> </div>
<div>Damian</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<div class="gmail_quote">
<div dir="ltr">On Sun, Nov 25, 2018 at 5:18 AM Adrian Thurston <<a href="mailto:thurston@colm.net">thurston@colm.net</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><span style="text-decoration: underline;"></span>
<div style="font-size: 14pt; font-family: Verdana,Geneva,sans-serif;">
<p>Just added the assignment to _ to master.</p>
<p>Thank you for the fix.</p>
<p>Still having problems building master?</p>
<p>On 2018-11-01 10:12, Damian Gryski wrote:</p>
<blockquote style="padding-left: 5px; border-left: #1010ff 2px solid; margin-left: 5px;">
<div dir="auto">
<div style="font-family: sans-serif; font-size: 12.8px;" dir="auto">
<div style="margin: 16px 0px;">
<div>
<div dir="auto">
<div style="font-size: 12.8px;" dir="auto">
<div style="margin: 16px 0px;">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>This is with ragel 7.0.0.11 and colm 0.13.0.6.  I was unable to get ragel to build from git.</div>
<div dir="ltr"> </div>
<div dir="ltr">With the example grammar at <a style="text-decoration-line: none; color: #4285f4;" href="http://github.com/dgryski/ragel-examples/regexp1">github.com/dgryski/ragel-examples/regexp1</a>, I get the following error:</div>
<div dir="ltr"> </div>
<div dir="ltr">
<div dir="ltr">$ ragel-go sshd.rl</div>
<div dir="ltr">$ go build</div>
<div dir="ltr"># <a style="text-decoration-line: none; color: #4285f4;" href="http://github.com/dgryski/ragel-examples/regexp1">github.com/dgryski/ragel-examples/regexp1</a></div>
<div dir="ltr">./sshd.go:11:6: _scanner_trans_cond_spaces declared and not used</div>
<div dir="ltr">./sshd.go:12:6: _scanner_trans_offsets declared and not used</div>
<div dir="ltr">./sshd.go:13:6: _scanner_trans_lengths declared and not used</div>
<div dir="ltr">./sshd.go:14:6: _scanner_cond_keys declared and not used</div>
<div dir="ltr">./sshd.go:17:6: _scanner_eof_cond_spaces declared and not used</div>
<div dir="ltr">./sshd.go:18:6: _scanner_eof_cond_key_offs declared and not used</div>
<div dir="ltr">./sshd.go:19:6: _scanner_eof_cond_key_lens declared and not used</div>
<div dir="ltr">./sshd.go:20:6: _scanner_eof_cond_keys declared and not used</div>
<div dir="ltr">./sshd.go:21:6: _scanner_nfa_targs declared and not used</div>
<div dir="ltr">./sshd.go:22:6: _scanner_nfa_offsets declared and not used</div>
<div dir="ltr">./sshd.go:22:6: too many errors</div>
<div dir="ltr"> </div>
<div dir="ltr">The usual solution to this in autogenerated code is to assign them to `_`, the underscore "blank variable".  This satisfies the compiler and the entire array will be eliminated as a dead-store if it ends up not being used.</div>
<div> </div>
<div>Thus, each declaration for variables which may or may not be used will look like:</div>
<div>var _scanner_trans_cond_spaces [] int8  = [] int8  { ... }</div>
<div>_ = _scanner_trans_cond_space</div>
<div> </div>
<div>Note also the first `[] int8` is redundant -- the compiler will infer the type from the type of the array on the right hand side of the `=`.</div>
<div dir="auto"> </div>
<div dir="auto">Fixing these issues in the Go template in the src/host-go directory and rebuilding fixed these errors (although I had to copy files from the git checkout for the template changes to recompile successfully).</div>
<div style="color: #888888;">
<div dir="auto"> </div>
<div dir="auto">Damian</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<pre>_______________________________________________
ragel-users mailing list
<a href="mailto:ragel-users@colm.net">ragel-users@colm.net</a>
<a href="http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users">http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users</a>
</pre>
</blockquote>
</div>
_______________________________________________<br /> ragel-users mailing list<br /> <a href="mailto:ragel-users@colm.net">ragel-users@colm.net</a><br /> <a href="http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users">http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users</a></blockquote>
</div>
<br />
<pre>_______________________________________________
ragel-users mailing list
<a href="mailto:ragel-users@colm.net">ragel-users@colm.net</a>
<a href="http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users">http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users</a>
</pre>
</blockquote>
</body></html>