Ok that works but why on earth would I get a runtime error of: Type.cpp:132: const llvm::Type* llvm::Type::getForwardedTypeInternal() const: Assertion `ForwardType && "This type is not being forwarded to another type!"' failed. Aborted For the line of code: MyModule = new Module( std::string("IDontWork"));> -----Original Message----- > From: llvmdev-admin at cs.uiuc.edu [mailto:llvmdev-admin at cs.uiuc.edu] On > Behalf Of Reid Spencer > Sent: Tuesday, December 09, 2003 8:36 PM > To: Kevin Gibbs > Cc: llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] Linking Errors? > > You'll need to include the "support" library to resolve these > LeakDetector symbols. You can do this by either placing the path to > "support.o" or -lsupport on your link line (in your Makefile). Note > that if you use the -l option, you'll likely need to use -L<path> as > well to tell the linker where to find "libsupport.a" (file included by > the -lsupport option). > > Reid. > > Kevin Gibbs wrote: > > > Can anyone help with these crazy linking errors?? > > > > > > > > > /home/kgibbs/CS321/CVS/llvm/lib/Debug/vmcore.o(.gnu.linkonce.t._ZN4llvm12L > eakDetector16addGarbageObjectEPKNS_5ValueE+0xd): > > In function `llvm::LeakDetector::addGarbageObject(llvm::Value const*)': > > > > /usr/include/c++/3.2.1/bits/stl_pair.h:148: undefined reference to > > `llvm::LeakDetector::addGarbageObjectImpl(llvm::Value const*)' > > > > > /home/kgibbs/CS321/CVS/llvm/lib/Debug/vmcore.o(.gnu.linkonce.t._ZN4llvm12L > eakDetector19removeGarbageObjectEPKNS_5ValueE+0xd): > > In function `llvm::LeakDetector::removeGarbageObject(llvm::Value > const*)': > > > > /usr/include/c++/3.2.1/bits/stl_pair.h:148: undefined reference to > > `llvm::LeakDetector::removeGarbageObjectImpl(llvm::Value const*)' > > > > > /home/kgibbs/CS321/CVS/llvm/lib/Debug/vmcore.o(.gnu.linkonce.t._ZN4llvm12L > eakDetector15checkForGarbageERKSs+0xd): > > In function > > `llvm::LeakDetector::checkForGarbage(std::basic_string<char, > > std::char_traits<char>, std::allocator<char> > const&)': > > > > /usr/include/c++/3.2.1/bits/stl_pair.h:148: undefined reference to > > `llvm::LeakDetector::checkForGarbageImpl(std::basic_string<char, > > std::char_traits<char>, std::allocator<char> > const&)' > > > > collect2: ld returned 1 exit status > > > > > > > > Thanks, > > > > Kevin > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
Well, I'm not exactly sure, but the assertion is trying to tell you that you've coded something wrong. I 'm not completely sure but I suspect its a type conversion thing. What type is "MyModule"? If it's type is not "Module*" then a conversion is probably happing and that conversion is giving you an assertion failure. I would suggest you look at Type.cpp:132 and surrounding code to try to determine what the assertion is really trying to say. Reid. Kevin Gibbs wrote:>Ok that works but why on earth would I get a runtime error of: > >Type.cpp:132: const llvm::Type* llvm::Type::getForwardedTypeInternal() >const: Assertion `ForwardType && "This type is not being forwarded to >another type!"' failed. >Aborted > >For the line of code: > >MyModule = new Module( std::string("IDontWork")); > > > >>-----Original Message----- >>From: llvmdev-admin at cs.uiuc.edu [mailto:llvmdev-admin at cs.uiuc.edu] On >>Behalf Of Reid Spencer >>Sent: Tuesday, December 09, 2003 8:36 PM >>To: Kevin Gibbs >>Cc: llvmdev at cs.uiuc.edu >>Subject: Re: [LLVMdev] Linking Errors? >> >>You'll need to include the "support" library to resolve these >>LeakDetector symbols. You can do this by either placing the path to >>"support.o" or -lsupport on your link line (in your Makefile). Note >>that if you use the -l option, you'll likely need to use -L<path> as >>well to tell the linker where to find "libsupport.a" (file included by >>the -lsupport option). >> >>Reid. >> >>Kevin Gibbs wrote: >> >> >> >>>Can anyone help with these crazy linking errors?? >>> >>> >>> >>> >>> >>> >>/home/kgibbs/CS321/CVS/llvm/lib/Debug/vmcore.o(.gnu.linkonce.t._ZN4llvm12L >>eakDetector16addGarbageObjectEPKNS_5ValueE+0xd): >> >> >>>In function `llvm::LeakDetector::addGarbageObject(llvm::Value const*)': >>> >>>/usr/include/c++/3.2.1/bits/stl_pair.h:148: undefined reference to >>>`llvm::LeakDetector::addGarbageObjectImpl(llvm::Value const*)' >>> >>> >>> >>> >>/home/kgibbs/CS321/CVS/llvm/lib/Debug/vmcore.o(.gnu.linkonce.t._ZN4llvm12L >>eakDetector19removeGarbageObjectEPKNS_5ValueE+0xd): >> >> >>>In function `llvm::LeakDetector::removeGarbageObject(llvm::Value >>> >>> >>const*)': >> >> >>>/usr/include/c++/3.2.1/bits/stl_pair.h:148: undefined reference to >>>`llvm::LeakDetector::removeGarbageObjectImpl(llvm::Value const*)' >>> >>> >>> >>> >>/home/kgibbs/CS321/CVS/llvm/lib/Debug/vmcore.o(.gnu.linkonce.t._ZN4llvm12L >>eakDetector15checkForGarbageERKSs+0xd): >> >> >>>In function >>>`llvm::LeakDetector::checkForGarbage(std::basic_string<char, >>>std::char_traits<char>, std::allocator<char> > const&)': >>> >>>/usr/include/c++/3.2.1/bits/stl_pair.h:148: undefined reference to >>>`llvm::LeakDetector::checkForGarbageImpl(std::basic_string<char, >>>std::char_traits<char>, std::allocator<char> > const&)' >>> >>>collect2: ld returned 1 exit status >>> >>> >>> >>>Thanks, >>> >>>Kevin >>> >>> >>> >>_______________________________________________ >>LLVM Developers mailing list >>LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> > > > >
> Ok that works but why on earth would I get a runtime error of: > > Type.cpp:132: const llvm::Type* llvm::Type::getForwardedTypeInternal() > const: Assertion `ForwardType && "This type is not being forwarded to > another type!"' failed. > Aborted > > For the line of code: > > MyModule = new Module( std::string("IDontWork"));I was getting these recently when we made the switch from -fshort-enums to -fno-short-enums in the toplevel Makefile. The solution is to blow *everything* away with a "gmake clean" and rebuild -- basically, -fshort-enums and -fno-short-enums code do not mix. -- gaeke at uiuc.edu
> -----Original Message----- > From: llvmdev-admin at cs.uiuc.edu [mailto:llvmdev-admin at cs.uiuc.edu] On > Behalf Of Brian R. Gaeke > Sent: Tuesday, December 09, 2003 10:19 PM > To: Kevin Gibbs > Cc: 'Reid Spencer'; llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] Linking Errors? > > > Ok that works but why on earth would I get a runtime error of: > > > > Type.cpp:132: const llvm::Type* llvm::Type::getForwardedTypeInternal() > > const: Assertion `ForwardType && "This type is not being forwarded to > > another type!"' failed. > > Aborted > > > > For the line of code: > > > > MyModule = new Module( std::string("IDontWork")); > > I was getting these recently when we made the switch from -fshort-enums > to -fno-short-enums in the toplevel Makefile. The solution is to > blow *everything* away with a "gmake clean" and rebuild -- basically, > -fshort-enums and -fno-short-enums code do not mix.Thanks that was the problem... I guess I should heed the warnings about updating from CVS. Could not understand what had changed on me. Kevin