[LLVMdev] Make error of latest devel version of llvm and clang

Cristianno Martins cristiannomartins at gmail.com
Fri Apr 13 05:12:32 PDT 2012


Hi Jiao,

Well, I didn't try to compile with RTTI, but I had some time ago a very
similar problem while linking the opt. In my case, I was not being able to
create the shared library when enable-shared were passed through the
configure script. I just had to realize that my default compiler was not
being able to generate the binaries, probably because of its version (it
was the stable llvm-gcc 4.1). Therefore, if I had compiled the llvm+clang
from svn without the enable-shared flag, and installed it in some temp
folder (configured in the PATH), I could use this one to configure and
recompile the source with the flag enabled without this linkage error. I
guess you could give it a try.

I hope this work to you too.

--
Cristianno Martins
PhD Student of Computer Science
University of Campinas
cmartins at ic.unicamp.br
 <cristiannomartins at hotmail.com>


On Thu, Apr 12, 2012 at 10:38 PM, Jiao Xianjun <putaoshu at gmail.com> wrote:

> Hi
>
> I am trying to use latest version of llvm and clang, and I have gotten
> them by svn.
>
> ./configure --enable-shared has run successfully, but make REQUIRES_RTTI=1
> returns error:
> make[2]: Entering directory
> `/home/ryjiao/Downloads/llvm-dev/llvm/tools/llvm-config'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory
> `/home/ryjiao/Downloads/llvm-dev/llvm/tools/llvm-config'
> make[2]: Entering directory
> `/home/ryjiao/Downloads/llvm-dev/llvm/tools/opt'
> llvm[2]: Compiling AnalysisWrappers.cpp for Debug+Asserts build
> llvm[2]: Compiling GraphPrinters.cpp for Debug+Asserts build
> llvm[2]: Compiling PrintSCC.cpp for Debug+Asserts build
> llvm[2]: Compiling opt.cpp for Debug+Asserts build
> llvm[2]: Linking Debug+Asserts executable opt
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<std::string, false, llvm::cl::parser<std::string>
> >::opt<char [20], llvm::cl::desc, llvm::cl::value_desc,
> llvm::cl::initializer<char [1]> >(char const (&) [20], llvm::cl::desc
> const&, llvm::cl::value_desc const&, llvm::cl::initializer<char [1]>
> const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1200:
> undefined reference to `llvm::cl::opt<std::string, false,
> llvm::cl::parser<std::string> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `void llvm::cl::initializer<char
> [1]>::apply<llvm::cl::opt<std::string, false, llvm::cl::parser<std::string>
> > >(llvm::cl::opt<std::string, false, llvm::cl::parser<std::string> >&)
> const':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:292:
> undefined reference to `llvm::cl::opt<std::string, false,
> llvm::cl::parser<std::string> >::setInitialValue(std::string const&)'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [30], llvm::cl::desc>(char const (&) [30], llvm::cl::desc const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1185:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [8], llvm::cl::desc>(char const (&) [8], llvm::cl::desc const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1185:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [2], llvm::cl::desc, llvm::cl::OptionHidden>(char const (&) [2],
> llvm::cl::desc const&, llvm::cl::OptionHidden const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1193:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [26], llvm::cl::desc>(char const (&) [26], llvm::cl::desc const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1185:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [16], llvm::cl::desc, llvm::cl::initializer<bool> >(char const (&) [16],
> llvm::cl::desc const&, llvm::cl::initializer<bool> const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1193:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `void llvm::cl::initializer<bool>::apply<llvm::cl::opt<bool,
> false, llvm::cl::parser<bool> > >(llvm::cl::opt<bool, false,
> llvm::cl::parser<bool> >&) const':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:292:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::setInitialValue(bool const&)'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [3], llvm::cl::desc>(char const (&) [3], llvm::cl::desc const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1185:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [14], llvm::cl::desc>(char const (&) [14], llvm::cl::desc const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1185:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [20], llvm::cl::desc>(char const (&) [20], llvm::cl::desc const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1185:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [17], llvm::cl::desc>(char const (&) [17], llvm::cl::desc const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1185:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::opt<char
> [12], llvm::cl::desc>(char const (&) [12], llvm::cl::desc const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1185:
> undefined reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool>
> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o:/home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1193:
> more undefined references to `llvm::cl::opt<bool, false,
> llvm::cl::parser<bool> >::done()' follow
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<std::string, false, llvm::cl::parser<std::string>
> >::opt<char [2], llvm::cl::desc, llvm::cl::value_desc>(char const (&) [2],
> llvm::cl::desc const&, llvm::cl::value_desc const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1193:
> undefined reference to `llvm::cl::opt<std::string, false,
> llvm::cl::parser<std::string> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `llvm::cl::opt<std::string, false, llvm::cl::parser<std::string>
> >::opt<llvm::cl::FormattingFlags, llvm::cl::desc,
> llvm::cl::initializer<char [2]>,
> llvm::cl::value_desc>(llvm::cl::FormattingFlags const&, llvm::cl::desc
> const&, llvm::cl::initializer<char [2]> const&, llvm::cl::value_desc
> const&)':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:1200:
> undefined reference to `llvm::cl::opt<std::string, false,
> llvm::cl::parser<std::string> >::done()'
> /home/ryjiao/Downloads/llvm-dev/llvm/tools/opt/Debug+Asserts/opt.o: In
> function `void llvm::cl::initializer<char
> [2]>::apply<llvm::cl::opt<std::string, false, llvm::cl::parser<std::string>
> > >(llvm::cl::opt<std::string, false, llvm::cl::parser<std::string> >&)
> const':
> /home/ryjiao/Downloads/llvm-dev/llvm/include/llvm/Support/CommandLine.h:292:
> undefined reference to `llvm::cl::opt<std::string, false,
> llvm::cl::parser<std::string> >::setInitialValue(std::string const&)'
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[2]: *** [/home/ryjiao/Downloads/llvm-dev/llvm/Debug+Asserts/bin/opt]
> Error 1
> make[2]: Leaving directory `/home/ryjiao/Downloads/llvm-dev/llvm/tools/opt'
> make[1]: *** [opt/.makeall] Error 2
> make[1]: Leaving directory `/home/ryjiao/Downloads/llvm-dev/llvm/tools'
> make: *** [all] Error 1
>
> Is there anyone who has ever encountered this problem?
> Thank you!
>
> BR
>
> Jiao Xianjun
>
>
> _______________________________________________
> 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/20120413/1168c7f2/attachment.html>


More information about the llvm-dev mailing list