[LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0

John Criswell criswell at uiuc.edu
Tue Mar 9 07:53:20 PST 2010


Patrick Sathyanathan 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 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:
Is the build failing when building the DSA library (poolalloc/lib/DSA)?  
It looks like the poolalloc build system can't find the LLVM libraries 
that it needs to use for linking.

I have a couple of questions whose answers will help verify my theory:

1) What are the pathnames to your LLVM source tree (i.e., where you put 
the LLVM source code) and your LLVM object tree (i.e., the directory in 
which you the LLVM configure script)?

2) In Makefile.common in the poolalloc object tree (the place where 
you're compiling poolalloc), what are the LLVM_SRC_ROOT and 
LLVM_OBJ_ROOT variables set to?  They should match the pathnames given 
for the LLVM source tree and LLVM object tree above.

3) Did you compile LLVM first, and if so, did you do a Debug build or a 
Release build?  The poolalloc build system assumes that LLVM was built 
as the same type of build, so if you do a Debug build of LLVM, you need 
to do a Debug build of poolalloc, too.

-- John T.
>  
> 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
> > >
> >




More information about the llvm-dev mailing list