<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Kaleidoscope Remote-JIT example doesn't work"
   href="https://llvm.org/bugs/show_bug.cgi?id=30417">30417</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Kaleidoscope Remote-JIT example doesn't work
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>j4_james@hotmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While I've listed the OS as Linux, I should clarify that I'm actually using the
Windows Subsystem for Linux in case that's a factor. But even if the existing
code does somehow work on a real instance of Linux, it's clear that some parts
are not quite correct.

The first problem is that when attempting to start the server, the bind call
fails. This is because the socket address is incorrectly initialised. Currently
the code looks like this:

  servAddr.sin_family = PF_INET;
  servAddr.sin_family = INADDR_ANY;

when it should really be this:

  servAddr.sin_family = AF_INET;
  servAddr.sin_addr.s_addr = INADDR_ANY;

With that fixed, the server starts, and the client can connect to it, but any
attempt to evaluate an expression will fail with the error: "Program used
external function 'printExprResult' which could not be resolved!"

That can easily be fixed with DynamicLibrary::AddSymbol call to register the
printExprResult function, but I'm not positive that is the right solution. If
it was expected that the function would somehow be accessible without explicit
registration then there may be a deeper problem (unless this is one area where
the WSL is in fact not compatible with Linux).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>