[LLVMdev] Undefined references when LLVM is configured with "--host=x86_64-gnu-linux --target=x86_64-w64-mingw32"

Ruben Van Boxem vanboxem.ruben at gmail.com
Mon Aug 22 08:23:26 PDT 2011


Ok, too bad, but in retrospect GCC also needs an explicut
Op 22 aug. 2011 17:09 schreef "Jim Grosbach" <grosbach at apple.com> het
volgende:
>
> Hi Ruben,
>
> Try adding a --build=x86_64-gnu-linux option to configure as well. I don't
have that configuration locally, so I can't check to be certain, but IIRC,
our configure wants all three for a cross compile like this.
>
> -Jim
>
> On Aug 21, 2011, at 7:19 AM, Ruben Van Boxem wrote:
>
> > Hi,
> >
> > I'm getting a returning build failure when building a linux->windows
> > crosscompiler out of LLVM/Clang.
> >
> > Attached is config.log and below is the output of "make VERBOSE=1"
> >
> > llvm[2]: Linking Release executable FileCheck (without symbols)
> > g++ -I/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/include
> >
-I/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/utils/FileCheck
> > -I/home/ruben/mingw-w64/toolchain/src/LLVM/include
> > -I/home/ruben/mingw-w64/toolchain/src/LLVM/utils/FileCheck  -DNDEBUG
> > -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3
> > -fomit-frame-pointer -fno-exceptions -fno-rtti -fPIC
> > -Woverloaded-virtual -Wcast-qual  -O3 -Wl,-R -Wl,'$ORIGIN/../lib'
> > -Wl,-R
-Wl,/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/bin
> > -L/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/lib
> > -L/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/lib
> >
-Wl,--version-script=/home/ruben/mingw-w64/toolchain/src/LLVM/autoconf/ExportMap.map
> >   -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter
> > -Wwrite-strings   -o
> >
/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/bin/FileCheck
> >
/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/utils/FileCheck/Release/FileCheck.o
> > -lLLVMSupport \
> >   -ldl -lm
> >
/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/lib/libLLVMSupport.a(Signals.o):
> > In function `SignalHandler(int)':
> > Signals.cpp:(.text+0x4d8): undefined reference to
> > `llvm::sys::MutexImpl::acquire()'
> >
/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/lib/libLLVMSupport.a(Signals.o):
> > In function `llvm::sys::RunInterruptHandlers()':
> > Signals.cpp:(.text+0x600): undefined reference to
> > `llvm::sys::MutexImpl::acquire()'
> >
/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/lib/libLLVMSupport.a(Signals.o):
> > In function `llvm::sys::SetInterruptFunction(void (*)())':
> > Signals.cpp:(.text+0x6c8): undefined reference to
> > `llvm::sys::MutexImpl::acquire()'
> >
/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/lib/libLLVMSupport.a(Signals.o):
> > In function `llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&,
> > std::basic_string<char, std::char_traits<char>, std::allocator<char>
> >> *)':
> > Signals.cpp:(.text+0x790): undefined reference to
> > `llvm::sys::MutexImpl::acquire()'
> >
/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/lib/libLLVMSupport.a(Signals.o):
> > In function `llvm::sys::DontRemoveFileOnSignal(llvm::sys::Path
> > const&)':
> > Signals.cpp:(.text+0xad0): undefined reference to
> > `llvm::sys::MutexImpl::acquire()'
> >
/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/lib/libLLVMSupport.a(Threading.o):Threading.cpp:(.text+0xa8):
> > more undefined references to `llvm::sys::MutexImpl::acquire()' follow
> > collect2: ld returned 1 exit status
> > make[2]: ***
[/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/Release/bin/FileCheck]
> > Error 1
> > make[2]: Leaving directory
> >
`/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/utils/FileCheck'
> > make[1]: *** [FileCheck/.makeall] Error 2
> > make[1]: Leaving directory
> > `/home/ruben/mingw-w64/toolchain/linux64mingw64/llvm-clang/utils'
> > make: *** [all] Error 1
> >
> > This is not a new failure (I had it about a month ago too, but ignored
> > it and never tried again, untill now). Any assistance is appreciated.
> >
> > Thanks,
> >
> > Ruben
> > <config.log>_______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

Too bad :( in retrospect GCC needs it as well, guess I'll need to keep the
build variable in my build scripts.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110822/4dbcc6a0/attachment.html>


More information about the llvm-dev mailing list