[LLVMdev] LLVM Hello Project generating .lo file in place of .so file.
John Criswell
criswell at cs.uiuc.edu
Wed Feb 8 07:33:19 PST 2006
Pratik Mehta wrote:
> Hello,
>
> I am trying to compile the Hello Project of the lib/Transforms/Hello
> subdirectory according to the instructions given on
> http://llvm.cs.uiuc.edu/docs/WritingAnLLVMPass.html document. I am
> using 1.6cvs source to compile LLVM. The problem is that after running
> the Make file on the project, the Debug subdirectory contains .lo file
> in place of .so file. I need the .so file to use with opt command as
> mentioned in the document (as indicated in the document). Following is
> interaction trace.
>
> [llvm]$ uname -a
> Linux hostname 2.6.14-1.1653_FC4 #1 Tue Dec 13 21:32:09 EST 2005 i686
> i686 i386 GNU/Linux
> [llvm]$ gcc --version
> gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)
> [llvm]$ cd lib/Transforms/Hello/
> [Hello]$ ls
> Hello.cpp Makefile
> [Hello]$ make
> make: Warning: File `/dev/null' has modification time 9e+03 s in the future
> llvm[0]: Compiling Hello.cpp for Debug build (PIC)
> llvm[0]: Linking Debug Shared Library LLVMHello.so
> llvm[0]: Linking Debug Object Library LLVMHello.o
> make: warning: Clock skew detected. Your build may be incomplete.
> [Hello]$ ls
> Debug Hello.cpp Makefile
> [Hello]$ cd Debug/
> [Debug]$ ls
> Hello.d Hello.lo Hello.o
>
> What could be the issue?
You're looking for the .so in the wrong directory.
The .so should be located in <objdir>/Debug/lib, where <objdir> is the
location of your LLVM object directory. All .so files are placed in
this global directory in your object code tree during the build.
<objdir>/lib/Transforms/Hello/Debug (the directory you looked at) just
contains the intermediate .o and .lo (libtool object files) used in
building the final dynamic library.
-- John T.
>
> TIA
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
--
John T. Criswell
Research Programmer
University of Illinois at Urbana-Champaign
"It's today!" said Piglet. "My favorite day," said Pooh.
More information about the llvm-dev
mailing list