Patrick Sathyanathan
2010-Mar-09 08:36 UTC
[LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
Thanks Bob and John for the response. I am having problems building poolalloc
with my MinGW and gcc 4.4.0 setup. Running make in the poolalloc directory
results in a bunch of "undefined reference to ..." link errors
building Release/lib/LLVMDataStructure.dll. I looked at the command line for
this link and found that there are no libraries included with "-l..."
options even though there are a bunch of library path options with
"-L...". The first few errors are:
c:/llvm/llvm-2.6/poolalloc/lib/DSA/Release/Basic.o:Basic.cpp:(.text+0x96):
undefined reference to `llvm::PassInfo::registerPass()'
c:/llvm/llvm-2.6/poolalloc/lib/DSA/Release/Basic.o:Basic.cpp:(.text+0xde):
undefined reference to `llvm::TargetData::ID'
c:/llvm/llvm-2.6/poolalloc/lib/DSA/Release/Basic.o:Basic.cpp:(.text+0xe3):
undefined reference to `llvm::Pass::lookupPassInfo(int)'
c:/llvm/llvm-2.6/poolalloc/lib/DSA/Release/Basic.o:Basic.cpp:(.text+0x11a):
undefined reference to `llvm::Type::getInt8Ty(llvm::LLVMContext&)'
c:/llvm/llvm-2.6/poolalloc/lib/DSA/Release/Basic.o:Basic.cpp:(.text+0x12a):
undefined reference to `llvm::PointerType::get(llvm::Type const*, unsigned
int)'
After trying to understand Makefile.rules in the llvm directory I tried using
"make LOADABLE_MODULE=1" and this time the command line includes:
-lffi -lpsapi -limagehlp -lm
but I still get the undefined references. It looks like the correct
"-l..." option is not being generated. I'm guessing this is as you
(John) think a configure problem, but being currently a Windows developer I just
don't know enough about it to debug.
I am only interested in LLVM because of DSA which I learned about from the
Lattner et. al PLDI paper. It would be nice if I could get this to work. Any
help would be appreciated.
Thanks,
--Patrick
> Date: Mon, 8 Mar 2010 09:10:16 -0600
> From: criswell at uiuc.edu
> To: wpats at hotmail.com
> CC: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] How do I download the "poolalloc" module ?
>
> Bob Wilson wrote:
> > On Mar 6, 2010, at 7:26 AM, Patrick Sathyanathan wrote:
> >
> >
> >> Hi,
> >>
> >> I'm interested in using the "Data Structure
Analysis" that is apparently in the "poolalloc" module according
to the documentation on alias analysis in LLVM. I have downloaded and built LLVM
2.6 on MinGW but the sources do not seem to include anything related to pool
allocation. I don't think MinGW includes svn. Is there an download location
where I can get the module ?
> >>
> >
> > Hi Patrick,
> >
> > John Criswell just sent the following yesterday. Since you've got
llvm 2.6, you'll want to get poolalloc from the new branch.
> >
>
> To add to this, DSA is in the poolalloc project as Bob states above. We
> regularly use DSA on Mac OS X and Linux, but I don't know if it will
> work on Cygwin. Chances are good that any problem you encounter will be
> something that can be fixed using autoconf (i.e., it will be API
> differences between Cygwin and Mac OS/Linux that will be easy to fix).
>
> So, if you can't get DSA compiled for some reason, please email the
list
> or file a bug report. Having DSA working on more platforms would be nice.
>
> -- John T.
>
> > Begin forwarded message:
> >
> >
> >> Dear SAFECoders and LLVMers,
> >>
> >> There is some new work on moving DSA to the new LLVM 2.7 API. I am
> >> hoping to do something similar for SAFECode once the code freeze
occurs.
> >>
> >> To keep things running smoothly, there are now release_26 branches
for
> >> the poolalloc and safecode projects. If you are using SAFECode,
> >> Poolalloc, or DSA with LLVM 2.6, you will want to switch to these
branches.
> >>
> >> To get poolalloc and safecode out of these branches, use the
following
> >> SVN commands:
> >>
> >> svn co
http://llvm.org/svn/llvm-project/poolalloc/branches/release_26
> >> poolalloc
> >> svn co
http://llvm.org/svn/llvm-project/safecode/branches/release_26
> >> safecode
> >>
> >>
> >> If you have any questions or problems compiling poolalloc or
SAFECode,
> >> please email llvmdev or svadev, respectively.
> >>
> >> -- John T.
> >>
> >
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20100309/22e57a65/attachment.html>
John Criswell
2010-Mar-09 16:33 UTC
[LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
Anton Korobeynikov wrote:>> Thanks Bob and John for the response. I am having problems building >> poolalloc with my MinGW and gcc 4.4.0 setup. Running make in the poolalloc >> directory results in a bunch of "undefined reference to ..." link errors >> building Release/lib/LLVMDataStructure.dll. I looked at the command line for >> > Hrm... John, is poolalloc a loadable module? >Yes. I believe both static and dynamic libraries are built.> If yes, then it won't work on cygwin/mingw - no dynamic linking there, > one needs to link the stuff into opt manualy. > >That's good to know. :) Patrick, I assume you want to write some sort of LLVM pass that uses DSA. To get this to work on Cygwin/MingW, what you want to do is to write a tool that statically links in DSA and your pass(es). You can take the source code to the pa tool (poolalloc/tools/Pa) and modify it accordingly. I think this method is preferable over Anton's suggestion of linking DSA directly into opt because it prevents you from having a modified version of the LLVM tools to maintain. -- John T.
Apparently Analagous Threads
- [LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
- [LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
- [LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
- [LLVMdev] .so file creation for new passes
- [LLVMdev] .so file creation for new passes