<html>
    <head>
      <base href="http://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 --- - compile error -- c"
   href="http://llvm.org/bugs/show_bug.cgi?id=19228">19228</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>compile error  -- c
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>soarpenguin@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>the code of <a href="https://github.com/soarpenguin/tsar">https://github.com/soarpenguin/tsar</a> 

for i in modules src; do make -C $i; done
gcc -I../include -Wall -fPIC -v --shared -g -O2 -Wno-strict-aliasing mod_swap.c
-o mod_swap.so
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
-cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -disable-free
-disable-llvm-verifier -main-file-name mod_swap.c -mrelocation-model pic
-pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 236.3 -v -gdwarf-2 -resource-dir
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1
-I ../include -O2 -Wall -Wno-strict-aliasing -fdebug-compilation-dir
/Users/yfzhu/cprogram/tsar/modules -ferror-limit 19 -fmessage-length 181
-stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0
-fencode-extended-block-signature -fdiagnostics-show-option -fcolor-diagnostics
-vectorize-loops -vectorize-slp -o
/var/folders/6n/hyxbqpd16lj6dxh0yn3cn3xh0000gn/T/mod_swap-eb867a.o -x c
mod_swap.c
clang -cc1 version 5.1 based upon LLVM 3.4svn default target
x86_64-apple-darwin13.1.0
#include "..." search starts here:
#include <...> search starts here:
 ../include
 /usr/local/include

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.

"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld"
-demangle -dynamic -dylib -arch x86_64 -macosx_version_min 10.9.0 -o
mod_swap.so /var/folders/6n/hyxbqpd16lj6dxh0yn3cn3xh0000gn/T/mod_swap-eb867a.o
-lSystem
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
  "_register_mod_fileds", referenced from:
      _mod_register in mod_swap-eb867a.o
  "_set_mod_record", referenced from:
      _read_vmstat_swap in mod_swap-eb867a.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [mod_swap.so] Error 1

I want to know how to fix it.</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>