[LLVMbugs] [Bug 19228] New: compile error -- c

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 22 08:33:15 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19228

            Bug ID: 19228
           Summary: compile error  -- c
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: soarpenguin at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

the code of https://github.com/soarpenguin/tsar 

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140322/7715d6de/attachment.html>


More information about the llvm-bugs mailing list