Ruben Van Boxem
2011-Aug-21 14:19 UTC
[LLVMdev] Undefined references when LLVM is configured with "--host=x86_64-gnu-linux --target=x86_64-w64-mingw32"
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: config.log Type: text/x-log Size: 180564 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110821/7e84115d/attachment.bin>
Jim Grosbach
2011-Aug-22 15:08 UTC
[LLVMdev] Undefined references when LLVM is configured with "--host=x86_64-gnu-linux --target=x86_64-w64-mingw32"
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
Ruben Van Boxem
2011-Aug-22 15:23 UTC
[LLVMdev] Undefined references when LLVM is configured with "--host=x86_64-gnu-linux --target=x86_64-w64-mingw32"
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'thave 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>
NAKAMURA Takumi
2011-Aug-23 10:10 UTC
[LLVMdev] Undefined references when LLVM is configured with "--host=x86_64-gnu-linux --target=x86_64-w64-mingw32"
Ruben, Your failure must be due to --disable-pthreads. lib/Support/Unix/Mutex.inc does not have "acquire()". (Shall we fix it?) It might be a bug, though, --disable-pthreads would not make sense to your configuration. --enable-pthreads affects host platform. Note, LLVM and Clang have multi-target architecture. --target is understood as "default target". (EE/JIT should take the host triplet then. Consider "--target=i686 --host=x86_64 --build=i686") ...Takumi
Ruben Van Boxem
2011-Aug-23 10:15 UTC
[LLVMdev] Undefined references when LLVM is configured with "--host=x86_64-gnu-linux --target=x86_64-w64-mingw32"
2011/8/23 NAKAMURA Takumi <geek4civic at gmail.com>:> Ruben, > > Your failure must be due to --disable-pthreads.Ah yes, I used the same build script as I did for my native Windows cross-compiled builds, silly me.> lib/Support/Unix/Mutex.inc does not have "acquire()". > (Shall we fix it?)Does it really make sense to disable pthreads for Linux-hosted LLVM? I.e. does it deserve fixing?> > It might be a bug, though, --disable-pthreads would not make sense to > your configuration. > --enable-pthreads affects host platform.Yeah, silly me, my mistake.> > Note, LLVM and Clang have multi-target architecture. --target is > understood as "default target".Yeah, I know, and find that incredibly cool. Although to create a decent toolchain package, you'd need all the include/lib paths set up correctly, and have all system headers and libs available, and for now, still have a gcc executable to be able to link. If the latter one is fixed, I'd consider experimenting with building Linux stuff on Windows through Clang a bit more.> (EE/JIT should take the host triplet then. Consider "--target=i686 > --host=x86_64 --build=i686") > > ...Takumi >
Maybe Matching Threads
- [LLVMdev] Undefined references when LLVM is configured with "--host=x86_64-gnu-linux --target=x86_64-w64-mingw32"
- [LLVMdev] [cfe-dev] [Patch] Build failure on Windows+MinGW (GCC and Clang)
- [LLVMdev] [cfe-dev] [Patch] Build failure on Windows+MinGW (GCC and Clang)
- [LLVMdev] [cfe-dev] [Patch] Build failure on Windows+MinGW (GCC and Clang)
- [LLVMdev] [cfe-dev] [Patch] Build failure on Windows+MinGW (GCC and Clang)