<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 5/2/11 2:40 PM, Manish Gupta wrote:
    <blockquote
      cite="mid:BANLkTinY6MgHS8uQXMXToHGNK3dRxn40uA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      Hi all
      <div>I am trying hello pass in llvm. I have compiled and could
        generate LLVMHello.so but while giving the pass using opt i am
        getting below mentioned error.</div>
      <div><br>
      </div>
      <div>
        <div>Command used:  <b>opt-2.8 -load
            ../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so
            -hello < hello.bc</b></div>
        <div><br>
        </div>
        <div>Error opening
          '../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so':
          ../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so:
          undefined symbol:
          _ZN4llvm12PassRegistry12registerPassERKNS_8PassInfoEb</div>
        <div>  -load request ignored.</div>
        <div>opt-2.8: Unknown command line argument '-hello'.  Try:
          'opt-2.8 -help'</div>
      </div>
    </blockquote>
    <br>
    From the looks of it, you are using a version of opt from LLVM 2.8
    to run a pass compiled as part of LLVM 2.9.  Is this correct?<br>
    <br>
    Since LLVM's internal API changes from release to release, you
    cannot use older passes with newer versions of LLVM (or
    vice-versa).  If you are using LLVM 2.8, then your pass must be
    compiled using the LLVM 2.8 source code.  If you are using LLVM 2.9,
    your pass must be compiled using the LLVM 2.9 source code.<br>
    <br>
    -- John T.<br>
    <br>
    <blockquote
      cite="mid:BANLkTinY6MgHS8uQXMXToHGNK3dRxn40uA@mail.gmail.com"
      type="cite">
      <div><br>
      </div>
      <div><br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>