[LLVMbugs] [Bug 11884] New: LLVM fails to build when using --enable-shared flag during configuration

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jan 29 21:49:17 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=11884

             Bug #: 11884
           Summary: LLVM fails to build when using --enable-shared flag
                    during configuration
           Product: Build scripts
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: autoconf
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: crubio at cs.wisc.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The following fails when trying to build LLVM (svn 149190):

./configure --enable-shared
make

Output:

llvm[2]: Linking Debug+Asserts executable opt
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1200:
undefined reference to `llvm::cl::opt<std::string, false,
llvm::cl::parser<std::string> >::done()'
/scratch/rubio/llvm-current/build/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':
/scratch/rubio/llvm-current/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&)'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1185:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1185:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1193:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1185:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1193:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/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':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:292:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::setInitialValue(bool const&)'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1185:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1185:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1185:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1185:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1185:
undefined reference to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()'
/scratch/rubio/llvm-current/build/tools/opt/Debug+Asserts/opt.o:/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1193:
more undefined references to `llvm::cl::opt<bool, false,
llvm::cl::parser<bool> >::done()' follow
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1193:
undefined reference to `llvm::cl::opt<std::string, false,
llvm::cl::parser<std::string> >::done()'
/scratch/rubio/llvm-current/build/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&)':
/scratch/rubio/llvm-current/llvm/include/llvm/Support/CommandLine.h:1200:
undefined reference to `llvm::cl::opt<std::string, false,
llvm::cl::parser<std::string> >::done()'
/scratch/rubio/llvm-current/build/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':
/scratch/rubio/llvm-current/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]: *** [/scratch/rubio/llvm-current/build/Debug+Asserts/bin/opt] Error 1
make[2]: Leaving directory `/scratch/rubio/llvm-current/build/tools/opt'
make[1]: *** [opt/.makeall] Error 2
make[1]: Leaving directory `/scratch/rubio/llvm-current/build/tools'
make: *** [all] Error 1

But if we configure without the --enable-shared flag, then we can successfully
build. This is not a problem with LLVM 3.0.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list